-
Notifications
You must be signed in to change notification settings - Fork 723
Add check for "dotlines" with cabal 3.0+ #11571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tbidne
wants to merge
1
commit into
haskell:master
Choose a base branch
from
tbidne:tbidne/11518-check
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+157
−23
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
12 changes: 12 additions & 0 deletions
12
cabal-testsuite/PackageTests/DotlineWarning/Post3.0/cabal.out
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # cabal v2-build | ||
| Warning: The package description file ./main.cabal has warnings: | ||
| main.cabal:21:3: Empty lines with a dot '.' are unnecessary for creating newlines (and treated literally) in cabal 3.0+ | ||
| main.cabal:19:3: Empty lines with a dot '.' are unnecessary for creating newlines (and treated literally) in cabal 3.0+ | ||
| main.cabal:17:3: Empty lines with a dot '.' are unnecessary for creating newlines (and treated literally) in cabal 3.0+ | ||
| main.cabal:15:3: Empty lines with a dot '.' are unnecessary for creating newlines (and treated literally) in cabal 3.0+ | ||
| main.cabal:12:3: Empty lines with a dot '.' are unnecessary for creating newlines (and treated literally) in cabal 3.0+ | ||
| main.cabal:10:3: Empty lines with a dot '.' are unnecessary for creating newlines (and treated literally) in cabal 3.0+ | ||
| Resolving dependencies... | ||
| Build profile: -w ghc-<GHCVER> -O1 | ||
| In order, the following would be built: | ||
| - main-0.1 (lib) (first run) |
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/DotlineWarning/Post3.0/cabal.test.hs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import Test.Cabal.Prelude | ||
|
|
||
| main = cabalTest $ do | ||
| cabal "v2-build" ["--dry-run"] |
26 changes: 26 additions & 0 deletions
26
cabal-testsuite/PackageTests/DotlineWarning/Post3.0/main.cabal
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| cabal-version: 3.0 | ||
|
|
||
| name: main | ||
| version: 0.1 | ||
| build-type: Simple | ||
| category: Test | ||
| maintainer: Joe | ||
| synopsis: | ||
| Test input | ||
| . | ||
| with | ||
| . | ||
| lines | ||
| description: | ||
| . | ||
| Some . description | ||
| . | ||
| spanning . | ||
| . | ||
| multiple lines. | ||
| . | ||
| license: BSD-3-Clause | ||
|
|
||
| library | ||
| build-depends: base | ||
| default-language: Haskell2010 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # cabal v2-build | ||
| Resolving dependencies... | ||
| Build profile: -w ghc-<GHCVER> -O1 | ||
| In order, the following would be built: | ||
| - main-0.1 (lib) (first run) |
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/DotlineWarning/Pre3.0/cabal.test.hs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import Test.Cabal.Prelude | ||
|
|
||
| main = cabalTest $ do | ||
| cabal "v2-build" ["--dry-run"] |
26 changes: 26 additions & 0 deletions
26
cabal-testsuite/PackageTests/DotlineWarning/Pre3.0/main.cabal
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| cabal-version: 2.4 | ||
|
|
||
| name: main | ||
| version: 0.1 | ||
| build-type: Simple | ||
| category: Test | ||
| maintainer: Joe | ||
| synopsis: | ||
| Test input | ||
| . | ||
| with | ||
| . | ||
| lines | ||
| description: | ||
| . | ||
| Some . description | ||
| . | ||
| spanning . | ||
| . | ||
| multiple lines. | ||
| . | ||
| license: BSD-3-Clause | ||
|
|
||
| library | ||
| build-depends: base | ||
| default-language: Haskell2010 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| synopsis: Warning for "dotlines" with cabal 3.0+. | ||
| packages: cabal-install Cabal-syntax | ||
| prs: #11571 | ||
| issues: #11518 | ||
| significance: | ||
|
|
||
| description: { | ||
|
|
||
| Cabal 3.0 changed the parser for "free text" fields (e.g. description) such | ||
| that: | ||
|
|
||
| 1. Empty lines and indentation are preserved. | ||
|
|
||
| 2. Empty lines with a dot '.' (and possible whitespace) are | ||
| interpreted literally; they are no longer interpreted as an | ||
| empty line. | ||
|
|
||
| Consequently, dotlines no longer serve a purpose and only add extra noise, | ||
| hence these are now a warning with `cabal check`. | ||
|
|
||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.