neiam
/apollos_crib
It's Apollo's Crib
public · Issues · Pulls 1 · Labels · Forks · Compare · Actions failure · Badges · Packages
⭐
Log in to mark this repository.
Credo: ExSlop's checks too
453b3df · Gabe Morell · 2026-11-04 21:11
Message
{commit_body(@commit)}
Files changed
modified
.credo.exs
+11
−2
@@ -1,10 +1,12 @@
| 1 | 1 | # Credo's default checks, with two changes: functions may nest one level |
| 2 | −# deeper than the default, and @moduledoc isn't required. | |
| 2 | +# deeper than the default, and @moduledoc isn't required. ExSlop adds its | |
| 3 | +# recommended checks (https://github.com/elixir-vibe/ex_slop). | |
| 3 | 4 | # CI runs `mix credo` as a warning (.forgejo/workflows/credo.yml). |
| 4 | 5 | %{ |
| 5 | 6 | configs: [ |
| 6 | 7 | %{ |
| 7 | 8 | name: "default", |
| 9 | + plugins: [{ExSlop, []}], | |
| 8 | 10 | files: %{ |
| 9 | 11 | included: [ |
| 10 | 12 | "lib/", |
@@ -19,7 +21,14 @@
| 19 | 21 | excluded: [~r"/_build/", ~r"/deps/", ~r"/node_modules/"] |
| 20 | 22 | }, |
| 21 | 23 | checks: %{ |
| 22 | − extra: [{Credo.Check.Refactor.Nesting, [max_nesting: 3]}], | |
| 24 | + extra: [ | |
| 25 | + {Credo.Check.Refactor.Nesting, [max_nesting: 3]}, | |
| 26 | + # Speed checks, which tests don't need: `assert length(x) == 2` | |
| 27 | + # says more when it fails than a pattern match does. | |
| 28 | + {ExSlop.Check.Refactor.LengthComparison, [files: %{excluded: [~r"(^|/)test/"]}]}, | |
| 29 | + {ExSlop.Check.Warning.RepoAllThenFilter, [files: %{excluded: [~r"(^|/)test/"]}]}, | |
| 30 | + {ExSlop.Check.Warning.PathExpandPriv, [files: %{excluded: [~r"(^|/)test/"]}]} | |
| 31 | + ], | |
| 23 | 32 | disabled: [{Credo.Check.Readability.ModuleDoc, []}] |
| 24 | 33 | } |
| 25 | 34 | } |
modified
mix.exs
+1
−0
@@ -51,6 +51,7 @@ defmodule ApollosCrib.MixProject do
| 51 | 51 | defp deps do |
| 52 | 52 | [ |
| 53 | 53 | {:credo, "~> 1.7", only: [:dev, :test], runtime: false}, |
| 54 | + {:ex_slop, "~> 0.4", only: [:dev, :test], runtime: false}, | |
| 54 | 55 | {:sentry, "~> 8.0"}, |
| 55 | 56 | {:jason, "~> 1.1"}, |
| 56 | 57 | # sentry 8 asks for ~> 1.8; see RoomSanctum.SentryClient. |
modified
mix.lock
+1
−0
@@ -23,6 +23,7 @@
| 23 | 23 | "elixir_make": {:hex, :elixir_make, "0.9.0", "6484b3cd8c0cee58f09f05ecaf1a140a8c97670671a6a0e7ab4dc326c3109726", [:mix], [], "hexpm", "db23d4fd8b757462ad02f8aa73431a426fe6671c80b200d9710caf3d1dd0ffdb"}, |
| 24 | 24 | "eqrcode": {:hex, :eqrcode, "0.2.1", "d12838813e8fc87b8940cc05f9baadb189031f6009facdc56ff074375ec73b6e", [:mix], [], "hexpm", "d5828a222b904c68360e7dc2a40c3ef33a1328b7c074583898040f389f928025"}, |
| 25 | 25 | "esbuild": {:hex, :esbuild, "0.10.0", "b0aa3388a1c23e727c5a3e7427c932d89ee791746b0081bbe56103e9ef3d291f", [:mix], [{:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "468489cda427b974a7cc9f03ace55368a83e1a7be12fba7e30969af78e5f8c70"}, |
| 26 | + "ex_slop": {:hex, :ex_slop, "0.4.5", "4e3ea38397d08d422f8e92e4cef16877e4a31a93c6abd07b494f4458e37c3ce2", [:mix], [{:credo, "~> 1.7", [hex: :credo, repo: "hexpm", optional: false]}], "hexpm", "174c1ce4da612f7d3e93734d08d81d93774bacb6a8e86123e7d6876369a2df81"}, | |
| 26 | 27 | "expo": {:hex, :expo, "1.1.0", "f7b9ed7fb5745ebe1eeedf3d6f29226c5dd52897ac67c0f8af62a07e661e5c75", [:mix], [], "hexpm", "fbadf93f4700fb44c331362177bdca9eeb8097e8b0ef525c9cc501cb9917c960"}, |
| 27 | 28 | "file_system": {:hex, :file_system, "1.1.0", "08d232062284546c6c34426997dd7ef6ec9f8bbd090eb91780283c9016840e8f", [:mix], [], "hexpm", "bfcf81244f416871f2a2e15c1b515287faa5db9c6bcf290222206d120b3d43f6"}, |
| 28 | 29 | "finch": {:hex, :finch, "0.23.0", "e3f9287ac25a8832f848b144c2b57346aac65b205e2e0629a52adfe6507fd837", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.8", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 1.1", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "80e58d3f936f57e3fdf404f83a3642897ae6d9fb642934e46da4d8fe761b99d5"}, |
Parents: 063bd4c