Repository navigation
Warn if -- token is found. Don't warn if it's "--". - #4973
Merged
Merged
Conversation
23Skidoo
approved these changes
Dec 24, 2017
23Skidoo
left a comment
Member
There was a problem hiding this comment.
LGTM modulo one minor comment.
| when (s == "--") $ parsecWarning PWTDoubleDash $ unwords | ||
| [ "Double-dash token found." | ||
| , "Note: there are no end-of-line comments in .cabal files, only whole line comments." | ||
| , "Use \"--\" to silent this warning, if you actually want -- token" |
phadej
force-pushed
the
issue-2681-suspicious-token
branch
from
December 24, 2017 22:47
a0c12cd to
0223f6a
Compare
Resolves haskell#2681 Cabal files don't have trailing line comments. In many fields they simply cause parse errors, but e.g. in extra-source-files virtually everything is accepted. As there is simple work around if people actually want double-dash, let's warn about bare one.
phadej
force-pushed
the
issue-2681-suspicious-token
branch
from
December 25, 2017 10:54
0223f6a to
93a2171
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #2681
Cabal files don't have trailing line comments. In many fields they
simply cause parse errors, but e.g. in extra-source-files
virtually everything is accepted. As there is simple
work around if people actually want double-dash, let's warn
about bare one.
Please include the following checklist in your PR:
[ci skip]is used to avoid triggering the build bots.Please also shortly describe how you tested your change. Bonus points for added tests!