diff options
author | Akshay <[email protected]> | 2021-11-28 08:00:40 +0000 |
---|---|---|
committer | Akshay <[email protected]> | 2021-11-28 08:00:40 +0000 |
commit | 8b75ed8609a758fee50ffc718dd84da72982759c (patch) | |
tree | 20c61293843331fadd49b9e53cd74e439bdc6827 /readme.md | |
parent | 2b6012a79cb092e5d88c050cb494057efef28fc2 (diff) |
document configuration and `--config` flag
Diffstat (limited to 'readme.md')
-rw-r--r-- | readme.md | 39 |
1 files changed, 39 insertions, 0 deletions
@@ -90,6 +90,45 @@ statix check /path/to/dir -o json # only when compiled with --all-features | |||
90 | statix check /path/to/dir -o errfmt # singleline, easy to integrate with vim | 90 | statix check /path/to/dir -o errfmt # singleline, easy to integrate with vim |
91 | ``` | 91 | ``` |
92 | 92 | ||
93 | ### Configuration | ||
94 | |||
95 | Ignore lints and fixes by creating a `statix.toml` file at | ||
96 | your project root: | ||
97 | |||
98 | ``` | ||
99 | # within statix.toml | ||
100 | disabled = [ | ||
101 | "unquoted_splices" | ||
102 | ] | ||
103 | ``` | ||
104 | |||
105 | `statix` automatically discovers the configuration file by | ||
106 | traversing parents of the current directory and looking for | ||
107 | a `statix.toml` file. Alternatively, you can pass the path | ||
108 | to the `statix.toml` file on the command line with the | ||
109 | `--config` flag (available on `statix check` and `statix | ||
110 | fix`. | ||
111 | |||
112 | The available lints are: | ||
113 | |||
114 | ``` | ||
115 | bool_comparison | ||
116 | empty_let_in | ||
117 | manual_inherit | ||
118 | manual_inherit_from | ||
119 | legacy_let_syntax | ||
120 | collapsible_let_in | ||
121 | eta_reduction | ||
122 | useless_parens | ||
123 | unquoted_splice | ||
124 | empty_pattern | ||
125 | redundant_pattern_bind | ||
126 | unquoted_uri | ||
127 | deprecated_is_null | ||
128 | ``` | ||
129 | |||
130 | All lints are enabled by default. | ||
131 | |||
93 | ## Architecture | 132 | ## Architecture |
94 | 133 | ||
95 | `statix` has the following components: | 134 | `statix` has the following components: |