Tags: joereynolds/sql-lint
Tags
v0.0.14 This version sees many updated and improvements made so let's dig in: - sql-lint now recurses over directories. A simple `sql-lint .` will lint all `.sql` files in your current directory - The --file and -f flag has been removed. Now you can specify it right away without a flag i.e. `sql-lint my-file.sql - The --query and -q flag has been removed. These were unneccessary and if you want to lint a fixed string, you can do so via the stdin i.e. `echo | 'DELETE FROM person;' | sql-lint - A new check for hungarian notation has been created. This will warn of any `sp_` or `tbl_` prefixes - Linting errors now carry extra information about them. If you want to see this information, pass the `-v` flag through on the command line - `ALTER COLUMN` statements now work for postgres users - The wording around a missing config file has been updated to give you better guidance - The warning about missing a config file will only show if `-v` is set - sql-lint will correctly fail if a file is not found that was specified - An **extremely** basic sql formatter is in place. Do not expect much you can experiment with it using the `--fix` flag There are many other changes that can be glanced at through the commit history but those are the main ones. As you can see, a lot of work has been put in to make the CLI easier and more intuitive to use.
Bump to 0.0.12 - New check for unmatched parentheses in queries - If there is an unbalanced amount of parentheses, sql-lint will highlight this to you to make changes - Simple checks can be ran without a configuration file - Whereas before, a configuration file was mandatory even if it was not used, we now do not require one at all unless you want more intelligent errors to come through - Fix the keyword 'OR' breaking the InvalidCreateOption check - Port number is now configurable - You can specify `port` in your `.config.json` configuration file or you can pass the `--port` on the command line to use a non-standard port. Note that it defaults to 3306 if none are supplied - Limited (heh) support for LIMIT has been added - The LIMIT clause is now recognised in SELECT statements as well as the row count - New check for invalid row counts on LIMIT clauses - If you specify a non-integer argument to LIMIT, `sql-lint` will highlight this to you to make changes - `sql-lint` no longer dies on `DELIMITER` or `END` keywords - Exit with an exit code of 1 if any errors occur - This allows us to integrate it into build scripts etc... - Better documentation - `sql-lint`s docs have moved over to readthedocs sql-lint.readthedocs.io The format is better and they are easily searchable. An offline solution such as a man/info page will be coming in the future
PreviousNext