diff --git a/.credo.exs b/.credo.exs index 4eddee8..3a4f8dc 100644 --- a/.credo.exs +++ b/.credo.exs @@ -82,8 +82,14 @@ # You can customize the priority of any check # Priority values are: `low, normal, high, higher` # + # AliasUsage only for lib and support; test files excluded (many nested module refs by design) {Credo.Check.Design.AliasUsage, - [priority: :low, if_nested_deeper_than: 2, if_called_more_often_than: 0]}, + [ + priority: :low, + if_nested_deeper_than: 2, + if_called_more_often_than: 0, + files: %{excluded: ["test/"]} + ]}, {Credo.Check.Design.TagFIXME, []}, # You can also customize the exit_status of each check. # If you don't want TODO comments to cause `mix credo` to fail, just diff --git a/.drone.yml b/.drone.yml index 5eefd61..70ea161 100644 --- a/.drone.yml +++ b/.drone.yml @@ -52,7 +52,7 @@ steps: # Check for dependencies that are not maintained anymore - mix hex.audit # Provide hints for improving code quality - - mix credo + - mix credo --strict # Check that translations are up to date - mix gettext.extract --check-up-to-date @@ -159,7 +159,7 @@ steps: # Check for dependencies that are not maintained anymore - mix hex.audit # Provide hints for improving code quality - - mix credo + - mix credo --strict # Check that translations are up to date - mix gettext.extract --check-up-to-date diff --git a/Justfile b/Justfile index bce8bf6..f3ad5a3 100644 --- a/Justfile +++ b/Justfile @@ -31,7 +31,7 @@ gettext: lint: mix format --check-formatted mix compile --warnings-as-errors - mix credo + mix credo --strict # Check that all German translations are filled (UI must be in German) @bash -c 'for file in priv/gettext/de/LC_MESSAGES/*.po; do awk "/^msgid \"\"$/{header=1; next} /^msgid /{header=0} /^msgstr \"\"$/ && !header{print FILENAME\":\"NR\": \" \$0; exit 1}" "$file" || exit 1; done' mix gettext.extract --check-up-to-date