You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `Replace nvl with coalesce.` option produces the following result:
17
+
18
+

19
+
20
+
## All Problems of One Rule
21
+
22
+
Rather than fixing one problem at a time, you can select the option `Fix all <rule> problems like ...` to fix all problems for one rule in one go.
23
+
24
+
This option is only available if multiple problems have been reported for a rule in a file.
25
+
26
+

27
+
28
+
The `Fix all G-2180 problems like 'Replace with unquoted identifier.'` option produces the following result:
29
+
30
+

31
+
32
+
## Fix All Problems
33
+
34
+
From the quick fix pop-up window, you can select the `Fix all problems` option.
35
+
This option is available in every editor position if there are any quick fixes that can be safely applied to the file.
36
+
37
+

38
+
39
+
The `Fix all problems.` option produces the following result:
40
+
41
+

42
+
43
+
## @dbLinter Ignore Marker Comment
44
+
45
+
If you are unable to fix a problem or choose not to, you can add a `@dbLinter ignore` marker to indicate that the problem is being intentionally accepted.
46
+
This avoids making unnecessary or unsafe changes and keeps the linting output meaningful rather than noisy.
47
+
48
+
### Syntax
49
+
50
+
The @dbLinter maker comment must be placed within a single-line or multiline comment, and is case-insensitive.
51
+
52
+
```text
53
+
@DBLINTER IGNORE(rule1 [, rule2]...) [comment]
54
+
```
55
+
56
+
The syntax of a rule is as follows:
57
+
58
+
```text
59
+
[tenantName] ruleName
60
+
```
61
+
62
+
If you omit the `tenantName`, the `ruleName` is expected to exist in the `Core` tenant.
63
+
64
+
### Scope
65
+
66
+
If the dbLinter marker comment is not the first token on a line, the scope is limited to that line only.
67
+
68
+
If the dbLinter marker comment is the first token on a line, the scope is determined by the most inner IslandSQL parser rule context that fully contains the comment.
69
+
The following IslandSQL parser rules are considered:
The screenshot in [Single Problem](#single-problem) shows the two options, `Fix` and `Explain`, provided by the Copilot extension in VS Code.
191
+
If you have set up an AI agent in VS Code, you will also have access to these options in your installation.
192
+
193
+
The next screenshot shows a violation of rule [G-3185: Never use ROWNUM at the same query level as ORDER BY](https://dblinter.app/ords/r/dblinter/dblinter-console/rules#P1000_SHOW_RULE=core%20g-3185).
194
+
In this case, dbLinter does not provide a quick fix. However, the AI agent can suggest code fixes based on the information it receives.
195
+
In other words, the context. For example, this is:
196
+
197
+
- The content in the editor.
198
+
- The name and description of the violated rule.
199
+
- The exact position of the rule violation in the editor.
200
+
- Additional information about this rule available on the internet.
The code violation has now been resolved, meaning the query produces the correct result.
214
+
215
+
However, you cannot be sure that the result is correct.
216
+
Why? Because the result is not deterministic.
217
+
Even with this simple example, we have experienced different results in the past.
218
+
Some were correct and some were wrong. Therefore, you should always check the result produced by the AI agent.
219
+
220
+
In any case, the provided solution is not the best option.
221
+
A modern solution would use the [row_limiting_clause](https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlrf/SELECT.html#GUID-CFA006CA-6FF1-4972-821E-6996142A51C6__BABBADDD), which was introduced with the Oracle Database 12c.
222
+
as shown in the second solution of [G-3185](https://dblinter.app/ords/r/dblinter/dblinter-console/rules#P1000_SHOW_RULE=core%20g-3185).
223
+
224
+
That said, the fixes proposed by the AI agent are powerful and useful when a dbLinter quick fix is unavailable.
0 commit comments