github sqlfluff/sqlfluff 1.3.0

latest releases: 4.2.2, 4.2.1, 4.2.0...
3 years ago

Highlights

This release brings several potentially breaking changes to the underlying parse tree. For users of the cli tool in a linting context you should notice no change. If however your application relies on the structure of the SQLFluff parse tree or the naming of certain elements within the yaml format, then this may not be a drop-in replacement. Specifically:

  • The addition of a new end_of_file meta segment at the end of the parse structure.
  • The addition of a template_loop meta segment to signify a jump backward in the source file within a loop structure (e.g. a jinja for loop).
  • Much more specific types on some raw segments, in particular identifier and literal type segments will now appear in the parse tree with their more specific type (which used to be called name) e.g. naked_identifier, quoted_identifier, numeric_literal etc...

If using the python api, the parent type (such as identifier) will still register if you call .is_type("identifier"), as this function checks all inherited types. However the eventual type returned by .get_type() will now be (in most cases) what used to be accessible at .name. The name attribute will be deprecated in a future release.

Other highlights:

  • New command-line option --show-lint-violations to show details on unfixable errors when running sqlfluff fix.
  • Improved consistency of process exit codes.
  • Short CLI options for many common options.
  • Jinja templater: When --ignore=templating is enabled, undefined Jinja variables now take on "reasonable" default values rather than blank string (""). This can streamline initial rollout of SQLFluff by reducing or eliminating the need to configure templater variables.

There are also a ton of other features and bug fixes in this release, including first-time contributions from 11 new contributors! πŸŽ‰

What’s Changed

New Contributors

Don't miss a new sqlfluff release

NewReleases is sending notifications on new releases.