mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-11-27 02:19:27 +03:00
Give less useless details in NoUnused rules
This commit is contained in:
parent
3d30a56cb0
commit
61aaf0f873
@ -481,11 +481,7 @@ finalProjectEvaluation projectContext =
|
||||
errorInformation : Node String -> { message : String, details : List String }
|
||||
errorInformation node =
|
||||
{ message = "Type constructor `" ++ Node.value node ++ "` is not used."
|
||||
, details =
|
||||
[ "This type constructor is never used. It might be handled everywhere it might appear, but there is no location where this value actually gets created."
|
||||
, "You should either use this value somewhere, or remove it at the location I pointed at."
|
||||
, "If you remove it, you may find that other pieces of code are never used, and can themselves be removed too. This could end up simplifying your code a lot."
|
||||
]
|
||||
, details = [ "This type constructor is never used. It might be handled everywhere it might appear, but there is no location where this value actually gets created." ]
|
||||
}
|
||||
|
||||
|
||||
|
@ -82,8 +82,6 @@ packageElmJson =
|
||||
details : List String
|
||||
details =
|
||||
[ "This type constructor is never used. It might be handled everywhere it might appear, but there is no location where this value actually gets created."
|
||||
, "You should either use this value somewhere, or remove it at the location I pointed at."
|
||||
, "If you remove it, you may find that other pieces of code are never used, and can themselves be removed too. This could end up simplifying your code a lot."
|
||||
]
|
||||
|
||||
|
||||
|
@ -13,7 +13,6 @@ testRule =
|
||||
details : List String
|
||||
details =
|
||||
[ "You should either use this value somewhere, or remove it at the location I pointed at."
|
||||
, "If you remove it, you may find that other pieces of code are never used, and can themselves be removed too. This could end up simplifying your code a lot."
|
||||
]
|
||||
|
||||
|
||||
|
@ -132,10 +132,7 @@ error : Dict String VariableInfo -> VariableInfo -> String -> Error {}
|
||||
error declaredModules variableInfo name =
|
||||
Rule.error
|
||||
{ message = variableTypeToString variableInfo.variableType ++ " `" ++ name ++ "` is not used" ++ variableTypeWarning variableInfo.variableType
|
||||
, details =
|
||||
[ "You should either use this value somewhere, or remove it at the location I pointed at."
|
||||
, "If you remove it, you may find that other pieces of code are never used, and can themselves be removed too. This could end up simplifying your code a lot."
|
||||
]
|
||||
, details = [ "You should either use this value somewhere, or remove it at the location I pointed at." ]
|
||||
}
|
||||
variableInfo.under
|
||||
|> addFix declaredModules variableInfo
|
||||
|
Loading…
Reference in New Issue
Block a user