Sqlfluff

Latest version: v3.3.1

Safety actively analyzes 725439 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 23 of 26

0.3.0

Not secure
Changed

- Deprecated python 2.7 and python 3.4 which are now both past
their maintenance horizon. The 0.2.x branch will remain available
for continued development for these versions.
- Rule L003 is now significantly smarter in linting indentation
with support for hanging indents and comparison to the most
recent line which doesn't have an error. The old (more simple)
functionality of directly checking whether an indent was a
multiple of a preset value has been removed.
- Fixed the "inconsistent" bug in L010. Thanks [nolanbconaway](https://github.com/nolanbconaway).
- Updated logging of parsing and lexing errors to have more useful
error codes.
- Changed parsing of expressions to favour functions over identifiers
to [fix the expression bug](https://github.com/sqlfluff/sqlfluff/issues/96).
- Fixed the "inconsistent" bug in L010. Thanks [nolanbconaway](https://github.com/nolanbconaway).
- Moved where the `SELECT` keyword is parsed within a select statement,
so that it belongs as part of the newly renamed `select_clause` (renamed
from previously `select_target_group`).
- Clarified handling of the `type` and `name` properties of the BaseSegment
class and its children. `name` should be specific to a particular kind
of segment, and `type` should express a wider group. Handling of the
`newline`, `whitespace` and `comma` segments has been updated so that
we use the `type` property for most use cases rather than `name`.

Added

- _Meta segments_ for indicating where things can be present in the parsed
tree. This is mostly illustrated using the `Indent` and `Dedent` segments
used for indicating the position of theoretical indents in the structure.
Several helper functions have been added across the codebase to handle
this increase in the kinds of segments which might be encountered by
various grammars.
- Rule L016 has been added to lint long lines. In the `fix` phase of this
rule, there is enough logic to try and reconstruct a sensible place for
line breaks as re-flow the query. This will likely need further work
and may still encounter places where it doesn't fix all errors but should
be able to deal with the majority of simple cases.
- BigQuery dialect, initially just for appropriate quoting.
- Added parsing of DDL statements such as `COMMIT`, `DROP`, `GRANT`, `REVOKE`
and `ROLLBACK`. Thanks [barrywhart](https://github.com/barrywhart).
- `--format` option to the `parse` command that allows a yaml output. This
is mostly to make test writing easier in the development process but
might also be useful for other things.
- Parsing of set operations like `UNION`.
- Support for the `diff-cover` tool. Thanks [barrywhart](https://github.com/barrywhart).
- Enabled the `fix` command while using `stdin`. Thanks [nolanbconaway](https://github.com/nolanbconaway).
- Rule to detect incorrect use of `DISTINCT`. Thanks [barrywhart](https://github.com/barrywhart).
- Security fixes from DeepCover. Thanks [sanketsaurav](https://github.com/sanketsaurav).
- Automatic fix testing, to help support the newer more complicated rules.
- Interval literals
- Support for the `source` macro from dbt. Thanks [Dandandan](https://github.com/Dandandan)
- Support for functions with spaces between the function name and the brackets
and a linting rule `L017` to catch this.
- Efficiency cache for faster pruning of the parse tree.
- Parsing of array notation as using in BigQuery and Postgres.
- Enable the `ignore` parameter on linting and fixing commands to ignore
particular kinds of violations.

0.2.4

Not secure
Added

- A `--code-only` option to the `parse` command to spit out a more
simplified output with only the code elements.
- Rules can now optionally override the description of the violation
and pass that back via the `LintingResult`.

Changed

- Bugfix, correct missing files in `setup.py` `install_requires` section.
- Better parsing of the _not equal_ operator.
- Added more exclusions to identifier reserved words to fix cross joins.
- At verbosity levels 2 or above, the root config is printed and then any
diffs to that for specific files are also printed.
- Linting and parsing of directories now reports files in alphabetical
order. Thanks [barrywhart](https://github.com/barrywhart).
- Better python 2.7 stability. Thanks [barrywhart](https://github.com/barrywhart).
- Fixing parsing of `IN`/`NOT IN` and `IS`/`IS NOT`.

0.2.3

Not secure
Changed

- Bugfix, default config not included.

0.2.2

Not secure
Changed

- Tweak rule L005 to report more sensibly with newlines.
- Rework testing of rules to be more modular.
- Fix a config file bug if no root config file was present for some
values. Thanks [barrywhart](https://github.com/barrywhart).
- Lexing rules are now part of the dialect rather than a
global so that they can be overridden by other dialects
when we get to that stage.

0.2.0

Not secure
Added

- Templating support (jinja2, python or raw).
- Variables + Macros.
- The `fix` command is also sensitive to fixing over templates
and will skip certain fixes if it feels that it's conflicted.
- Config file support, including specifying context for the templater.
- Documentation via Sphinx and readthedocs.
- Including a guide on the role of SQL in the real world.
Assisted by [barrywhart](https://github.com/barrywhart).
- Documentation LINTING (given we're a linting project) introduced in CI.
- Reimplemented L006 & L007 which lint whitespace around operators.
- Ability to configure rule behaviour directly from the config file.
- Implemented L010 to lint capitalisation of keywords.
- Allow casting in the parser using the `::` operator.
- Implemented `GROUP BY`and `LIMIT`.
- Added `ORDER BY` using indexes and expressions.
- Added parsing of `CASE` statements.
- Support for window/aggregate functions.
- Added linting and parsing of alias expressions.

Changed

- Fixed a bug which could cause potential infinite recursion in configuration
- Changed how negative literals are handled, so that they're now a compound segment
rather than being identified at the lexing stage. This is to allow the parser
to resolve the potential ambiguity.
- Restructure of rule definitions to be more streamlined and also enable
autodocumentation. This includes a more complete `RuleSet` class which now
holds the filtering code.
- Corrected logging in fix mode not to duplicate the reporting of errors.
- Now allows insert statements with a nested `with` clause.
- Fixed verbose logging during parsing.
- Allow the `Bracketed` grammar to optionally match empty brackets using
the optional keyword.

0.1.9

- Re-order the quick fix options.
- Implement `sqlfluff.codeActions` options to disable code actions.

Page 23 of 26

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.