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 String -> { message : String, details : List String }
|
||||||
errorInformation node =
|
errorInformation node =
|
||||||
{ message = "Type constructor `" ++ Node.value node ++ "` is not used."
|
{ message = "Type constructor `" ++ Node.value node ++ "` is not used."
|
||||||
, details =
|
, 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." ]
|
||||||
[ "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."
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -82,8 +82,6 @@ packageElmJson =
|
|||||||
details : List String
|
details : List String
|
||||||
details =
|
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."
|
[ "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 : List String
|
||||||
details =
|
details =
|
||||||
[ "You should either use this value somewhere, or remove it at the location I pointed at."
|
[ "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 =
|
error declaredModules variableInfo name =
|
||||||
Rule.error
|
Rule.error
|
||||||
{ message = variableTypeToString variableInfo.variableType ++ " `" ++ name ++ "` is not used" ++ variableTypeWarning variableInfo.variableType
|
{ message = variableTypeToString variableInfo.variableType ++ " `" ++ name ++ "` is not used" ++ variableTypeWarning variableInfo.variableType
|
||||||
, details =
|
, details = [ "You should either use this value somewhere, or remove it at the location I pointed at." ]
|
||||||
[ "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."
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
variableInfo.under
|
variableInfo.under
|
||||||
|> addFix declaredModules variableInfo
|
|> addFix declaredModules variableInfo
|
||||||
|
Loading…
Reference in New Issue
Block a user