mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-09-11 16:16:09 +03:00
Report an error when the version could not be found
This commit is contained in:
parent
da70f8c64f
commit
2cb805bf91
@ -84,8 +84,17 @@ extraFilesVisitor : List { path : String, content : String } -> ProjectContext -
|
||||
extraFilesVisitor files context =
|
||||
case List.head files of
|
||||
Just { content } ->
|
||||
( [], context )
|
||||
if String.contains context.elmJsonVersion content then
|
||||
( [], context )
|
||||
|
||||
else
|
||||
( [ Rule.globalError
|
||||
{ message = "Missing entry in CHANGELOG.md for version " ++ context.elmJsonVersion
|
||||
, details = [ "It seems you have or are ready to release a new version of your package, but forgot to include releases notes for it in your CHANGELOG.md file." ]
|
||||
}
|
||||
]
|
||||
, context
|
||||
)
|
||||
|
||||
Nothing ->
|
||||
--( [ Rule.error { useErrorForModule = () } "Missing CHANGELOG.md file" ], context
|
||||
( [], context )
|
||||
|
Loading…
Reference in New Issue
Block a user