|
21 | 21 | # You can give explicit globs or simply directories. |
22 | 22 | # In the latter case `**/*.{ex,exs}` will be used. |
23 | 23 | # |
24 | | - included: [ |
25 | | - "lib/", |
26 | | - "src/", |
27 | | - "test/", |
28 | | - "web/", |
29 | | - "apps/*/lib/", |
30 | | - "apps/*/src/", |
31 | | - "apps/*/test/", |
32 | | - "apps/*/web/" |
33 | | - ], |
| 24 | + included: ["example/lib", "example/test", "lib/", "test/"], |
34 | 25 | excluded: [~r"/_build/", ~r"/deps/", ~r"/node_modules/"] |
35 | 26 | }, |
36 | 27 | # |
|
83 | 74 | # Priority values are: `low, normal, high, higher` |
84 | 75 | # |
85 | 76 | {Credo.Check.Design.AliasUsage, |
86 | | - [priority: :low, if_nested_deeper_than: 2, if_called_more_often_than: 0]}, |
| 77 | + [ |
| 78 | + priority: :low, |
| 79 | + if_nested_deeper_than: 2, |
| 80 | + if_called_more_often_than: 0 |
| 81 | + ]}, |
87 | 82 | # You can also customize the exit_status of each check. |
88 | 83 | # If you don't want TODO comments to cause `mix credo` to fail, just |
89 | 84 | # set this value to 0 (zero). |
|
97 | 92 | {Credo.Check.Readability.AliasOrder, []}, |
98 | 93 | {Credo.Check.Readability.FunctionNames, []}, |
99 | 94 | {Credo.Check.Readability.LargeNumbers, []}, |
100 | | - {Credo.Check.Readability.MaxLineLength, [priority: :low, max_length: 80]}, |
| 95 | + {Credo.Check.Readability.MaxLineLength, |
| 96 | + [priority: :low, max_length: 80]}, |
101 | 97 | {Credo.Check.Readability.ModuleAttributeNames, []}, |
102 | 98 | {Credo.Check.Readability.ModuleDoc, []}, |
103 | 99 | {Credo.Check.Readability.ModuleNames, []}, |
|
131 | 127 | {Credo.Check.Refactor.Nesting, []}, |
132 | 128 | {Credo.Check.Refactor.UnlessWithElse, []}, |
133 | 129 | {Credo.Check.Refactor.WithClauses, []}, |
| 130 | + {Credo.Check.Refactor.FilterCount, []}, |
134 | 131 | {Credo.Check.Refactor.FilterFilter, []}, |
135 | 132 | {Credo.Check.Refactor.RejectReject, []}, |
136 | 133 | {Credo.Check.Refactor.RedundantWithClauseResult, []}, |
|
140 | 137 | # |
141 | 138 | {Credo.Check.Warning.ApplicationConfigInModuleAttribute, []}, |
142 | 139 | {Credo.Check.Warning.BoolOperationOnSameValues, []}, |
| 140 | + {Credo.Check.Warning.Dbg, []}, |
143 | 141 | {Credo.Check.Warning.ExpensiveEmptyEnumCheck, []}, |
144 | 142 | {Credo.Check.Warning.IExPry, []}, |
145 | 143 | {Credo.Check.Warning.IoInspect, []}, |
| 144 | + {Credo.Check.Warning.MissedMetadataKeyInLoggerConfig, []}, |
146 | 145 | {Credo.Check.Warning.OperationOnSameValues, []}, |
147 | 146 | {Credo.Check.Warning.OperationWithConstantResult, []}, |
148 | 147 | {Credo.Check.Warning.RaiseInsideRescue, []}, |
|
159 | 158 | {Credo.Check.Warning.UnsafeExec, []}, |
160 | 159 |
|
161 | 160 | # |
162 | | - ## Controversial and experimental checks |
| 161 | + ## Checks disabled by default |
163 | 162 | # |
164 | | - {Credo.Check.Consistency.UnusedVariableNames, []}, |
165 | | - {Credo.Check.Readability.ImplTrue, []}, |
166 | | - {Credo.Check.Readability.MultiAlias, []}, |
167 | | - {Credo.Check.Readability.SingleFunctionToBlockPipe, []}, |
| 163 | + |
168 | 164 | {Credo.Check.Readability.SinglePipe, []}, |
169 | 165 | {Credo.Check.Readability.StrictModuleLayout, []}, |
170 | 166 | {Credo.Check.Readability.WithCustomTaggedTuple, []}, |
171 | 167 | {Credo.Check.Refactor.DoubleBooleanNegation, []}, |
172 | 168 | {Credo.Check.Refactor.FilterReject, []}, |
173 | 169 | {Credo.Check.Refactor.MapMap, []}, |
174 | | - {Credo.Check.Refactor.NegatedIsNil, []}, |
175 | 170 | {Credo.Check.Refactor.PipeChainStart, []}, |
176 | 171 | {Credo.Check.Refactor.RejectFilter, []}, |
177 | | - {Credo.Check.Refactor.VariableRebinding, []}, |
178 | | - {Credo.Check.Warning.MapGetUnsafePass, []}, |
179 | | - {Credo.Check.Warning.UnsafeToAtom, []} |
| 172 | + {Credo.Check.Warning.MapGetUnsafePass, []} |
180 | 173 | ], |
181 | 174 | disabled: [ |
182 | 175 | # |
|
187 | 180 | # and be sure to use `mix credo --strict` to see low priority checks) |
188 | 181 | # |
189 | 182 | {Credo.Check.Consistency.MultiAliasImportRequireUse, []}, |
| 183 | + {Credo.Check.Consistency.UnusedVariableNames, []}, |
190 | 184 | {Credo.Check.Design.DuplicatedCode, []}, |
191 | 185 | {Credo.Check.Design.SkipTestWithoutComment, []}, |
192 | 186 | {Credo.Check.Readability.AliasAs, []}, |
| 187 | + {Credo.Check.Readability.BlockPipe, []}, |
| 188 | + {Credo.Check.Readability.ImplTrue, []}, |
| 189 | + {Credo.Check.Readability.MultiAlias, []}, |
| 190 | + {Credo.Check.Readability.NestedFunctionCalls, []}, |
| 191 | + {Credo.Check.Readability.OneArityFunctionInPipe, []}, |
| 192 | + {Credo.Check.Readability.OnePipePerLine, []}, |
193 | 193 | {Credo.Check.Readability.SeparateAliasRequire, []}, |
| 194 | + {Credo.Check.Readability.SingleFunctionToBlockPipe, []}, |
194 | 195 | {Credo.Check.Readability.Specs, []}, |
195 | 196 | {Credo.Check.Refactor.ABCSize, []}, |
196 | 197 | {Credo.Check.Refactor.AppendSingleItem, []}, |
197 | 198 | {Credo.Check.Refactor.IoPuts, []}, |
198 | 199 | {Credo.Check.Refactor.ModuleDependencies, []}, |
| 200 | + {Credo.Check.Refactor.NegatedIsNil, []}, |
| 201 | + {Credo.Check.Refactor.PassAsyncInTestCases, []}, |
| 202 | + {Credo.Check.Refactor.VariableRebinding, []}, |
199 | 203 | {Credo.Check.Warning.LazyLogging, []}, |
200 | 204 | {Credo.Check.Warning.LeakyEnvironment, []}, |
201 | 205 | {Credo.Check.Warning.MixEnv, []}, |
202 | | - |
| 206 | + {Credo.Check.Warning.UnsafeToAtom, []} |
203 | 207 |
|
204 | 208 | # {Credo.Check.Refactor.MapInto, []}, |
205 | 209 |
|
|
0 commit comments