Skip to content

Commit

Permalink
Added QA check requiring cabal-version: >= 1.9.2 for packages with te…
Browse files Browse the repository at this point in the history
…st-suite stanzas

Ticket #215 (Overhaul support for packages' tests).
  • Loading branch information
ttuegel committed Jun 16, 2010
1 parent dc09474 commit e10fe93
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Distribution/PackageDescription/Check.hs
Original file line number Diff line number Diff line change
Expand Up @@ -729,8 +729,14 @@ checkCabalVersion :: PackageDescription -> [PackageCheck]
checkCabalVersion pkg =
catMaybes [

-- check use of test suite stanzas
checkVersion [1,9,2] (not (null $ testSuites pkg)) $
PackageDistInexcusable $
"The package uses test suite stanzas. To use this new syntax, "
++ "the package needs to specify at least 'cabal-version: >= 1.9.2'."

-- check use of "foo (>= 1.0 && < 1.4) || >=1.8 " version-range syntax
checkVersion [1,8] (not (null versionRangeExpressions)) $
, checkVersion [1,8] (not (null versionRangeExpressions)) $
PackageDistInexcusable $
"The package uses full version-range expressions "
++ "in a 'build-depends' field: "
Expand Down

0 comments on commit e10fe93

Please sign in to comment.