Extract variable

This commit is contained in:
Jeroen Engels 2023-06-03 21:16:15 +02:00
parent ca33d96ef2
commit aa48c3df63

View File

@ -177,13 +177,17 @@ reportError fileKey elmJsonVersion content =
lines : List String
lines =
String.lines content
unreleasedRange : Maybe Range
unreleasedRange =
findUnreleasedRange lines
in
Rule.errorForExtraFile
fileKey
{ message = "Missing entry in CHANGELOG.md for version " ++ 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." ]
}
(case findUnreleasedRange lines of
(case unreleasedRange of
Just range ->
range