Re-enable Credo CyclomaticComplexity check
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
{Credo.Check.Refactor.Nesting, max_nesting: 3}
|
||||
],
|
||||
disabled: [
|
||||
{Credo.Check.Refactor.CyclomaticComplexity, []},
|
||||
{Credo.Check.Readability.ModuleDoc, []}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -186,6 +186,7 @@ defmodule MusicLibraryWeb.Components.Pagination do
|
||||
@visible_left_pages 3
|
||||
@visible_right_pages 3
|
||||
@middle "..."
|
||||
# credo:disable-for-next-line Credo.Check.Refactor.CyclomaticComplexity
|
||||
defp generate_page_links(pagination_params) do
|
||||
%{
|
||||
total_entries: total_entries,
|
||||
|
||||
@@ -254,6 +254,7 @@ defmodule MusicLibraryWeb.StatsComponents do
|
||||
# The Tailwind build step requires all needed classes to be explicitly referenced
|
||||
# in the source code, and not dynamically generated. This implies that one cannot
|
||||
# (for example) interpolate a number in a class name.
|
||||
# credo:disable-for-next-line Credo.Check.Refactor.CyclomaticComplexity
|
||||
defp stats_class(collection) do
|
||||
case Enum.count(collection) do
|
||||
1 -> "grid-cols-1"
|
||||
|
||||
@@ -10,6 +10,7 @@ defmodule MusicLibrary.ScrobbledTracksFixtures do
|
||||
@doc """
|
||||
Generate a scrobbled track.
|
||||
"""
|
||||
# credo:disable-for-next-line Credo.Check.Refactor.CyclomaticComplexity
|
||||
def track_fixture(attrs \\ %{}) do
|
||||
scrobbled_at_uts =
|
||||
attrs[:scrobbled_at_uts] || System.system_time(:second) - Enum.random(0..86_400)
|
||||
|
||||
Reference in New Issue
Block a user