From 19619665e506a7b061b828c00f96124920a282c9 Mon Sep 17 00:00:00 2001 From: An Duong Date: Thu, 22 Sep 2022 22:51:59 +0700 Subject: [PATCH 1/2] Improve the credo rule --- .credo.exs | 3 +-- priv/templates/nimble_template/.credo.exs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.credo.exs b/.credo.exs index c1c33a33..4c4dc1fa 100644 --- a/.credo.exs +++ b/.credo.exs @@ -165,8 +165,7 @@ {Credo.Check.Readability.StrictModuleLayout, [ order: - ~w/shortdoc moduledoc behaviour use import alias require module_attribute defstruct callback public_fun private_fun/a, - ignore: ~w/callback_impl/a + ~w/shortdoc moduledoc behaviour use import alias require module_attribute type typep defstruct callback callback_impl public_fun private_fun/a ]}, {Credo.Check.Consistency.MultiAliasImportRequireUse, []}, {Credo.Check.Consistency.UnusedVariableNames, []}, diff --git a/priv/templates/nimble_template/.credo.exs b/priv/templates/nimble_template/.credo.exs index 900f3826..519073dd 100644 --- a/priv/templates/nimble_template/.credo.exs +++ b/priv/templates/nimble_template/.credo.exs @@ -159,8 +159,7 @@ {Credo.Check.Readability.StrictModuleLayout, [ order: - ~w/shortdoc moduledoc behaviour use import alias require module_attribute defstruct callback public_fun private_fun/a, - ignore: ~w/callback_impl/a + ~w/shortdoc moduledoc behaviour use import alias require module_attribute type typep defstruct callback callback_impl public_fun private_fun/a ]}, {Credo.Check.Consistency.MultiAliasImportRequireUse, []}, {Credo.Check.Consistency.UnusedVariableNames, false}, From 18b876563855769b8cc565db4eddcd1fe138f60e Mon Sep 17 00:00:00 2001 From: An Duong Date: Fri, 23 Sep 2022 09:20:42 +0700 Subject: [PATCH 2/2] Improve the rules --- .credo.exs | 2 +- priv/templates/nimble_template/.credo.exs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.credo.exs b/.credo.exs index 4c4dc1fa..9bbd9bc4 100644 --- a/.credo.exs +++ b/.credo.exs @@ -165,7 +165,7 @@ {Credo.Check.Readability.StrictModuleLayout, [ order: - ~w/shortdoc moduledoc behaviour use import alias require module_attribute type typep defstruct callback callback_impl public_fun private_fun/a + ~w/shortdoc moduledoc behaviour use import alias require module_attribute type typep defstruct callback public_macro private_macro callback_impl public_fun private_fun/a ]}, {Credo.Check.Consistency.MultiAliasImportRequireUse, []}, {Credo.Check.Consistency.UnusedVariableNames, []}, diff --git a/priv/templates/nimble_template/.credo.exs b/priv/templates/nimble_template/.credo.exs index 519073dd..cdac8ca5 100644 --- a/priv/templates/nimble_template/.credo.exs +++ b/priv/templates/nimble_template/.credo.exs @@ -159,7 +159,7 @@ {Credo.Check.Readability.StrictModuleLayout, [ order: - ~w/shortdoc moduledoc behaviour use import alias require module_attribute type typep defstruct callback callback_impl public_fun private_fun/a + ~w/shortdoc moduledoc behaviour use import alias require module_attribute type typep defstruct callback public_macro private_macro callback_impl public_fun private_fun/a ]}, {Credo.Check.Consistency.MultiAliasImportRequireUse, []}, {Credo.Check.Consistency.UnusedVariableNames, false},