Commit Graph

218 Commits

Author SHA1 Message Date
Kimmo Varis c6c5ada8da CLI: Fix problem building in Windows. 2011-08-07 00:11:53 +03:00
Daniel Marjamäki 01ae5fb593 help: clarify --suppress a little in the --help output. Ticket: #2964 2011-08-06 17:09:49 +02:00
Kimmo Varis 371838b9cb CLI: Warn if user tries to exclude header files.
Filename exclusion (with -i) works only for the source files.
Print a warning if user tries to exclude header file. The warning
instructs user to use --suppress for ignoring warnings from the
header files.
2011-08-06 17:24:10 +03:00
Kimmo Varis b976445be7 CLI: Strict check if exclude path is file.
Initially I added logic that checked if excluded path was a file
we would accept. This works for source files, but when file with
"unknown" extension was given it was determined as a directory
name and ending slash was added. E.g. -ifile.h would end up
having ignored path file.h/.

This commit adds per-platform checks if the path points to the
file and if the file also exists.
2011-08-06 16:47:57 +03:00
Kimmo Varis 57a51128a4 CLI: Couple of messages missing cppcheck-prefix. 2011-08-04 23:45:50 +03:00
Kimmo Varis a9153dc317 CLI print warning for deprecated options.
We don't want to keep these deprecated options for ever. So lets
print a clear warning for the users and give also specific release
number when they will be removed. Users have a plenty of time to
update their scripts and environments before removal.

Ticket: #2515 (Print warning for deprecated command line options)
2011-08-04 23:39:47 +03:00
Kimmo Varis e86abfdc5f No unmatched suppressions list in quiet output.
When user wants to see only errors printed (--quiet in CLI) we
must obey that. And not print unmatchedSuppressions list.

Ticket: #2895 (Cannot suppress unmatchedSuppression reports)
2011-08-04 12:04:38 +03:00
Kimmo Varis f4950ea836 CLI: Rename --posix to --enable=posix.
Ticket: #2949 (new check: (style) finding non-reentrant functions)
Ticket: #2952 (CLI option --posix is wrong)
2011-08-03 10:28:36 +03:00
Daniel Marjamaki 6dc7554310 Visual Studio: Updated project files 2011-08-02 17:29:02 +02:00
Kimmo Varis a50f75ef86 Add --posix CLI option.
Part of ticket #2949 (new check: (style) finding non-reentrant functions)
2011-07-29 20:17:02 +03:00
Daniel Marjamäki c1138cf7f9 Fixed #2941 (False positive: unused function (individual checking of files)) 2011-07-25 13:25:09 +02:00
Daniel Marjamäki c4c4994d9e cmdlineparser: changed unusedFunctions to unusedFunction to make it work 2011-07-20 18:38:53 +02:00
Daniel Marjamäki c5064e4591 Cmdlineparser: Removed deprecated flag --unused-functions 2011-07-20 06:59:27 +02:00
Kimmo Varis 0db45a30e5 CLI: Improve and clarify help text. 2011-07-16 11:19:35 +03:00
Kimmo Varis 7cf84cb92b Update Visual Studio 2008/2010 project files. 2011-07-06 11:31:20 +03:00
Daniel Marjamäki a8cb7b445f 1.49: updated version 2011-06-12 18:24:31 +02:00
Greg Hewgill 4cc13f497d Allow suppression of the 'cppcheckError' error reported by the threaded CLI executor.
This is related to commit 5bbf39d094.
2011-05-22 20:47:55 +12:00
Daniel Marjamäki c971fa0d4b cmake: cleanup unmaintained cmake files 2011-05-19 17:16:04 +02:00
Daniel Marjamaki b55147a29e updated error message. --check-includes has been renamed to --check-config 2011-05-04 18:52:03 +02:00
Daniel Marjamäki d998477c69 renamed --check-includes to --check-config 2011-05-02 21:28:33 +02:00
seb777 aa85866bc0 add include-header to use EXIT_FAILURE 2011-05-02 19:56:35 +02:00
Daniel Marjamäki d7927bbb61 update help screen about --check-includes 2011-05-02 18:49:40 +02:00
Daniel Marjamäki 8603919b2d Missing includes - normally just report that there are missing includes. The --check-includes can then be used to check what missing includes there are. Ticket: #2719 2011-05-02 14:58:16 +02:00
Ville Skyttä 5144b0e657 cmdlineparser: Update list of file extensions, expand EXIT_FAILURE, don't list --rule* if built without support for rules. Ticket: #2761 2011-05-01 11:44:47 +02:00
Kimmo Varis c7d99fe9a7 Remove ErrorLogger::reportStatus() method.
The ErrorLogger::reportStatus() is not lib code interface. The CLI
code does the looping through file list and gives one file at a
time for the core code. Hence lib has no any idea about the
progress and it can't provide such information.

Also the recent commit (6d858b6) caused a GUI build failure by
adding CLI code dependency to GUI. Which is big no-no.

This is admittedly a hack. But it allow us to build all modules
again.
2011-04-27 23:27:02 +03:00
Greg Hewgill b0ed595e24 FileLister: don't assume that all files have nonzero size in test case 2011-04-27 07:38:53 +12:00
Greg Hewgill 6d858b63a1 Report percentage complete based on file size
This patch makes the (reasonable) assumption that the total size of all checked
files fits in a 'long' type.
2011-04-26 22:26:23 +12:00
Kimmo Varis f240574107 Modify the Cppcheck class to check one file at a time.
Unify usage and API of CppCheck class. Allow only one file checked
at a time, instead of list of files. Clients can then handle file
lists more naturally and as they see fit. Also clients have better
knowledge of how checking status should be handled.

The single-threaded CLI checking was only one using the file list.
Other clients were giving files (to list) one file at a time.
2011-04-24 19:17:52 +03:00
Kimmo Varis 903769a388 CLI: Give files to Cppcheck class one at a time.
When doing single-threaded checking give checked files to Cppcheck
class one file at a time. Like GUI and multithreaded checking
already do. This unifies how we call Cppcheck class from different
clients.
2011-04-24 19:17:52 +03:00
Daniel Marjamäki b7e14223b3 astyle formatting 2011-04-16 12:08:26 +02:00
Stefan Weil 882d4d95a4 CppcheckExecutor: Code cleanups and fixes 2011-04-16 11:19:56 +02:00
Daniel Marjamäki 58dbbb0cab Inconclusive checking: Report inconclusive errors with reportInconclusiveError. It takes the same parameters as reportError. 2011-04-14 18:02:01 +02:00
Daniel Marjamäki 1178d47a9b --inconclusive : Added command line flag that enable inconclusive checking. It is added for experimental purposes. 2011-04-10 12:52:59 +02:00
Daniel Marjamäki e75acd7476 Release: Updated versions to 1.48 2011-04-09 07:55:07 +02:00
Markus Elfring 796761d582 Conditional inclusion of TinyXML source files in the CLI CMake script (bug #2679, #2524)
The source files for the class library "TinyXML" will only be included into
the build of the command line interface if the library "PCRE" was found before.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2011-04-06 16:30:23 +02:00
Markus Elfring 8cde24597f Determination of rule support in CMake scripts (bug #2679, #2524)
The support for check rules will be automatically included in the generated
software if build settings were accordingly selected for PCRE.
https://sourceforge.net/apps/trac/cppcheck/ticket/2679

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2011-04-02 13:25:18 +02:00
Kimmo Varis 38f5267ba8 CLI: Simplify ignore paths.
Fixes #2656 (-i Give path to ignore does not ignore if start of the
path is different than checked path)

Simplify paths given as -i options. This makes it easier to match
the paths as simplifying removes redundant parts.
2011-03-29 20:53:18 +03:00
Kimmo Varis b95e9c110c CLI: Remove quotation marks from user-given paths.
Ticket #2686 (regression/bug in path handling)

There are situations that paths given to command line can contain
quotation marks. In normal situations shell removes them. For
these cases they don't get removed add code to check paths from
quotation marks and remove them.
2011-03-28 22:26:14 +03:00
Daniel Marjamaki c6b176014b cmake: removed the non-working pcre. ticket: #2679 2011-03-26 19:03:11 +01:00
Kimmo Varis 139fbf57e0 Ticket #2688 (Missing include path shouldn't exit the program)
Non-existing include path is not a fatal problem requiring exiting
the program. Instead we just print a warning and remove the non-
existing include path from the list.
2011-03-26 18:44:22 +02:00
Sebastien Debrard 29b7d4b9c3 sync cmake files with the master branch 2011-03-26 02:03:52 +01:00
Daniel Marjamäki 5058cc6aa1 Reverted non-CMake changes in previous 'Added CMake files' commit 2011-03-25 07:59:48 +01:00
Markus Elfring 9301ee28a8 Added CMake files 2011-03-25 07:14:53 +01:00
Robert Reif 3c5134bb21 run astyle 2011-03-21 19:59:53 -04:00
Daniel Marjamäki 9f21e13c39 FileLister: Fixed compile error with Qt Creator + MinGW 2011-03-20 15:21:45 +01:00
Daniel Marjamäki 6dd9676d43 FileLister: Updated Visual Studio files 2011-03-20 14:47:15 +01:00
Daniel Marjamäki c60edb5af6 FileLister: updated qmake files 2011-03-20 14:37:28 +01:00
Daniel Marjamäki 8caf96be63 FileLister: Moved back the code into a single cpp file 2011-03-20 14:25:11 +01:00
Greg Hewgill 5bbf39d094 Refactor ThreadExecutor::check() to handle child failures more gracefully 2011-03-05 16:43:22 +13:00
Greg Hewgill 957bb5c0f2 Normalise threading support checking into a single #define 2011-03-05 11:27:29 +13:00