mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-09-11 16:16:09 +03:00
Extract to function
This commit is contained in:
parent
a549883b89
commit
3538b75cac
@ -124,13 +124,7 @@ extraFilesVisitor changelogPath files context =
|
||||
( [], context )
|
||||
|
||||
else
|
||||
( [ 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." ]
|
||||
}
|
||||
{ start = { row = 2, column = 1 }, end = { row = 2, column = 12 } }
|
||||
]
|
||||
( [ reportError fileKey elmJsonVersion content ]
|
||||
, context
|
||||
)
|
||||
|
||||
@ -174,3 +168,13 @@ extraFilesVisitor changelogPath files context =
|
||||
]
|
||||
, context
|
||||
)
|
||||
|
||||
|
||||
reportError : Rule.ExtraFileKey -> String -> String -> Rule.Error scope
|
||||
reportError fileKey elmJsonVersion content =
|
||||
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." ]
|
||||
}
|
||||
{ start = { row = 1, column = 1 }, end = { row = 1, column = 70 } }
|
||||
|
Loading…
Reference in New Issue
Block a user