neiam
/gitgud
Git Gud
public · Issues · Pulls · Labels · Forks · Compare · Actions success · Badges · Packages
⭐
1
Log in to mark this repository.
Credo: ExSlop's checks too
3e433f5 · 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
@@ -41,6 +41,7 @@ defmodule GitGud.MixProject do
| 41 | 41 | defp deps do |
| 42 | 42 | [ |
| 43 | 43 | {:credo, "~> 1.7", only: [:dev, :test], runtime: false}, |
| 44 | + {:ex_slop, "~> 0.4", only: [:dev, :test], runtime: false}, | |
| 44 | 45 | {:bcrypt_elixir, "~> 3.0"}, |
| 45 | 46 | {:phoenix, "~> 1.8.5"}, |
| 46 | 47 | {:phoenix_ecto, "~> 4.5"}, |
modified
mix.lock
+1
−0
@@ -19,6 +19,7 @@
| 19 | 19 | "esbuild": {:hex, :esbuild, "0.10.0", "b0aa3388a1c23e727c5a3e7427c932d89ee791746b0081bbe56103e9ef3d291f", [:mix], [{:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "468489cda427b974a7cc9f03ace55368a83e1a7be12fba7e30969af78e5f8c70"}, |
| 20 | 20 | "ex_aws": {:hex, :ex_aws, "2.6.1", "194582c7b09455de8a5ab18a0182e6dd937d53df82be2e63c619d01bddaccdfa", [:mix], [{:configparser_ex, "~> 5.0", [hex: :configparser_ex, repo: "hexpm", optional: true]}, {:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:jsx, "~> 2.8 or ~> 3.0", [hex: :jsx, repo: "hexpm", optional: true]}, {:mime, "~> 1.2 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:req, "~> 0.5.10 or ~> 0.6 or ~> 1.0", [hex: :req, repo: "hexpm", optional: true]}, {:sweet_xml, "~> 0.7", [hex: :sweet_xml, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "67842a08c90a1d9a09dbe4ac05754175c7ca253abe4912987c759395d4bd9d26"}, |
| 21 | 21 | "ex_aws_s3": {:hex, :ex_aws_s3, "2.5.9", "862b7792f2e60d7010e2920d79964e3fab289bc0fd951b0ba8457a3f7f9d1199", [:mix], [{:ex_aws, "~> 2.0", [hex: :ex_aws, repo: "hexpm", optional: false]}, {:sweet_xml, ">= 0.0.0", [hex: :sweet_xml, repo: "hexpm", optional: true]}], "hexpm", "a480d2bb2da64610014021629800e1e9457ca5e4a62f6775bffd963360c2bf90"}, |
| 22 | + "ex_slop": {:hex, :ex_slop, "0.4.5", "4e3ea38397d08d422f8e92e4cef16877e4a31a93c6abd07b494f4458e37c3ce2", [:mix], [{:credo, "~> 1.7", [hex: :credo, repo: "hexpm", optional: false]}], "hexpm", "174c1ce4da612f7d3e93734d08d81d93774bacb6a8e86123e7d6876369a2df81"}, | |
| 22 | 23 | "expo": {:hex, :expo, "1.1.1", "4202e1d2ca6e2b3b63e02f69cfe0a404f77702b041d02b58597c00992b601db5", [:mix], [], "hexpm", "5fb308b9cb359ae200b7e23d37c76978673aa1b06e2b3075d814ce12c5811640"}, |
| 23 | 24 | "file_system": {:hex, :file_system, "1.1.1", "31864f4685b0148f25bd3fbef2b1228457c0c89024ad67f7a81a3ffbc0bbad3a", [:mix], [], "hexpm", "7a15ff97dfe526aeefb090a7a9d3d03aa907e100e262a0f8f7746b78f8f87a5d"}, |
| 24 | 25 | "finch": {:hex, :finch, "0.24.0", "4022b6194e907b6d9b597c168001cac38e488a35fe36cef9d8297e3159782510", [: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", "33ba40069c3587c2f99f9125b766e19dad87d6d54be3c6961db2304df04cef00"}, |
Parents: f611475