From 8b75ed8609a758fee50ffc718dd84da72982759c Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 28 Nov 2021 13:30:40 +0530 Subject: document configuration and `--config` flag --- readme.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/readme.md b/readme.md index cec99ef..ae525c9 100644 --- a/readme.md +++ b/readme.md @@ -90,6 +90,45 @@ statix check /path/to/dir -o json # only when compiled with --all-features statix check /path/to/dir -o errfmt # singleline, easy to integrate with vim ``` +### Configuration + +Ignore lints and fixes by creating a `statix.toml` file at +your project root: + +``` +# within statix.toml +disabled = [ + "unquoted_splices" +] +``` + +`statix` automatically discovers the configuration file by +traversing parents of the current directory and looking for +a `statix.toml` file. Alternatively, you can pass the path +to the `statix.toml` file on the command line with the +`--config` flag (available on `statix check` and `statix +fix`. + +The available lints are: + +``` +bool_comparison +empty_let_in +manual_inherit +manual_inherit_from +legacy_let_syntax +collapsible_let_in +eta_reduction +useless_parens +unquoted_splice +empty_pattern +redundant_pattern_bind +unquoted_uri +deprecated_is_null +``` + +All lints are enabled by default. + ## Architecture `statix` has the following components: -- cgit v1.2.3