summaryrefslogtreecommitdiff
path: root/utils/mkUserGuidePart
diff options
context:
space:
mode:
authorMaciej Bielecki <zyla@prati.pl>2016-11-21 17:08:45 -0500
committerBen Gamari <ben@smart-cactus.org>2016-11-21 17:08:57 -0500
commit514acfe4c4e61941c2fa2e06cff02f6e4424e5e6 (patch)
tree7b08577f13bb839083d3d194d75069547fb00cd5 /utils/mkUserGuidePart
parentea76a213d14709ded827abeb2246e4daa154e92e (diff)
downloadhaskell-514acfe4c4e61941c2fa2e06cff02f6e4424e5e6.tar.gz
Implement fine-grained `-Werror=...` facility
This patch add new options `-Werror=...`, `-Wwarn=...` and `-Wno-error=...` (synonym for `-Wwarn=...`). Semantics: - `-Werror` marks all warnings as fatal, including those that don't have a warning flag, and CPP warnings. - `-Werror=...` enables a warning and marks it as fatal - `-Wwarn=...` marks a warning as non-fatal, but doesn't disable it Test Plan: validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: mpickering, svenpanne, RyanGlScott, thomie Differential Revision: https://phabricator.haskell.org/D2706 GHC Trac Issues: #11219
Diffstat (limited to 'utils/mkUserGuidePart')
-rw-r--r--utils/mkUserGuidePart/Options/Warnings.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/utils/mkUserGuidePart/Options/Warnings.hs b/utils/mkUserGuidePart/Options/Warnings.hs
index eadb60016e..0f00b51ff4 100644
--- a/utils/mkUserGuidePart/Options/Warnings.hs
+++ b/utils/mkUserGuidePart/Options/Warnings.hs
@@ -31,11 +31,21 @@ warningsOptions =
, flagType = DynamicFlag
, flagReverse = "-Wwarn"
}
+ , flag { flagName = "-Werror=<wflag>"
+ , flagDescription = "make a specific warning fatal"
+ , flagType = DynamicFlag
+ , flagReverse = "-Wwarn=<wflag>"
+ }
, flag { flagName = "-Wwarn"
, flagDescription = "make warnings non-fatal"
, flagType = DynamicFlag
, flagReverse = "-Werror"
}
+ , flag { flagName = "-Wwarn=<wflag>"
+ , flagDescription = "make a specific warning non-fatal"
+ , flagType = DynamicFlag
+ , flagReverse = "-Werror=<wflag>"
+ }
, flag { flagName = "-Wunrecognised-warning-flags"
, flagDescription =
"throw a warning when an unreconised ``-W...`` flag is "++