Added
- Support for the Teradata dialect. Thanks [Katzmann1983](https://github.com/Katzmann1983)!
- A much more detailed getting started guide in the docs.
- For the `parse` command, added the `--profiler` and `--bench` options
to help debugging performance issues.
- Support for the `do` command in the jinja templater.
- Proper parsing of the concatenate operator (`||`).
- Proper indent handling of closing brackets.
- Logging and benchmarking of parse performance as part of the CI pipeline.
- Parsing of object references with defaults like `my_db..my_table`.
- Support for the `INTERVAL '4 days'` style interval expression.
- Configurable trailing or leading comma linting.
- Configurable indentation for `JOIN` clauses.
- Rules now have their own logging interface to improve debugging ability.
- Snowflake and Postgres dialects.
- Support for a `.sqlfluffignore` file to ignore certain paths.
- More generic interfaces for managing keywords in dialects, including `set`
interfaces for managing and creating keywords and the `Ref.keyword()` method
to refer to them, and the ability to refer directly to keyword names in
most grammars using strings directly. Includes `SegmentGenerator` objects
to bind dialect objects at runtime from sets. Thanks [Katzmann1983](https://github.com/Katzmann1983)!
- Rule `L029` for using unreserved keywords as variable names.
- The jinja templater now allows macros loaded from files, and the
hydration of variables ending in `_path` in the config files.
- JSON operators and the `DISTINCT ON ()` syntax for the postgres dialect.
Changed
- Refactor of whitespace and non-code handling so that segments are
less greedy and default to not holding whitespace on ends. This allows
more consistent linting rule application.
- Change config file reading to _case-sensitive_ to support case
sensitivity in jinja templating.
- Non-string values (including lists) now function in the python
and jinja templating libraries.
- Validation of the match results of grammars has been reduced. In
production cases the validation will still be done, but only on
_parse_ and not on _match_.
- At low verbosities, python level logging is also reduced.
- Some matcher rules in the parser can now be classified as _simple_
which allows them to shortcut some of the matching routines.
- Yaml output now double quotes values with newlines or tab characters.
- Better handling on hanging and closing indents when linting rule L003.
- More capable handline of multi-line comments so that indentation
and line length parsing works. This involves some deep changes to the
lexer.
- Getting violations from the linter now automatically takes into account
of ignore rules and filters.
- Several bugfixes, including catching potential infinite regress during
fixing of files, if one fix would re-introduce a problem with another.
- Behaviour of the `Bracketed` grammar has been changed to treat its
content as a `Sequence` rather than a `OneOf`.
- Move to `SandboxedEnvironment` rather than `Environment` for jinja
templating for security.
- Improve reporting of templating issues, especially for the jinja templater
so that missing variables are rendered as blanks, but still reported as
templating violations.