Skip to content
Snippets Groups Projects
Unverified Commit 4b72242a authored by Mikhail Glushenkov's avatar Mikhail Glushenkov Committed by GitHub
Browse files

Merge pull request #5230 from haskell/lspitzner-patch-1

Fix warning message for `cabal-version` field (see #5108)
parents db41fbde 661c0a44
No related branches found
No related tags found
No related merge requests found
......@@ -1115,12 +1115,14 @@ checkCabalVersion pkg =
++ "range syntax rather than a simple version number. Use "
++ "'cabal-version: >= " ++ display (specVersion pkg) ++ "'."
-- check syntax of cabal-version field
, check (specVersion pkg >= mkVersion [1,12]
&& not simpleSpecVersionSyntax) $
(if specVersion pkg >= mkVersion [2,0] then PackageDistSuspicious else PackageDistSuspiciousWarn) $
"Packages relying on Cabal 1.12 or later should specify a "
++ "version range of the form 'cabal-version: x.y'. Use "
++ "'cabal-version: " ++ display (specVersion pkg) ++ "'."
++ "specific version of the Cabal spec of the form "
++ "'cabal-version: x.y'. "
++ "Use 'cabal-version: " ++ display (specVersion pkg) ++ "'."
-- check use of test suite sections
, checkVersion [1,8] (not (null $ testSuites pkg)) $
......
......@@ -4,4 +4,4 @@ The 'license' field is missing or is NONE.
'ghc-options: -threaded' has no effect for libraries. It should only be used for executables.
'ghc-options: -rtsopts' has no effect for libraries. It should only be used for executables.
'ghc-options: -with-rtsopts' has no effect for libraries. It should only be used for executables.
Packages relying on Cabal 1.12 or later should specify a version range of the form 'cabal-version: x.y'. Use 'cabal-version: 1.12'.
Packages relying on Cabal 1.12 or later should specify a specific version of the Cabal spec of the form 'cabal-version: x.y'. Use 'cabal-version: 1.12'.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment