Skip to content

Commit 6180df2

Browse files
chore: sync files with stordco/common-config-elixir
1 parent 1807c0e commit 6180df2

12 files changed

+380
-51
lines changed

.credo.exs

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# You can give explicit globs or simply directories.
2424
# In the latter case `**/*.{ex,exs}` will be used.
2525
#
26-
included: ["lib/", "priv/", "test/"],
26+
included: ["config/", "lib/", "priv/", "test/"],
2727
excluded: [~r"/_build/", ~r"/deps/", ~r"/node_modules/"]
2828
},
2929
#
@@ -81,7 +81,7 @@
8181
# You can customize the priority of any check
8282
# Priority values are: `low, normal, high, higher`
8383
#
84-
{Credo.Check.Design.AliasUsage, [priority: :low, if_nested_deeper_than: 2, if_called_more_often_than: 2]},
84+
{Credo.Check.Design.AliasUsage, [priority: :low, if_nested_deeper_than: 4, if_called_more_often_than: 2]},
8585
{Credo.Check.Design.DuplicatedCode, false},
8686
# You can also customize the exit_status of each check.
8787
# If you don't want TODO comments to cause `mix credo` to fail, just
@@ -95,7 +95,8 @@
9595
#
9696
{Credo.Check.Readability.AliasAs, false},
9797
{Credo.Check.Readability.AliasOrder, []},
98-
{Credo.Check.Readability.BlockPipe, []},
98+
# We previously had this check enabled, but we have agreed to loosen this restriction to allow for more flexibility.
99+
# {Credo.Check.Readability.BlockPipe, []},
99100
{Credo.Check.Readability.FunctionNames, []},
100101
{Credo.Check.Readability.ImplTrue, []},
101102
{Credo.Check.Readability.LargeNumbers, [trailing_digits: 2]},
@@ -112,14 +113,17 @@
112113
{Credo.Check.Readability.RedundantBlankLines, []},
113114
{Credo.Check.Readability.Semicolons, []},
114115
{Credo.Check.Readability.SeparateAliasRequire, []},
115-
{Credo.Check.Readability.SinglePipe, []},
116+
# We previously had this check enabled, but we have agreed to loosen this restriction.
117+
# Use common sense, piping a single arg into an arity 1 function like `input |> do_something()` should be avoided.
118+
# {Credo.Check.Readability.SinglePipe, []},
116119
{Credo.Check.Readability.SpaceAfterCommas, []},
117120
{Credo.Check.Readability.Specs, false},
118121
{Credo.Check.Readability.StrictModuleLayout,
119122
[
120123
order:
121124
~w(moduledoc behaviour use import require alias module_attribute defstruct callback macrocallback optional_callback)a,
122-
ignore: [:type]
125+
ignore: [:type],
126+
ignore_module_attributes: [:contract, :decorate, :operation, :trace]
123127
]},
124128
{Credo.Check.Readability.StringSigils, []},
125129
{Credo.Check.Readability.TrailingBlankLine, []},
@@ -145,7 +149,8 @@
145149
{Credo.Check.Refactor.NegatedConditionsWithElse, []},
146150
{Credo.Check.Refactor.NegatedIsNil, []},
147151
{Credo.Check.Refactor.Nesting, []},
148-
{Credo.Check.Refactor.PipeChainStart, []},
152+
# We have an exception for `from` which is useful for piping a query into a `Repo` function.
153+
{Credo.Check.Refactor.PipeChainStart, [excluded_functions: ["from"]]},
149154
{Credo.Check.Refactor.UnlessWithElse, []},
150155
{Credo.Check.Refactor.VariableRebinding, false},
151156
{Credo.Check.Refactor.WithClauses, []},
@@ -177,7 +182,17 @@
177182
{Credo.Check.Warning.UnusedPathOperation, []},
178183
{Credo.Check.Warning.UnusedRegexOperation, []},
179184
{Credo.Check.Warning.UnusedStringOperation, []},
180-
{Credo.Check.Warning.UnusedTupleOperation, []}
185+
{Credo.Check.Warning.UnusedTupleOperation, []},
186+
187+
#
188+
## Custom
189+
#
190+
{Credo.Check.Warning.ForbiddenModule,
191+
[
192+
modules: [
193+
{Oban.Worker, "use Oban.Pro.Worker instead"}
194+
]
195+
]}
181196
]
182197
}
183198
]

.github/pull_request_template.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## Related Ticket(s)
2+
3+
<!--
4+
Enter the Jira issue below in the following format: PROJECT-##
5+
-->
6+
7+
## Checklist
8+
9+
<!--
10+
For each bullet, ensure your pr meets the criteria and write a note explaining how this PR relates. Mark them as complete as they are done. All top-level checkboxes should be checked regardless of their relevance to the pr with a note explaining whether they are relevant or not.
11+
-->
12+
13+
- [ ] Code conforms to the [Elixir Styleguide](https://github.com/christopheradams/elixir_style_guide)
14+
15+
## Problem
16+
17+
<!--
18+
What is the problem you're solving or feature you're implementing? Link to any Jira tickets or previous discussions of the issue.
19+
-->
20+
21+
## Details
22+
23+
<!--
24+
Include a brief overview of the technical process you took (or are going to take!) to get from the problem to the solution.
25+
-->

.release-please-config.json renamed to .github/release-please-config-stable.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
"section": "Features",
88
"hidden": false
99
},
10+
{
11+
"type": "hotfix",
12+
"section": "Hotfixes",
13+
"hidden": true
14+
},
1015
{
1116
"type": "fix",
1217
"section": "Bug Fixes",
@@ -16,15 +21,18 @@
1621
"type": "chore",
1722
"section": "Miscellaneous",
1823
"hidden": false
24+
},
25+
{
26+
"type": "docs",
27+
"section": "Miscellaneous",
28+
"hidden": false
1929
}
2030
],
2131
"draft": false,
2232
"draft-pull-request": false,
2333
"packages": {
2434
".": {
25-
"extra-files": [
26-
"README.md"
27-
],
35+
"extra-files": ["README.md"],
2836
"release-type": "elixir"
2937
}
3038
},
File renamed without changes.

0 commit comments

Comments
 (0)