prompt: Rule L060 could give a specific error message
  At the moment rule L060 flags something like this:
  
  ```
  L:  21 | P:   9 | L060 | Use 'COALESCE' instead of 'IFNULL' or 'NVL'.
  ```
  
  Since we likely know the wrong word, it might be nice to actually flag that instead of both `IFNULL` and `NVL` - like most of the other rules do.
  
  That is it should flag this:
  
  ```
  L:  21 | P:   9 | L060 | Use 'COALESCE' instead of 'IFNULL'.
  ```
   Or this:
  
  ```
  L:  21 | P:   9 | L060 | Use 'COALESCE' instead of 'NVL'.
  ```
  
  As appropriate.
  
  What do you think @jpy-git ?
  
  
instance: {"FAIL_TO_PASS": "[\"test/rules/std_L060_test.py::test__rules__std_L060_raised\"]", "PASS_TO_PASS": "[]", "base_commit": "f1dba0e1dd764ae72d67c3d5e1471cf14d3db030", "created_at": "2022-01-22T12:21:52Z", "environment_setup_commit": "a5c4eae4e3e419fe95460c9afd9cf39a35a470c4", "hints_text": "@tunetheweb Yeah definitely, should be a pretty quick change \ud83d\ude0a", "instance_id": "sqlfluff__sqlfluff-2419", "patch": "diff --git a/src/sqlfluff/rules/L060.py b/src/sqlfluff/rules/L060.py\n--- a/src/sqlfluff/rules/L060.py\n+++ b/src/sqlfluff/rules/L060.py\n@@ -59,4 +59,8 @@ def _eval(self, context: RuleContext) -> Optional[LintResult]:\n             ],\n         )\n \n-        return LintResult(context.segment, [fix])\n+        return LintResult(\n+            anchor=context.segment,\n+            fixes=[fix],\n+            description=f\"Use 'COALESCE' instead of '{context.segment.raw_upper}'.\",\n+        )\n", "problem_statement": "Rule L060 could give a specific error message\nAt the moment rule L060 flags something like this:\r\n\r\n```\r\nL:  21 | P:   9 | L060 | Use 'COALESCE' instead of 'IFNULL' or 'NVL'.\r\n```\r\n\r\nSince we likely know the wrong word, it might be nice to actually flag that instead of both `IFNULL` and `NVL` - like most of the other rules do.\r\n\r\nThat is it should flag this:\r\n\r\n```\r\nL:  21 | P:   9 | L060 | Use 'COALESCE' instead of 'IFNULL'.\r\n```\r\n Or this:\r\n\r\n```\r\nL:  21 | P:   9 | L060 | Use 'COALESCE' instead of 'NVL'.\r\n```\r\n\r\nAs appropriate.\r\n\r\nWhat do you think @jpy-git ?\r\n\n", "repo": "sqlfluff/sqlfluff", "test_patch": "diff --git a/test/rules/std_L060_test.py b/test/rules/std_L060_test.py\nnew file mode 100644\n--- /dev/null\n+++ b/test/rules/std_L060_test.py\n@@ -0,0 +1,12 @@\n+\"\"\"Tests the python routines within L060.\"\"\"\n+import sqlfluff\n+\n+\n+def test__rules__std_L060_raised() -> None:\n+    \"\"\"L060 is raised for use of ``IFNULL`` or ``NVL``.\"\"\"\n+    sql = \"SELECT\\n\\tIFNULL(NULL, 100),\\n\\tNVL(NULL,100);\"\n+    result = sqlfluff.lint(sql, rules=[\"L060\"])\n+\n+    assert len(result) == 2\n+    assert result[0][\"description\"] == \"Use 'COALESCE' instead of 'IFNULL'.\"\n+    assert result[1][\"description\"] == \"Use 'COALESCE' instead of 'NVL'.\"\n", "version": "0.8"}
parsed_commit_content: {"file_diffs":[{"old_file_content":"\"\"\"Implementation of Rule L060.\"\"\"\n\nfrom typing import Optional\n\nfrom sqlfluff.core.parser.segments.raw import CodeSegment\nfrom sqlfluff.core.rules.base import BaseRule, LintFix, LintResult, RuleContext\nfrom sqlfluff.core.rules.doc_decorators import document_fix_compatible\n\n\n@document_fix_compatible\nclass Rule_L060(BaseRule):\n    \"\"\"Use ``COALESCE`` instead of ``IFNULL`` or ``NVL``.\n\n    | **Anti-pattern**\n    | ``IFNULL`` or ``NVL`` are used to fill ``NULL`` values.\n\n    .. code-block:: sql\n\n        SELECT ifnull(foo, 0) AS bar,\n        FROM baz;\n\n        SELECT nvl(foo, 0) AS bar,\n        FROM baz;\n\n    | **Best practice**\n    | Use ``COALESCE`` instead.\n    | ``COALESCE`` is universally supported,\n    | whereas Redshift doesn't support ``IFNULL``\n    | and BigQuery doesn't support ``NVL``.\n    | Additionally ``COALESCE`` is more flexible\n    | and accepts an arbitrary number of arguments.\n\n    .. code-block:: sql\n\n        SELECT coalesce(foo, 0) AS bar,\n        FROM baz;\n\n    \"\"\"\n\n    def _eval(self, context: RuleContext) -> Optional[LintResult]:\n        \"\"\"Use ``COALESCE`` instead of ``IFNULL`` or ``NVL``.\"\"\"\n        # We only care about function names.\n        if context.segment.name != \"function_name_identifier\":\n            return None\n\n        # Only care if the function is ``IFNULL`` or ``NVL``.\n        if context.segment.raw_upper not in {\"IFNULL\", \"NVL\"}:\n            return None\n\n        # Create fix to replace ``IFNULL`` or ``NVL`` with ``COALESCE``.\n        fix = LintFix.replace(\n            context.segment,\n            [\n                CodeSegment(\n                    raw=\"COALESCE\",\n                    name=\"function_name_identifier\",\n                    type=\"function_name_identifier\",\n                )\n            ],\n        )\n\n        return LintResult(context.segment, [fix])\n","new_file_content":"","header":{"file":{"path":"src/sqlfluff/rules/L060.py"},"misc_line":null},"index_line":null,"is_binary_file":false,"binary_line":null,"minus_file":{"path":"a/src/sqlfluff/rules/L060.py"},"plus_file":{"path":"b/src/sqlfluff/rules/L060.py"},"hunks":[{"descriptor":{"old_range":{"start":59,"length":4},"new_range":{"start":59,"length":8},"section":"def _eval(self, context: RuleContext) -> Optional[LintResult]:"},"line_group":{"all_lines":[{"content":"            ],","type":"context"},{"content":"        )","type":"context"},{"content":"","type":"context"},{"content":"        return LintResult(context.segment, [fix])","type":"deleted"},{"content":"        return LintResult(","type":"added"},{"content":"            anchor=context.segment,","type":"added"},{"content":"            fixes=[fix],","type":"added"},{"content":"            description=f\"Use 'COALESCE' instead of '{context.segment.raw_upper}'.\",","type":"added"},{"content":"        )","type":"added"},{"content":"","type":"context"}]},"modified_entities":[],"added_entities":[],"deleted_entities":[]}]}],"old_commit_hash":"f1dba0e1dd764ae72d67c3d5e1471cf14d3db030","new_commit_hash":"e3fb8535acf3cdded95476fbfc723a8359550d94","commit_message":"Ensure the temporary file is written to disk before using it","commit_date":"2021-10-26T18:45:50-04:00","metadata":{}}