From 59a675ad71f5d9c2b59923d43dd5a150b5eb62d2 Mon Sep 17 00:00:00 2001 From: Firehose Bot Date: Tue, 24 Mar 2026 14:41:58 +0000 Subject: [PATCH] Linting rule only for dev and test Production build broke because our custom lint rule was compiled. The credo linter is not available and not necessary in production. Solution: create separate directory for dev tools. --- app/.credo.exs | 2 +- app/{lib => lib_dev}/firehose/checks/no_conn_shadowing.ex | 0 app/mix.exs | 3 ++- 3 files changed, 3 insertions(+), 2 deletions(-) rename app/{lib => lib_dev}/firehose/checks/no_conn_shadowing.ex (100%) diff --git a/app/.credo.exs b/app/.credo.exs index 5638a4b..0a5f34a 100644 --- a/app/.credo.exs +++ b/app/.credo.exs @@ -41,7 +41,7 @@ # If you create your own checks, you must specify the source files for # them here, so they can be loaded by Credo before running the analysis. # - requires: ["lib/firehose/checks/"], + requires: ["lib_dev/firehose/checks/"], # # If you want to enforce a style guide and need a more traditional linting # experience, you can change `strict` to `true` below: diff --git a/app/lib/firehose/checks/no_conn_shadowing.ex b/app/lib_dev/firehose/checks/no_conn_shadowing.ex similarity index 100% rename from app/lib/firehose/checks/no_conn_shadowing.ex rename to app/lib_dev/firehose/checks/no_conn_shadowing.ex diff --git a/app/mix.exs b/app/mix.exs index bbb6131..f50949a 100644 --- a/app/mix.exs +++ b/app/mix.exs @@ -32,7 +32,8 @@ defmodule Firehose.MixProject do end # Specifies which paths to compile per environment. - defp elixirc_paths(:test), do: ["lib", "test/support"] + defp elixirc_paths(:test), do: ["lib", "lib_dev", "test/support"] + defp elixirc_paths(:dev), do: ["lib", "lib_dev"] defp elixirc_paths(_), do: ["lib"] # Specifies your project dependencies.