Commit Graph

80 Commits

Author SHA1 Message Date
Daniel Marjamäki bfb82fe3e1 Cppcheck: Show single 'too many configurations' message if --enable=information hasn't been used and there are too many configurations. 2012-12-26 18:35:49 +01:00
Daniel Marjamäki b107e5e9e8 cppcheckexecutor: removed time info from verbose progress info. the ctime function that is used is not threadsafe. 2012-12-09 09:30:18 +01:00
Edoardo Prezioso fae40c4782 Change every C version of 'size_t' to C++ 'std::size_t'. 2012-07-09 13:30:18 +02:00
Edoardo Prezioso 3c4ce7b43a Fixed (for real) the preprocessor.cpp(1166) warning in #2123. 2012-07-06 13:17:08 +02:00
Daniel Marjamäki 0bbf2ecd0c CLI: output information messages to error report 2012-07-04 18:21:56 +02:00
Daniel Marjamäki 956a37a382 Fixed compiler errors 2012-06-20 17:39:31 +02:00
Kimmo Varis 68c52ddd69 Refactoring information messages.
Currently the information severity messages are outputted as error
messages with Severity::Information. This causes constant confusion
as people think it as mildest error severity (and rightfully so).
When it was meant to be for printing messages about the checking
procedure itself (like missing header files etc).

So I'm adding a new function for the ErrorLogger for printing these
informative messages. This makes clear the distinction of errors
found from the code and messages related to the checking itself.
It also makes it easier for clients to handle these separately.
2012-06-19 00:16:20 +03:00
PKEuS 772108374e Removed unused variable CppCheck::_errout. 2012-04-08 14:18:13 +02:00
PKEuS e8a458edde Fixed crash when --errorlist is given (#3711) 2012-04-08 10:05:44 +02:00
Simon Martin 3ccdd16b01 Avoid clang warning. 2012-04-07 15:36:45 +02:00
PKEuS 6643e14d3c Avoid copying Settings in CppCheckExecutor 2012-04-06 14:19:26 +02:00
PKEuS c61762f454 Refactorized doAssignement:
- Enhanced performance by directly iterating through the token list instead of index access
- Added more allocation functions
- Simplified code
Replaced avoidable strlen call in cppcheckexecutor.cpp
2012-02-29 20:57:48 +01:00
PKEuS 9f42ce91a1 Refactored STL container usage in CLI.
Pathmatcher masks are converted to lowercase only once when instance is created
2012-02-19 17:22:59 +01:00
PKEuS b1ff900aaa Some refactorizations 2012-02-18 23:43:51 +01:00
PKEuS 2ba2a4e6ae Some refactorizations 2012-02-18 11:55:05 +01:00
Daniel Marjamäki 112873e876 Revert "Fixed #3450 (CLI --report-progress is currently useless)"
This reverts commit e769fe6294.
2012-01-02 07:42:39 +01:00
Daniel Marjamäki e769fe6294 Fixed #3450 (CLI --report-progress is currently useless) 2012-01-02 07:27:45 +01:00
PKEuS f4703e026a Refactoring various issues in cmdlineparser, cppcheckexecutor, check64bit and tokenize. 2012-01-01 21:17:16 +02:00
Reijo Tomperi 8cae17fda8 Update year to 2012 2012-01-01 01:05:37 +02:00
PKEuS dca03c3ce2 Remove unnecessary includes
Also add a unit test related to #3427
Also improve the description text in checkclass and remove unused variable.
2011-12-23 23:31:48 +02:00
Daniel Marjamäki 9996d38715 Fix #3277 (Other: attempt to copy-construct an iterator from a singular iterator) 2011-11-11 09:19:59 +01:00
Daniel Marjamäki ed97b62610 Fixed #3275 (Missing includes always reported) 2011-11-06 08:59:07 +01:00
Zhiyuan Zhang 4c3283738b Fixed #3292 (Error in --suppressions-list silently ignores all subsequent command line options) 2011-11-05 18:15:03 +01:00
Reijo Tomperi e989af3fd5 Fix typo "Cpppcheck" 2011-11-05 18:56:40 +02:00
Edoardo Prezioso 9dd3360cd6 Fix some complainted choices made in my older commits.
Note: probably you should do 'make clean' before using 'make' to rebuild it again. Maybe it's me but 'make' reports various errors when linking.
2011-11-01 13:23:47 +01:00
Edoardo Prezioso 433f4640a9 Fix some GCC warnings regarding the sign conversion. 2011-10-30 18:34:49 +01:00
Daniel Marjamäki 6f8e42a5af changed the astyle formatting flags 2011-10-13 20:53:06 +02:00
Reijo Tomperi 1c9ae6937c Fix compiling on VC++ after previous commit 2011-10-09 21:14:44 +03:00
Reijo Tomperi e87628b72f Filter out duplicate error messages in cli. 2011-10-09 21:03:38 +03:00
Kimmo Varis 06f9d310ce CLI: case-insensitive ignorepath matching in Windows. 2011-10-02 12:02:07 +03:00
Kimmo Varis 9e2dd553fb Add "ExtraVersion" version number information.
The "ExtraVersion" can be used for things like Git commit Id,
release tag (version control), release date etc. If the string
is empty, nothing is printed.
2011-08-11 17:34:59 +03: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 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
Daniel Marjamäki c1138cf7f9 Fixed #2941 (False positive: unused function (individual checking of files)) 2011-07-25 13:25:09 +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
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
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 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
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
Daniel Marjamäki 8caf96be63 FileLister: Moved back the code into a single cpp file 2011-03-20 14:25:11 +01:00
Daniel Marjamäki 0ee583e324 Fixed gcc compiler warnings (signedness) 2011-02-16 20:56:02 +01:00
Greg Hewgill 5d74325015 implement unmatchedSuppression information message 2011-02-16 23:02:37 +13:00
Kimmo Varis ffc4bb481b Merge branch 'ignore-paths-cli' 2011-02-02 21:09:22 +02:00
Daniel Marjamäki 9a383388be xml2: added <errors> element 2011-02-02 18:46:07 +01:00
Kimmo Varis 1a83e3ef81 Use different way to remove items from vector.
The way I was using caused a debug error in Visual Studio 2008. Probably
because the iterator got invalidated. So access items as array instead.
2011-02-02 14:37:48 +02:00