sqlfluff lint [filepaths...]

Lint SQL files via passing a list of files or using stdin

Arguments

NameDescription
filepathsfilepaths

Options

NameDescription
--nocolor, -nNo color - output will be without ANSI color codes
--ignore, -i <error>Ignore particular families of errors so that they don’t cause a failed run. -–ignore behaves somewhat like noqa comments, except it applies globally
--verbose, -v
  • Repeatable ♾
  • Repeatable 5x
--exclude-rules, -e <exclude_rules>Exclude specific rules. This could either be the allowlist, or the general set if there is no specific allowlist
--rules, -r <rules>Narrow the search to only specific rules
--templater, -t <templater>The templater to use (default=jinja)
--dialect, -d <dialect>The dialect of SQL to lint
--format, -f <format>What format to return the lint result in (default=human)
--processes, -p <processes>The number of parallel processes to run. Positive numbers work as expected. Zero and negative numbers will work as number_of_cpus - number. e.g -1 means all cpus except one. 0 means all cpus
--disable-noqaSet this flag to ignore inline noqa comments
--benchSet this flag to engage the benchmarking tool output
--logger <logger>Choose to limit the logging to one of the loggers
--encoding <encoding>Specify encoding to use when reading and writing files. Defaults to autodetect
--ignore-local-configIgnore config files in default search path locations. This option allows the user to lint with the default config or can be used in conjunction with –config to only reference the custom config file
--config <extra_config_path>Include additional config file. By default the config is generated from the standard configuration files described in the documentation. This argument allows you to specify an additional configuration file that overrides the standard configuration files. N.B. cfg format is required
--write-output <write_output>Optionally provide a filename to write the results to, mostly used in tandem with –format. NB: Setting an output file re-enables normal stdout logging
--annotation-level <annotation-level>When format is set to github-annotation or github-annotation-native, default annotation level (default=notice). failure and error are equivalent
--disregard-sqlfluffignoresPerform the operation regardless of .sqlfluffignore configurations
--disable-progress-barDisables progress bars
--nofailIf set, the exit code will always be zero, regardless of violations found. This is potentially useful during rollout
--help, -hShow help for sqlfluff