Commit Graph

343 Commits

Author SHA1 Message Date
Kimmo Varis 42b7a4fadd Update VS2008 project files. 2012-01-10 19:48:25 +02:00
PKEuS 8378153669 Fixed missing include 2012-01-06 18:11:06 +01:00
Daniel Marjamäki de4a64332e Refactoring: Copy FileLister::acceptFile to Path::acceptFile. Use Path::getFilenameExtension and Path::acceptFile in Tokenizer. Use Path::acceptFile in CppCheck::processFile instead of hardcoded handling. 2012-01-06 17:31:10 +01:00
Reijo Tomperi 1a6894fe25 Fix warnings with -Wconversion in gcc in threadexecutor 2012-01-03 22:21:17 +02:00
Reijo Tomperi 1b03667d5b Refactoring: Replace '1', '2', '3' magic characters with enum names: REPORT_OUT='1',REPORT_ERROR='2', CHILD_END='3' in ThreadExecutor. 2012-01-03 20:51:16 +02:00
Daniel Marjamaki cb22e04a36 Visual Studio: Generated new msvc2010 project files with qmake 2012-01-02 16:28:45 +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
Daniel Marjamäki 47c666308f reformatting cli help text to fit better on normal terminal windows that are 80 characters wide 2011-12-24 11:27:10 +01: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
Reijo Tomperi 11242e4045 Fix spelling error: explicitely -> explicitly 2011-12-10 22:58:45 +02:00
Daniel Marjamäki c5a1b5ecab --doc : don't write internal checks in the doc output 2011-12-10 18:39:25 +01:00
Daniel Marjamäki 93b447f7f6 1.52: Updated version 2011-12-10 12:55:40 +01:00
PKEuS 167a7e3e51 Various code cleanups 2011-12-08 21:28:34 +01:00
makulik 04d4e5e32e Run astyle
Signed-off-by: makulik <g-makulik@t-online.de>
2011-11-30 20:35:04 +01:00
makulik 1e8fc71f8e Solution for ticket #3353 'Allow explicit undef's for configuration'
Signed-off-by: makulik <g-makulik@t-online.de>
2011-11-30 20:24:01 +01:00
Stefan Weil d11f18b5df cmdlineparser: terminate with error message if --append=<filename> fails
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2011-11-15 19:27:36 +01: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
Reijo Tomperi 17842394c0 Fix #3324 (Change "--template '<text>'" into "--template='<text>'")
http://sourceforge.net/apps/trac/cppcheck/ticket/3324
https://sourceforge.net/apps/trac/cppcheck/wiki/DesignDecisions
2011-11-11 00:00:15 +02:00
Stefan Weil 76dda36b64 cmdlineparser: add support for --template=
The GNU standard for long command line options is --option=value.
All other long options of cppcheck support this, so add it for
the template option, too.

--template xxx can be made obsolete later.

Should the documentation and tests also be changed now?

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2011-11-10 22:25:49 +02:00
Reijo Tomperi 5fefaf4166 Improve error logging in ThreadExecutor 2011-11-09 22:15:53 +02: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
Ettl Martin ac22f3b798 cli: added 'explicit'-keyword in CmdLineParser and PathMatch ctor 2011-10-31 23:40:37 +01:00
makulik 0b6e7d7dd2 Small fixes for -I and --includes-file help texts 2011-10-30 21:19:16 +01:00
Edoardo Prezioso 433f4640a9 Fix some GCC warnings regarding the sign conversion. 2011-10-30 18:34:49 +01:00
Edoardo Prezioso f1de7497ba Fix little alignment problems for terminals with 80 column length. Related to my previous commit. 2011-10-30 02:29:43 +02:00
Edoardo Prezioso 0bb1ad8782 Little improvements with cli messages and added new '--template' mode: 'edit'.
This option makes it possible opening correctly some editors like 'gedit' or 'vim' by copy-pasting the filename and the line to the command sequence.
2011-10-29 23:50:09 +02:00
Thomas Jarosch 09bdacf31f FileLister (linux): Refactor code to keep only one list of seen directory entries
The list contains filenames and directories now
and is only used for duplicate detection.
2011-10-29 19:57:12 +02:00
Thomas Jarosch a09011630d FileLister (linux): Handle cyclic symbolic links
Keep a list of already seen directories.

The "udev" project f.e. has a directory with
a subdirectory that contains a symbolic link
back to the parent directory.
2011-10-29 19:40:50 +02:00
Thomas Jarosch 0f299aa9bf FileLister (linux): Move absolute path determination to own function
Cleans up the #ifdef hell in the code.
Provide unit test for it.
2011-10-29 19:30:33 +02:00
Daniel Marjamaki 605bd23517 Visual Studio: auto generated new visual studio project files 2011-10-23 15:42:02 +02:00
makulik c7ed1de419 Signed-off-by: Günther Makulik <g-makulik@t-online.de> 2011-10-23 11:15:12 +02:00
unknown abf25fcc69 Signed-off-by: Günther Makulik <g-makulik@t-online.de> 2011-10-23 10:47:18 +02:00
unknown efede199a5 Removed comment lines suggesting to go for XML configuration 2011-10-23 01:13:18 +02:00
unknown 597a37cc32 #3244 'Get include pathes from file'
Signed-off-by: Günther Makulik <g-makulik@t-online.de>
2011-10-22 21:24:23 +02:00
Daniel Marjamäki a9d2d45fbc astyle formatting 2011-10-22 11:11:54 +02:00
Daniel Marjamäki ab827e3631 Merge pull request #40 from joshbeck/master
Added option to set #ifdef configuration check limit
2011-10-22 00:51:05 -07:00
Marek Zmysłowski b332ea8222 Fixed #3204 (Refactor standards support in Settings) 2011-10-22 09:45:48 +02:00
Joshua Beck 56561835f8 Add option to set #ifdef configuration check limit 2011-10-18 19:52:55 -05:00
Daniel Marjamäki 618379ffd7 cli: updated help text for --std option 2011-10-16 15:32:40 +02:00
PKEuS f8074b71d2 Fixed #2470 (False negative: Possible null pointer dereference (C++0x keyword 'nullptr')) 2011-10-16 12:54:58 +02:00
Daniel Marjamäki 1ec32e27db Borland: Fixed compiler errors 2011-10-16 07:52:54 +02: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
Daniel Marjamäki 5c08979920 1.51: Updated versions 2011-10-08 07:45:39 +02:00
Marek Zmysłowski 307dd00efb Fixed #3072 (improve check: deprecated function alloca) 2011-10-06 08:10:51 +02:00
Kimmo Varis 06f9d310ce CLI: case-insensitive ignorepath matching in Windows. 2011-10-02 12:02:07 +03:00
Kimmo Varis 4ef4cb26e9 CLI: Add support for ignoring case in PathMatch.
In Windows (or in Windows code?) we want to ignore case in the
paths. This patch implements the case ignore for the PathMatch-
class.
2011-10-02 11:46:27 +03:00
Joshua Beck 9583394eba Fix test and add info to -h output. 2011-09-27 01:02:58 -05:00
Joshua Beck 240ba0118a Added support for reading file lists from stdin 2011-09-26 19:19:01 -05:00
Robert Reif f97424b242 start adding Windows ASCII TCHAR conversion support 2011-09-24 14:51:03 -04:00
Robert Reif 3f364a3b2f fix width of platform help text 2011-09-19 07:31:09 -04:00
Robert Reif b5d22fda0d fix #2888 (Allow defining sizes of base types) 2011-09-17 19:40:52 -04:00
Daniel Marjamäki e8daaa69d6 CLI: --enable=style has always been the same as --enable=style,portability,performance so keep it that way. Ticket #3074 2011-09-03 17:25:39 +02:00
Daniel Marjamäki d23c58d387 enable: break out 'performance' and 'portability' from the 'style' id. Ticket: #3074 2011-09-03 15:30:30 +02:00
Kimmo Varis 3765a7f8f8 Update VS2008/2010 project files. 2011-08-22 20:13:03 +03:00
Kimmo Varis 80ba3d6a92 Merge pull request #32 from rpavlik/qmake-configure-rules
Qmake configure rules
2011-08-19 13:00:34 -07:00
Kimmo Varis 9ca4524aa7 Update VS2008/2010 project files.
Ticket: #3025 (Visual Studio projects needs updating for new lib/checkunusedvar files)
2011-08-19 22:37:51 +03:00
Daniel Marjamäki 8bc7b5c5b9 cmdlineparser: removed BOM 2011-08-18 23:46:31 +02:00
Ryan Pavlik 6cbcf65339 cli pro doesn't force HAVE_RULES anymore. 2011-08-18 12:13:37 -05:00
Daniel Marjamaki 232007b3c0 --std=posix : simplified help text. might still need further updates 2011-08-17 22:19:19 +02:00
Daniel Marjamäki afed93d7d6 Command line: Added --std option. Right now only --std=posix is possible but other options might be added later. 2011-08-17 20:08:55 +02:00
Reijo Tomperi dd666b7c1b Add command line option: --debug-fp ... If used, cppcheck will print out the code generating error into output stream.
This is ment to be used for debugging false positive errors in Cppcheck.
Current implementation tries two alternatives. Without all headers or with all headers and prints out the option with
less code. In future versions this could try with individual headers or group of header files.
2011-08-16 22:58:27 +03:00
Daniel Marjamäki 01b9c0707d Settings: Removed the --enable=posix option. Ticket: #2949 2011-08-14 09:45:53 +02:00
Daniel Marjamäki 3a260822ad 1.50: Updated version 2011-08-14 08:08:37 +02: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 04d4215116 CLI: Fix misalign of "posix" in help text.
Ticket: #2992 (Little misalignment of '* posix' by one space in CLI command help)
2011-08-11 17:01:13 +03:00
Kimmo Varis 1b6dbedd98 CLI: Fix word-wrapping of the help text. 2011-08-11 15:54:20 +03:00
Kimmo Varis d93e741092 CLI: Reword the help text for -i.
New help text emphasizes we are ignoring/excluding source files.
The header files (include via source files) are not touched.

Ticket: #2965 (CLI: need better description for -i option (applies only to source files))
2011-08-11 15:47:34 +03:00
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