mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 14:25:52 +00:00
parser: Add option --Werror to enable turning warnings into errors
Add basic ability to treat a warning as an error and abort the compile by specifying the new option --Werror. --Werror will turn all warnings into errors. Where if an warning type is specified only that type of warning will be turned into an error. --Werror=deprecated. The full list of supported warning types can be found by using apparmor_parser --help=warn or apparmor_parser --help=Werror MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/600 Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
@@ -295,7 +295,7 @@ Report on the profiles as they are loaded, and show warnings.
|
||||
|
||||
=item --warn=n
|
||||
|
||||
Enable various warnings during policy compilation. A single dump flag
|
||||
Enable various warnings during policy compilation. A single warn flag
|
||||
can be specified per --warn option, but the --warn flag can be passed
|
||||
multiple times.
|
||||
|
||||
@@ -303,6 +303,19 @@ multiple times.
|
||||
|
||||
Use --help=warn to see a full list of which warn flags are supported.
|
||||
|
||||
=item --Werror[=n]
|
||||
|
||||
Convert warnings into errors during policy compilation. If the
|
||||
optional flag is not specified all warnings become errors. If the
|
||||
optional flag is specified only the class of warnings specified will
|
||||
become errors. A single flag can be specified per --Werror option, but
|
||||
the --Werror flag can be passed multiple times.
|
||||
|
||||
apparmor_parser --Werror=deprecated ...
|
||||
|
||||
Use --help=warn or --help=Werror to see a full list of which warn flags
|
||||
are supported.
|
||||
|
||||
=item -d, --debug
|
||||
|
||||
Given once, only checks the profiles to ensure syntactic correctness.
|
||||
|
Reference in New Issue
Block a user