@@ -44,21 +44,28 @@ Nevertheless, the Oracle Data Dictionary contains a great deal of information fo
4444### No Code Style
4545
4646Rules related to formatting are not part of the dbLinter ruleset.
47- It will be a separate product/component with a separate configuration.
47+
4848A formatter can be applied to a selection of code, a file, or the entire project, and deals with whitespace between tokens.
4949Case conventions for keywords and identifiers are sometimes also handled by a formatter.
5050All these rules are not part of dbLinter.
5151
5252However, there are a lot of similarities between formatter rules and other rules.
53- SQLFluff is a tooling that uses normal rules to configure its formatter.
53+ SQLFluff or the ESLint Stylistic plugin use normal rules to configure the formatter.
5454The impact of the formatter is something which can be shown quite well with rules.
5555
5656A main difference is, that some formatter rules are mandatory (e.g. setting the line length or the tab size etc.).
57- As a result some rules cannot be disabled, they have to be configured. E.g. identifiers. upper/lower/ignore.
58-
59- For SQL-based tests we have found a way to combine them with static code analysis.
60- We still need to define how we want to treat formatter rules.
61- Therefore, for the time being we exclude formatter/code style rules.
57+ As a result some rules cannot be disabled, they have to be configured.
58+ They need a behaviour. Either explicitly or implicitly by a default. For example:
59+
60+ - Keyword case: upper, lower, ignore (keep)
61+ - Identifier case: upper, lower, pascal, camel, ignore (keep)
62+ - Number of spaces used for an indentation: 2, 3, 4, 8, ...
63+ - Max. line length: 80, 100, 120, ...
64+ - Commas: leading, trailing
65+
66+ There is an open [ GitHub issue] ( (https://github.com/Grisselbav/dbLinter/issues/45) ) suggesting a new rule:
67+ 'Always format database code consistently'. This issue discusses how
68+ formatter rules can be integrated into dbLinter.
6269
6370### Not Contradictory
6471
0 commit comments