Skip to content

Commit a77a29e

Browse files
committed
fix: Disable Credo SpecWithStruct warning
Disable the SpecWithStruct check as it's intentional to use %HTTP.Promise{} in @SPEC declarations for clear API documentation. This is a common pattern in Elixir libraries that expose custom struct types, and the warning doesn't indicate an actual issue with the code.
1 parent 879fd00 commit a77a29e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.credo.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@
151151
{Credo.Check.Warning.OperationOnSameValues, []},
152152
{Credo.Check.Warning.OperationWithConstantResult, []},
153153
{Credo.Check.Warning.RaiseInsideRescue, []},
154-
{Credo.Check.Warning.SpecWithStruct, []},
154+
# Allow structs in specs - needed for Promise return types
155+
{Credo.Check.Warning.SpecWithStruct, false},
155156
{Credo.Check.Warning.UnsafeExec, []},
156157
{Credo.Check.Warning.UnusedEnumOperation, []},
157158
{Credo.Check.Warning.UnusedFileOperation, []},

0 commit comments

Comments
 (0)