-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
addons/namingng.py: Fix use with --cli.
Commandline use of namingng lead to an error complaining about the use of --cli. This flag is supported by the generic cppcheckdata.ArgumentParser(), which is not used by namingng.py. Replacing argparse.ArgumentParser() by the pre-configured cppcheckdata variant, solves this. Furthermore this patch changes namingng.py to use the generic reporting provided by cppcheckdata.reportError(). A local function reportNamingError() is implemented to call through to cppcheckdata.reportError(), while collecting all errors. If --cli is given, the exit status is now 0, even if errors are reported, as a non-zero exit status is interpreted as an internal error. The --verify option now verifies correct working both in --cli and non --cli mode.
- Loading branch information
Showing
1 changed file
with
46 additions
and
53 deletions.
There are no files selected for viewing
This file contains 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