Skip to content

Commit 7e329a4

Browse files
authored
Merge pull request #1 from fschoenfeldt/feature/update-2025
Feature/update 2025
2 parents 7375150 + 5b8329b commit 7e329a4

26 files changed

Lines changed: 351 additions & 430 deletions

.check.exs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[
2+
## don't run tools concurrently
3+
# parallel: false,
4+
5+
## don't print info about skipped tools
6+
# skipped: false,
7+
8+
## always run tools in fix mode (put it in ~/.check.exs locally, not in project config)
9+
# fix: true,
10+
11+
## don't retry automatically even if last run resulted in failures
12+
retry: false,
13+
14+
## list of tools (see `mix check` docs for a list of default curated tools)
15+
tools: [
16+
## curated tools may be disabled (e.g. the check for compilation warnings)
17+
# {:gettext, false}
18+
19+
## ...or have command & args adjusted (e.g. enable skip comments for sobelow)
20+
# {:sobelow, "mix sobelow --exit --skip"},
21+
22+
## ...or reordered (e.g. to see output from dialyzer before others)
23+
# {:dialyzer, order: -1},
24+
25+
## ...or reconfigured (e.g. disable parallel execution of ex_unit in umbrella)
26+
# {:ex_unit, umbrella: [parallel: false]},
27+
28+
## custom new tools may be added (Mix tasks or arbitrary commands)
29+
# {:my_task, "mix my_task", env: %{"MIX_ENV" => "prod"}},
30+
# {:my_tool, ["my_tool", "arg with spaces"]}
31+
{:coveralls, ["mix", "coveralls"]}
32+
]
33+
]

.credo.exs

Lines changed: 119 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -53,128 +53,131 @@
5353
#
5454
# To disable a check put `false` as second element:
5555
#
56-
# {Credo.Check.Design.DuplicatedCode, false}
57-
#
58-
checks: [
59-
#
60-
## Consistency Checks
61-
#
62-
{Credo.Check.Consistency.ExceptionNames, []},
63-
{Credo.Check.Consistency.LineEndings, []},
64-
{Credo.Check.Consistency.ParameterPatternMatching, []},
65-
{Credo.Check.Consistency.SpaceAroundOperators, []},
66-
{Credo.Check.Consistency.SpaceInParentheses, []},
67-
{Credo.Check.Consistency.TabsOrSpaces, []},
56+
# {Credo.Check.Design.DuplicatedCode,[]}
57+
#
58+
checks: %{
59+
enabled: [
60+
#
61+
## Consistency Checks
62+
#
63+
{Credo.Check.Consistency.ExceptionNames, []},
64+
{Credo.Check.Consistency.LineEndings, []},
65+
{Credo.Check.Consistency.ParameterPatternMatching, []},
66+
{Credo.Check.Consistency.SpaceAroundOperators, []},
67+
{Credo.Check.Consistency.SpaceInParentheses, []},
68+
{Credo.Check.Consistency.TabsOrSpaces, []},
6869

69-
#
70-
## Design Checks
71-
#
72-
# You can customize the priority of any check
73-
# Priority values are: `low, normal, high, higher`
74-
#
75-
{Credo.Check.Design.AliasUsage,
76-
[priority: :low, if_nested_deeper_than: 2, if_called_more_often_than: 0]},
77-
# You can also customize the exit_status of each check.
78-
# If you don't want TODO comments to cause `mix credo` to fail, just
79-
# set this value to 0 (zero).
80-
#
81-
{Credo.Check.Design.TagTODO, [exit_status: 0]},
82-
{Credo.Check.Design.TagFIXME, []},
70+
#
71+
## Design Checks
72+
#
73+
# You can customize the priority of any check
74+
# Priority values are: `low, normal, high, higher`
75+
#
76+
{Credo.Check.Design.AliasUsage,
77+
[priority: :low, if_nested_deeper_than: 2, if_called_more_often_than: 0]},
78+
# You can also customize the exit_status of each check.
79+
# If you don't want TODO comments to cause `mix credo` to fail, just
80+
# set this value to 0 (zero).
81+
#
82+
{Credo.Check.Design.TagTODO, [exit_status: 0]},
83+
{Credo.Check.Design.TagFIXME, []},
8384

84-
#
85-
## Readability Checks
86-
#
87-
{Credo.Check.Readability.AliasOrder, []},
88-
{Credo.Check.Readability.FunctionNames, []},
89-
{Credo.Check.Readability.LargeNumbers, []},
90-
{Credo.Check.Readability.MaxLineLength, [priority: :low, max_length: 120]},
91-
{Credo.Check.Readability.ModuleAttributeNames, []},
92-
{Credo.Check.Readability.ModuleDoc, []},
93-
{Credo.Check.Readability.ModuleNames, []},
94-
{Credo.Check.Readability.ParenthesesInCondition, []},
95-
{Credo.Check.Readability.ParenthesesOnZeroArityDefs, []},
96-
{Credo.Check.Readability.PredicateFunctionNames, []},
97-
{Credo.Check.Readability.PreferImplicitTry, []},
98-
{Credo.Check.Readability.RedundantBlankLines, []},
99-
{Credo.Check.Readability.Semicolons, []},
100-
{Credo.Check.Readability.SpaceAfterCommas, []},
101-
{Credo.Check.Readability.StringSigils, []},
102-
{Credo.Check.Readability.TrailingBlankLine, []},
103-
{Credo.Check.Readability.TrailingWhiteSpace, []},
104-
{Credo.Check.Readability.UnnecessaryAliasExpansion, []},
105-
{Credo.Check.Readability.VariableNames, []},
85+
#
86+
## Readability Checks
87+
#
88+
{Credo.Check.Readability.AliasOrder, []},
89+
{Credo.Check.Readability.FunctionNames, []},
90+
{Credo.Check.Readability.LargeNumbers, []},
91+
{Credo.Check.Readability.MaxLineLength, [priority: :low, max_length: 120]},
92+
{Credo.Check.Readability.ModuleAttributeNames, []},
93+
{Credo.Check.Readability.ModuleDoc, []},
94+
{Credo.Check.Readability.ModuleNames, []},
95+
{Credo.Check.Readability.ParenthesesInCondition, []},
96+
{Credo.Check.Readability.ParenthesesOnZeroArityDefs, []},
97+
{Credo.Check.Readability.PredicateFunctionNames, []},
98+
{Credo.Check.Readability.PreferImplicitTry, []},
99+
{Credo.Check.Readability.RedundantBlankLines, []},
100+
{Credo.Check.Readability.Semicolons, []},
101+
{Credo.Check.Readability.SpaceAfterCommas, []},
102+
{Credo.Check.Readability.StringSigils, []},
103+
{Credo.Check.Readability.TrailingBlankLine, []},
104+
{Credo.Check.Readability.TrailingWhiteSpace, []},
105+
{Credo.Check.Readability.UnnecessaryAliasExpansion, []},
106+
{Credo.Check.Readability.VariableNames, []},
106107

107-
#
108-
## Refactoring Opportunities
109-
#
110-
{Credo.Check.Refactor.CondStatements, []},
111-
{Credo.Check.Refactor.CyclomaticComplexity, []},
112-
{Credo.Check.Refactor.FunctionArity, []},
113-
{Credo.Check.Refactor.LongQuoteBlocks, []},
114-
# {Credo.Check.Refactor.MapInto, []},
115-
{Credo.Check.Refactor.MatchInCondition, []},
116-
{Credo.Check.Refactor.NegatedConditionsInUnless, []},
117-
{Credo.Check.Refactor.NegatedConditionsWithElse, []},
118-
{Credo.Check.Refactor.Nesting, []},
119-
{Credo.Check.Refactor.UnlessWithElse, []},
120-
{Credo.Check.Refactor.WithClauses, []},
108+
#
109+
## Refactoring Opportunities
110+
#
111+
{Credo.Check.Refactor.CondStatements, []},
112+
{Credo.Check.Refactor.CyclomaticComplexity, []},
113+
{Credo.Check.Refactor.FunctionArity, []},
114+
{Credo.Check.Refactor.LongQuoteBlocks, []},
115+
# {Credo.Check.Refactor.MapInto, []},
116+
{Credo.Check.Refactor.MatchInCondition, []},
117+
{Credo.Check.Refactor.NegatedConditionsInUnless, []},
118+
{Credo.Check.Refactor.NegatedConditionsWithElse, []},
119+
{Credo.Check.Refactor.Nesting, []},
120+
{Credo.Check.Refactor.UnlessWithElse, []},
121+
{Credo.Check.Refactor.WithClauses, []},
121122

122-
#
123-
## Warnings
124-
#
125-
{Credo.Check.Warning.ApplicationConfigInModuleAttribute, []},
126-
{Credo.Check.Warning.BoolOperationOnSameValues, []},
127-
{Credo.Check.Warning.ExpensiveEmptyEnumCheck, []},
128-
{Credo.Check.Warning.IExPry, []},
129-
{Credo.Check.Warning.IoInspect, []},
130-
# {Credo.Check.Warning.LazyLogging, []},
131-
{Credo.Check.Warning.MixEnv, false},
132-
{Credo.Check.Warning.OperationOnSameValues, []},
133-
{Credo.Check.Warning.OperationWithConstantResult, []},
134-
{Credo.Check.Warning.RaiseInsideRescue, []},
135-
{Credo.Check.Warning.UnusedEnumOperation, []},
136-
{Credo.Check.Warning.UnusedFileOperation, []},
137-
{Credo.Check.Warning.UnusedKeywordOperation, []},
138-
{Credo.Check.Warning.UnusedListOperation, []},
139-
{Credo.Check.Warning.UnusedPathOperation, []},
140-
{Credo.Check.Warning.UnusedRegexOperation, []},
141-
{Credo.Check.Warning.UnusedStringOperation, []},
142-
{Credo.Check.Warning.UnusedTupleOperation, []},
143-
{Credo.Check.Warning.UnsafeExec, []},
123+
#
124+
## Warnings
125+
#
126+
{Credo.Check.Warning.ApplicationConfigInModuleAttribute, []},
127+
{Credo.Check.Warning.BoolOperationOnSameValues, []},
128+
{Credo.Check.Warning.ExpensiveEmptyEnumCheck, []},
129+
{Credo.Check.Warning.IExPry, []},
130+
{Credo.Check.Warning.IoInspect, []},
131+
# {Credo.Check.Warning.LazyLogging, []},
132+
{Credo.Check.Warning.OperationOnSameValues, []},
133+
{Credo.Check.Warning.OperationWithConstantResult, []},
134+
{Credo.Check.Warning.RaiseInsideRescue, []},
135+
{Credo.Check.Warning.UnusedEnumOperation, []},
136+
{Credo.Check.Warning.UnusedFileOperation, []},
137+
{Credo.Check.Warning.UnusedKeywordOperation, []},
138+
{Credo.Check.Warning.UnusedListOperation, []},
139+
{Credo.Check.Warning.UnusedPathOperation, []},
140+
{Credo.Check.Warning.UnusedRegexOperation, []},
141+
{Credo.Check.Warning.UnusedStringOperation, []},
142+
{Credo.Check.Warning.UnusedTupleOperation, []},
143+
{Credo.Check.Warning.UnsafeExec, []}
144144

145-
#
146-
# Checks scheduled for next check update (opt-in for now, just replace `false` with `[]`)
145+
#
146+
# Checks scheduled for next check update (opt-in for now, just replace `false` with `[]`)
147147

148-
#
149-
# Controversial and experimental checks (opt-in, just replace `false` with `[]`)
150-
#
151-
{Credo.Check.Consistency.MultiAliasImportRequireUse, false},
152-
{Credo.Check.Consistency.UnusedVariableNames, false},
153-
{Credo.Check.Design.DuplicatedCode, false},
154-
{Credo.Check.Readability.AliasAs, false},
155-
{Credo.Check.Readability.BlockPipe, false},
156-
{Credo.Check.Readability.ImplTrue, false},
157-
{Credo.Check.Readability.MultiAlias, false},
158-
{Credo.Check.Readability.SeparateAliasRequire, false},
159-
{Credo.Check.Readability.SinglePipe, false},
160-
{Credo.Check.Readability.Specs, false},
161-
{Credo.Check.Readability.StrictModuleLayout, false},
162-
{Credo.Check.Readability.WithCustomTaggedTuple, false},
163-
{Credo.Check.Refactor.ABCSize, false},
164-
{Credo.Check.Refactor.AppendSingleItem, false},
165-
{Credo.Check.Refactor.DoubleBooleanNegation, false},
166-
{Credo.Check.Refactor.ModuleDependencies, false},
167-
{Credo.Check.Refactor.NegatedIsNil, false},
168-
{Credo.Check.Refactor.PipeChainStart, false},
169-
{Credo.Check.Refactor.VariableRebinding, false},
170-
{Credo.Check.Warning.LeakyEnvironment, false},
171-
{Credo.Check.Warning.MapGetUnsafePass, false},
172-
{Credo.Check.Warning.UnsafeToAtom, false}
173-
174-
#
175-
# Custom checks can be created using `mix credo.gen.check`.
176-
#
177-
]
148+
#
149+
# Custom checks can be created using `mix credo.gen.check`.
150+
#
151+
],
152+
disabled: [
153+
{Credo.Check.Warning.MixEnv, []},
154+
#
155+
# Controversial and experimental checks (opt-in, just replace `false` with `[]`)
156+
#
157+
{Credo.Check.Consistency.MultiAliasImportRequireUse, []},
158+
{Credo.Check.Consistency.UnusedVariableNames, []},
159+
{Credo.Check.Design.DuplicatedCode, []},
160+
{Credo.Check.Readability.AliasAs, []},
161+
{Credo.Check.Readability.BlockPipe, []},
162+
{Credo.Check.Readability.ImplTrue, []},
163+
{Credo.Check.Readability.MultiAlias, []},
164+
{Credo.Check.Readability.SeparateAliasRequire, []},
165+
{Credo.Check.Readability.SinglePipe, []},
166+
{Credo.Check.Readability.Specs, []},
167+
{Credo.Check.Readability.StrictModuleLayout, []},
168+
{Credo.Check.Readability.WithCustomTaggedTuple, []},
169+
{Credo.Check.Refactor.ABCSize, []},
170+
{Credo.Check.Refactor.AppendSingleItem, []},
171+
{Credo.Check.Refactor.DoubleBooleanNegation, []},
172+
{Credo.Check.Refactor.ModuleDependencies, []},
173+
{Credo.Check.Refactor.NegatedIsNil, []},
174+
{Credo.Check.Refactor.PipeChainStart, []},
175+
{Credo.Check.Refactor.VariableRebinding, []},
176+
{Credo.Check.Warning.LeakyEnvironment, []},
177+
{Credo.Check.Warning.MapGetUnsafePass, []},
178+
{Credo.Check.Warning.UnsafeToAtom, []}
179+
]
180+
}
178181
}
179182
]
180183
}

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
# mix / elixir
4+
- package-ecosystem: "mix" # See documentation for possible values
5+
directory: "/" # Location of package manifests
6+
schedule:
7+
interval: "weekly"
8+
# limit 3 prs
9+
open-pull-requests-limit: 3

0 commit comments

Comments
 (0)