Skip to content

Commit

Permalink
fix failing elm-analyse checks
Browse files Browse the repository at this point in the history
  • Loading branch information
brandly committed Oct 9, 2019
1 parent 9a60486 commit 742b4f9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
6 changes: 2 additions & 4 deletions src/ASTUtil/Functions.elm
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ isStatic function =
if List.length decl.arguments > 0 then
False

else if Maybe.withDefault False <| Maybe.map (Node.value >> isFunctionSignature) function.signature then
False

else
True
Maybe.withDefault True <|
Maybe.map (Node.value >> isFunctionSignature >> not) function.signature


isFunctionSignature : Signature -> Bool
Expand Down
6 changes: 1 addition & 5 deletions src/Analyser/Checks/DebugCrash.elm
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,7 @@ onExpression (Node range expression) context =
entryForQualifiedExpr : List String -> String -> Bool
entryForQualifiedExpr moduleName f =
if moduleName == [ "Debug" ] then
if f == "todo" then
True

else
False
f == "todo"

else
False
6 changes: 1 addition & 5 deletions src/Analyser/Checks/DebugLog.elm
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,7 @@ onExpression (Node range expression) context =
entryForQualifiedExpr : List String -> String -> Bool
entryForQualifiedExpr moduleName f =
if moduleName == [ "Debug" ] then
if f == "log" then
True

else
False
f == "log"

else
False
2 changes: 1 addition & 1 deletion src/Analyser/Checks/UnnecessaryLiteralBools.elm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Analyser.Configuration exposing (Configuration)
import Analyser.FileContext exposing (FileContext)
import Analyser.Messages.Data as Data exposing (MessageData)
import Analyser.Messages.Schema as Schema
import Elm.Syntax.Expression exposing (Case, Expression(..))
import Elm.Syntax.Expression exposing (Expression(..))
import Elm.Syntax.Node exposing (Node(..))
import Elm.Syntax.Pattern exposing (Pattern(..))

Expand Down

0 comments on commit 742b4f9

Please sign in to comment.