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
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
Greg Hewgill
b26777c962
Merge branch 'cmdline-suppress'
2011-02-23 21:34:09 +13:00
Greg Hewgill
ec4e0c8bf5
add documentation for --suppress= option
2011-02-23 20:59:30 +13:00
Greg Hewgill
22210e0255
add --suppress= command line option
2011-02-23 20:10:32 +13:00
Kimmo Varis
d4786066a5
CLI: Fix CLI help text to fit in 80-char terminal.
2011-02-22 21:51:52 +02: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
Daniel Marjamäki
3bb2850c5c
Renaming HAVE_DEPENDENCIES to HAVE_RULES
2011-02-14 19:50:16 +01:00
Daniel Marjamäki
805773663e
Build: Renamed HAVE_DEPENDENCIES to HAVE_RULES
2011-02-14 19:37:58 +01:00
Raphael Geissert
b3e19c24d3
Fix build when PATH_MAX is not defined
...
POSIX says it _may_ be defined. Alternative implementation follows
POSIX.1-2008.
2011-02-12 15:43:36 -06:00
Daniel Marjamäki
27febb062b
cppcheck: Added HAVE_DEPENDENCIES define. Cppcheck cli can be compiled without dependencies.
2011-02-12 08:06:59 +01:00
Daniel Marjamäki
90bf801c83
Visual Studio 2010: Updated project files for cli and test
2011-02-10 22:10:45 +01:00
Daniel Marjamäki
ce9f9ee6c6
Visual Studio 2008: Updated project files for cli and test
2011-02-10 22:08:10 +01:00
Reijo Tomperi
a71204b8e3
Change "tinyxml/tinyxml.h" includes into <tinyxml.h> and modify dmake to work with it.
...
This should allow usage of libtinyxml-dev or such libraries without modifications to code or makefile.
2011-02-10 22:35:48 +02:00
Daniel Marjamäki
4a7c56f970
1.47: Updated versions
2011-02-06 12:05:42 +01:00
Reijo Tomperi
2bded1091b
Improve --help listing by removing duplicate options list and using lt and gt characters for option arguments.
2011-02-05 22:59:26 +02:00
Daniel Marjamäki
2fa2157543
Cppcheck: Added short info about --rule and --rule-file to --help output
2011-02-05 20:15:22 +01:00
Stefan Weil
40b8c1d83f
Add missing \n in CLI help.
2011-02-04 22:01:17 +02:00
Kimmo Varis
2d6d8580d7
Allow to exclude filenames (with paths).
...
This expands the CLI exclude feature to also allow excluding
filenames (with paths). When filename with recognized extension
is given to -i option then matching filenames (with paths) are
ignored when checking.
Ticket #2538 (Allow excluding files from the checking)
2011-02-03 14:43:42 +02:00
Kimmo Varis
96d62553bc
Make FileLister::acceptFile() a static method.
...
We don't need different acceptFile() implementations per platform
so it is better to have one static method.
2011-02-03 11:48:16 +02:00
Kimmo Varis
f65fa338a5
Tighten the directory name mathing with -i.
...
Only match full directory names as parts of whole paths. So -isrc
matches src/file.cpp and proj/src/file.cpp. But does not match
mysrc/file.cpp or proj/srcfiles/file.cpp.
2011-02-03 09:01:43 +02:00
Raphael Geissert
61435684b2
Support multiple rules in a single XML file
2011-02-02 13:27:00 -06: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
Kimmo Varis
51a1f64531
Don't check empty paths for path ignore.
2011-02-02 14:37:48 +02:00
Kimmo Varis
84a988ec50
Update VS2008/VS2010 project files.
2011-02-02 14:37:48 +02:00
Kimmo Varis
6401271ceb
Add CLI support for ignoring paths.
...
Add support for giving list of ignored paths from CLI. This way
user can define paths one doesn't want to check (like generated
code). This first simple implementation only does exact matching,
no support for wildcards etc. And matching is always agains dir
names.
If the filtered dir name is part of the checked filename then the
file is ignored.
Ticket #1690 (Ability to exclude files and directories from checks)
2011-02-02 14:34:04 +02:00
Kimmo Varis
1da88de932
Imrove --xml-version option parsing.
...
Allow --xml-version parsing to recognize also version 1 and print
errors about invalid values.
2011-02-02 14:04:50 +02:00
Kimmo Varis
fe57d50328
Expose --xml-version=version cmd line option.
...
Make the --xml-version=version command line option public by
adding it to the command line help.
2011-02-02 13:28:14 +02:00
Pete Johns
8298c07d60
Astyle formatting.
2011-02-01 19:56:05 +11:00
Kimmo Varis
250149300d
Move FileLister* to CLI doxygen-module.
...
I forgot to update the doxygen module when moving FileLister* to
CLI. Also add CLI doxygen group for ThreadExecutor.
2011-02-01 08:33:02 +02:00
Daniel Marjamäki
757c840633
astyle formatting
2011-01-31 17:26:07 +01:00
Pete Johns
8b6694f32a
astyle formatting.
2011-01-30 22:51:24 +11:00
Kimmo Varis
d334a02801
Make --exitcode-suppressions option consistent.
...
The --exitcode-suppressions option was inconsistent with other
long options by taking the filename as separate argument. Now
it expects format --exitcode-suppressions=filename.txt like
other long options.
Ticket: #1837 (--suppresions file.txt inconsistent)
2011-01-29 19:18:47 +02:00
Kimmo Varis
081e364298
Rename --suppressions-list CLI option.
...
The option --suppressions-list was inconsistent with other options
so renaming it to --suppressions-list.
Ticket: #1837 (--suppresions file.txt inconsistent)
2011-01-28 13:26:43 +02:00
Kimmo Varis
75695a723e
Add --errorlist to CLI help.
...
Fixes ticket #2253 (Make CLI error listing documented and public switch)
2011-01-28 08:52:18 +02:00
Kimmo Varis
a794edd934
Don't stop processing cmd line after --errorlist.
...
Ticket #2441 (Parsing of command line arguments breaks after --errorlist)
Instead of stopping processing command line options after
--errorlist process them all. This way e.g. --verbose can be given
also after the --errorlist.
2011-01-27 11:14:08 +02:00
Kimmo Varis
dcc241a2b4
Don't print "files not found" after showing help.
...
Fix ticket #2496 (Is error reporting for an unneeded parameter wrong?)
There are several command line options / commands after which we
don't want Cppcheck to even try to open any files. Eg. printing
help or listing errors. So add new attribute for CmdLineParser to
track use of these options and exit before checking files when
the attribute is set.
2011-01-27 10:30:53 +02:00
Daniel Marjamäki
f611c9aec7
cleanup old ifdefs in cmdlineparser
2011-01-24 18:15:56 +01:00
Daniel Marjamäki
10d2909c7c
CLI: updated help text for --inline-suppr. Thanks rubicon_hdr for the suggestion
2011-01-20 20:29:06 +01:00
Kimmo Varis
0cacc7fe4d
Update Visual Studio project files.
...
Update Visual Studio 2008/2010 project files after moving filelister*
files from lib/ to cli/.
2011-01-18 20:55:17 +02:00
Kimmo Varis
b8b2e3fae9
Move filelister* to cli.
...
Ticket #2445 (Move FileLister classes from LIB to CLI).
2011-01-18 19:58:49 +02:00
Kimmo Varis
bd5e9e5309
Improve checking -D arguments for command line.
2011-01-17 21:19:27 +02:00
Kimmo Varis
6dd16d3919
Fix crash when giving -D without argument.
...
Fixes ticket #2476 (Crash when -D used without parameters.)
2011-01-17 21:03:22 +02:00
Daniel Marjamäki
657c22d23b
cppcheck: output errorlist to stdout
2011-01-16 17:18:09 +01:00
Kimmo Varis
420099588f
Add couple of missing path separator conversions.
2011-01-13 23:20:58 +02:00
Kimmo Varis
846d3dae99
Accept include paths ending with backslash.
...
Convert include path to use internal path separators when parsing
command line. Convert back to native separators when using paths.
Ticket #2448 (Error in handling -I command line parameter)
2011-01-11 21:04:21 +02:00
Reijo Tomperi
226b605774
Change year 2010 -> 2011 in license texts.
2011-01-09 21:33:36 +02:00
Daniel Marjamäki
d316f6005f
Fixed #2409 (print a warning if provided path (commandline option -I [PATH]) does not exist)
2011-01-09 09:29:38 +01:00
Daniel Marjamäki
033e759c39
command line: added 'information' id to enable
2011-01-05 21:20:21 +01:00
Daniel Marjamäki
76cf097104
testrunner: fix runtime problems with TestThreadExecutor
2010-12-31 12:04:37 +01:00
Daniel Marjamäki
d8f241e033
gcc: fixed -Wconversion errors
2010-12-31 09:51:27 +01:00
Daniel Marjamäki
dfc7a13286
usleep: use nanosleep instead of usleep as the usleep is obsolete. Ticket: #2283
2010-12-30 21:35:53 +01:00
Daniel Marjamäki
38e7209d26
Fixed #2373 (Using XML2 in --errorlist output)
2010-12-29 12:43:29 +01:00
Daniel Marjamäki
afbf5a8ef3
Visual Studio: updated project files with qmake
2010-12-19 07:51:34 +01:00
Kimmo Varis
062eabf246
Don't use relative paths in lib.pri.
...
Using relative path in included file binds it to be usable only
included from one directory. Instead use variable for giving the
base path for files.
2010-12-18 17:03:46 +02:00
Kimmo Varis
a60b933ac7
Don't use relative paths in tinyxml.pri.
...
Using relative path in included file binds it to be usable only
included from one directory. Instead use variable for giving the
base path for files.
2010-12-18 16:29:58 +02:00
Kimmo Varis
5d89b2ffc7
Add _CRT_SECURE_NO_WARNINGS for Windows CLI build.
2010-12-18 12:21:58 +02:00
Daniel Marjamäki
18933ea0e6
QMake: auto-generate the visual studio project files with qmake
2010-12-17 21:43:47 +01:00
Kimmo Varis
5ac9a7eaa7
Update VS2010 project files for new TinyXml location.
2010-12-15 22:13:31 +02:00
Kimmo Varis
cf46f2ffb9
Update VS2008 project files for new TinyXml location.
2010-12-15 22:05:05 +02:00
vBm
46a11183a5
Fixed some spelling mistakes
2010-12-15 18:45:53 +01:00
Daniel Marjamäki
48241c81f8
dmake: add include path '../externals' to lib.pri in case the pcre.h is placed there.
2010-12-12 17:26:13 +01:00
Daniel Marjamäki
2d3865a671
Add support for user defined rules
2010-12-12 11:56:22 +01:00
Daniel Marjamäki
b90e514b32
1.46: updated version information
2010-12-12 08:33:05 +01:00
Daniel Marjamäki
e6bef96711
ThreadExecutor: Fixed error message 'member variable _pipe not initialized'. Ticket: #2283
2010-12-09 19:03:41 +01:00
Daniel Marjamäki
11a0ac4e07
xml2: rename '--xmlver' to '--xml-version'. bugfix in settings, change the type of _xml_version from bool to int.
2010-12-04 14:20:51 +01:00
Daniel Marjamäki
1f1df0645b
Merge branch 'xml2' of github.com:danmar/cppcheck
2010-12-04 14:06:57 +01:00
Kimmo Varis
c6c5fc6a1c
Add tests for remaining CLI options.
2010-12-04 14:13:44 +02:00
Daniel Marjamäki
af80384ae7
xml2: replace --xml2 with --xmlver=2. Ticket: #2106
2010-12-02 17:32:51 +01:00
Daniel Marjamäki
12c8eeff2c
xml2: Added experimental --xml2 result format. Ticket: #2106
2010-12-01 21:24:17 +01:00
Zachary Blair
215cb5ac8d
Fixed #2162 (false positive: Mutual exclusion over ||)
2010-11-21 00:06:43 -08:00
Reijo Tomperi
1394d0245a
Increase number of cores allowed by the cli to 10000 and add comment about the limit (it is there just to catch typos)
2010-11-20 22:33:46 +02:00
Kimmo Varis
41f06cef69
Update VS2010 solution/project files.
2010-11-14 11:04:45 +02:00
Daniel Marjamäki
85cafb2035
Visual Studio 2008: Added lib/symboldatabase files
2010-11-13 12:28:49 +01:00
Daniel Marjamäki
ba7a3b376e
Fixed #2167 (Drop linefeeds from error messages)
2010-11-11 19:54:43 +01:00
Daniel Marjamäki
81cac166d6
FileLister: minor cleanup
2010-11-09 19:11:43 +01:00
Kimmo Varis
7e33b8fb9f
Update VS2010 project files.
2010-10-31 22:59:44 +02:00
Daniel Marjamäki
75776b86a3
Visual Studio 2008: added nullpointer and uninitvar files
2010-10-31 11:52:55 +01:00
Kimmo Varis
59752f19d6
Add 64-bit targets for VS2008 project/solution files.
...
Since VS2008 Express does not support x64 platform we must create new
configurations named Debug-x64 and Release-x64.
2010-10-26 19:32:07 +03:00
Kimmo Varis
2301b40433
Add x64 build targets for VS 2010.
...
This commit adds new x64-Debug and x64-Release -targets for VS 2010.
To use those targets you need Windows SDK with x64 compiler.
2010-10-26 19:32:07 +03:00
Kimmo Varis
d605239735
Add missing files to VS2010 project/solution files.
2010-10-24 15:55:36 +03:00
Daniel Marjamäki
2346ab8839
astyle formatting
2010-10-22 19:58:18 +02:00
Lauri Nurmi
91e66e74d0
Fixed #2099 (Show an error if none of the given paths was found)
2010-10-22 17:09:50 +02:00
Kimmo Varis
0bb6e22d53
Add missing files to VS2010 project files.
2010-10-17 00:16:39 +03:00
Kimmo Varis
00e5ca2299
Add missing files to VS projects.
...
Part of fixing ticket #2101 .
2010-10-17 00:00:53 +03:00
Daniel Marjamäki
28e40cb9b0
unicode: updates to the handling of unicode filenames. Ticket: #2100
2010-10-16 21:39:58 +02:00
Daniel Marjamäki
88a98a2ef0
unicode: use short filenames when long filename doesn't work. Temporary solution for #2100
2010-10-16 12:40:21 +02:00
Daniel Marjamäki
6dc3073061
CLI: added newline when printing version info
2010-10-08 19:00:06 +02:00
Daniel Marjamäki
5bf2a300d9
1.45: updated version information
2010-10-03 17:05:36 +02:00
Daniel Marjamäki
c1bf388b15
Fixed #2054 (Missing newline in 'invalid parameter' error message)
2010-09-18 16:11:46 +02:00
Daniel Marjamäki
f135227bf5
Visual Studio 2008: Updated cli/cppcheck.vcproj
2010-09-18 08:21:59 +02:00
Kimmo Varis
940679e242
Fix ticket #2040 (some cli messages are missing a return at the end)
2010-09-10 18:39:36 +03:00
Daniel Marjamäki
ad03c97a6e
cmdlineparser: allow space between -D and define name. ticket: #2036
2010-09-08 17:42:28 +02:00
Daniel Marjamäki
fed198aafb
cmdlineparser: use given settings
2010-09-06 22:35:30 +02:00
Reijo Tomperi
d0423ff8ac
Set encoding to UTF-8 for some files.
2010-09-06 22:39:02 +03:00
Kimmo Varis
f36666572a
Add couple of basic tests for CmdLineParser.
2010-09-06 22:31:06 +03:00
Kimmo Varis
a7ee5a0488
Add some comments for the CmdLineParser class.
...
Also remove one unneeded forward declaration.
2010-09-06 20:50:48 +03:00
Daniel Marjamäki
5d539c76fe
--help : added info about the '--enable=missingInclude' command
2010-09-06 19:15:21 +02:00
Stefan Naewe
078a0099dc
cmdlineparser: handle '-h'/'--help' correctly
2010-09-06 19:12:40 +02:00
Kimmo Varis
688e26796f
Fix compiling with GCC.
2010-09-05 11:47:31 +03:00
Kimmo Varis
45eaebe423
Move CLI command line parsing to own class.
2010-09-05 11:17:31 +03:00
Kimmo Varis
d417256c98
Move timer code to own cpp/h files.
2010-08-31 23:18:07 +03:00
Kimmo Varis
ee7bc64197
Fix building CLI with VS2010.
2010-08-31 22:04:13 +03:00
Kimmo Varis
e825fb1e70
Fix CLI build with VS2008.
2010-08-31 21:58:03 +03:00
Daniel Marjamäki
9c499db17b
Revert "Visual Studio: Added /MP switch"
...
This reverts commit 2450a80556
.
2010-08-30 17:51:08 +02:00
Daniel Marjamäki
3dd504bcb2
updates of Visual Studio files
2010-08-20 17:59:09 +02:00
Daniel Marjamäki
6cb7fefdbf
Added command line option --report-progress. ticket: #1926
2010-08-12 21:03:33 +02:00
Daniel Marjamäki
5d1e85dde1
CLI: increase delay between progress reports from 1s to 10s
2010-08-08 09:23:13 +02:00
Daniel Marjamäki
11ef2c0a06
Refactoring: Cppcheck::reportProgress needs to call _errorLogger::reportProgress. Ticket: #1625
2010-08-08 08:46:47 +02:00
Daniel Marjamäki
2450a80556
Visual Studio: Added /MP switch
2010-08-05 19:02:05 +02:00
Kimmo Varis
2fa4378338
Astyle cleanup with new Astyle options.
2010-07-31 15:44:08 +03:00
Kimmo Varis
d860c7b4a1
Astyle cleanup.
2010-07-30 22:16:12 +03:00
Kimmo Varis
45a6742e3f
Windows: Add _CRT_SECURE_NO_WARNINGS define.
...
The _CRT_SECURE_NO_WARNINGS define suppresses some Windows-specific
compile warnings. Windows has "secure" versions of some functions
and compiler outputs warnings that those "secure" versions should
be used instead. Since other platforms don't have those functions
we just suppress this warning for now on.
2010-07-27 17:34:13 +03:00
Kimmo Varis
60cf37d1ef
Update VS 2010 project files.
2010-07-26 22:06:33 +03:00
Kimmo Varis
6903f61f69
Update Visual Studio projects.
2010-07-17 17:59:47 +03:00
Kimmo Varis
fa0f6edacf
Rename ErrorMessage::toText() to ErrorMessage::toString().
2010-07-14 18:31:05 +03:00
Kimmo Varis
d7f971c347
Add cppcheckexecutor.h to VS project.
2010-07-14 16:36:12 +03:00
Daniel Marjamäki
94a8eba989
1.44: updated version information
2010-07-10 11:29:07 +02:00
Reijo Tomperi
b5da0b8ed2
Fixed #1650 (Cppcheck deadlock)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1650
2010-07-07 15:42:39 +03:00
firewave
d6d4b99b85
Removed obsolete checkheaders from Visual Studio projects
2010-06-17 15:00:58 +02:00
Reijo Tomperi
c27e631aa2
Add testthreadexecutor.cpp
2010-06-14 23:18:09 +03:00
Daniel Marjamäki
cbea8ceed0
Updated version to 1.43
2010-05-08 12:41:06 +02:00
Daniel Marjamäki
c718a7c595
astyle: Update to astyle 1.24
2010-04-15 20:08:51 +02:00
firewave
2038684839
Moved shared files back into executable projects - it caused the instances of the checks to be optimized away
2010-04-14 17:52:46 +02:00
firewave
8e20d5b08d
Added Visual Studio 2010 soultion and project files
2010-04-14 12:05:10 +02:00
firewave
e3e2ee35aa
Disabled link time code generation for debug builds. Enabled .pdb generation for release builds.
2010-04-14 12:01:45 +02:00
firewave
efd18e3d42
More cleanups to the Visual Studio projects. All options are now in line. Also enabled some default options like intrinsic functions, buffer checks and lick time code generation.
2010-04-13 22:22:44 +02:00
firewave
bffc097ab3
Moved shared files to seperate lib project
2010-04-13 21:40:00 +02:00
firewave
2271425dae
- cleaned up .vcproj files a bit
...
- raised the warning level in test.vcproj to 4 to match cppcheck.vcproj.
2010-04-13 21:33:08 +02:00
Reijo Tomperi
35d2a27b9c
Update copyright year in all source files
2010-04-13 22:23:17 +03:00
firewave
ba864724cc
Removed some duplicated .cpp files from "Header Files" in Visual Studio project file
2010-04-13 11:29:50 +02:00
Reijo Tomperi
9a4cbe0540
Changed CppCheck::parseFromArgs() to return boolean value and reportOut() in case of error.
...
It used to throw exception and return error message with the exception.
2010-04-11 22:53:21 +03:00
Reijo Tomperi
6dc3860ae9
Fix more -Wshadow compile warnings
2010-04-09 22:40:37 +03:00
Kimmo Varis
8453228a60
Update CLI Qmake project file compiler flags.
2010-04-03 14:08:17 +03:00
Daniel Marjamäki
0cad22314e
Reverted 'astyle fix'. Those changes are not in sync with my astyle configuration/setup.
2010-04-02 07:30:58 +02:00
Martin Ettl
193aa7d1d3
astyle fix
2010-04-02 02:21:53 +02:00
Kimmo Varis
d1bbcf1734
Implement Win32 FileLister as separate class.
...
Improve the system used to have separate versions of code of FileLister for
Win32 and Linux. New idea is to have Base FileLister class implementing
common code and then derived classes for Win32 and Linux specific code.
FileLister is not anymore a static class. Instead we use singleton of
derived class.
2010-03-11 21:58:59 +02:00
Daniel Marjamäki
0f43ce4743
updated version to 1.42
2010-03-09 19:05:28 +01:00
Daniel Marjamäki
2c210b8ff9
dmake,qmake: temporarily removed -Wsign-conversion
2010-03-09 11:10:34 +01:00
Daniel Marjamäki
2ba3f59fc8
dmake, qmake: more sensitive compiler and runtime
2010-03-09 08:24:52 +01:00
Daniel Marjamäki
071aefbb58
1.41: Set version in files
2010-03-07 16:25:37 +01:00
Kimmo Varis
8347b9b38a
Resource compiler still got unnecessary precompiler defines.
2010-02-27 21:15:02 +08:00
Kimmo Varis
839a81a865
Move build products to Build and BuildTmp folders.
...
This avoids polluting source folders with created/temp files. Also makes it
easier for installer to pick files from consistently named folders.
2010-02-27 21:15:00 +08:00
Kimmo Varis
ae58f54230
Projfiles: Fix preprocessor definitions.
2010-02-27 21:15:00 +08:00
Kimmo Varis
ce8afcf09e
Projfiles: Fix include paths - remove unneeded paths.
2010-02-27 21:15:00 +08:00
Kimmo Varis
6b07097cf4
Projfiles: Use $IntDir and $OutDir as paths where applicable.
...
Try to also keep outdir clean of unnecessary files and direct most of build-
time files to intdir.
2010-02-27 21:15:00 +08:00
Daniel Marjamäki
40bb5144e1
removed some more cmake files
2010-02-23 20:12:53 +01:00
Daniel Marjamäki
2ad812d2de
Output the cppcheck program in the base folder
2010-02-14 08:26:55 +01:00
Kimmo Varis
116772da7e
Make workaround fix for ticket #1299 .
...
Since lib does not work when built as an static library, compile lib
code as part of cli/gui code.
2010-01-31 12:36:56 +02:00
Daniel Marjamäki
5595a17e41
Updated version to 1.40
2010-01-17 13:52:28 +01:00
Daniel Marjamäki
cca39ac1b7
lanurmi: Fixed threads handling when using Sun compiler
2010-01-14 22:01:33 +01:00
Kimmo Varis
5912035696
CMake - add header files to CLI project and VS project.
2010-01-03 21:13:30 +02:00
Kimmo Varis
9e2a42ebf9
CMake - use more strict compiler flags.
2009-12-20 10:45:57 +02:00
Kimmo Varis
d51520d656
CMake - add Windows resource files to build.
2009-12-19 16:54:38 +02:00
Kimmo Varis
41eb141e61
CMake - cleaner way to set additional library for Windows.
2009-12-19 16:21:46 +02:00
Daniel Marjamäki
b3a055e20a
Fixed #1101 (link error with latest git in Visual Studio)
2009-12-18 18:29:31 +01:00
Kimmo Varis
d70c60b702
CMake - Fix Windows build.
2009-12-17 22:31:13 +02:00
Kimmo Varis
c85c0fbabc
Add simple CMake build files to build lib and cli.
...
Apparently not everybody wants to use QMake to build cppcheck. Which is
understandable if you only want to hack on/build lib and cli. Qt and QMake are
pretty lot to install for just that.
So lets start using CMake. It is widely used and is "just" build system and not
programming framework. CMake is also easy to use for building Qt software too
so it can replace QMake.
This first commit only builds lib and cli for Linux.
2009-12-15 22:27:17 +02:00
Daniel Marjamäki
d94bc4c89f
version 1.39
2009-12-06 13:34:51 +01:00
Daniel Marjamäki
a57af3b3e9
use checked STL in debugmode
2009-11-28 18:29:32 +01:00
Daniel Marjamäki
6084a5a061
cli: in release use the NDEBUG to avoid assertions
2009-11-28 17:50:53 +01:00
Daniel Marjamäki
ffb5bbd4d1
Visual Studio: Manually edited the vcproj files. The absolute paths were replaced with relative paths
2009-10-28 20:15:56 +01:00
Daniel Marjamäki
cba94feded
Restructuring: Updated the Visual Studio project files. They are now generated by qmake
2009-10-28 17:37:38 +01:00
Daniel Marjamäki
f2106f96ad
Restructuring: updated win_installer scripts
2009-10-27 20:22:11 +01:00
Daniel Marjamäki
90e44bb3bb
restructuring the folder structure
2009-10-25 21:20:42 +01:00
Daniel Marjamäki
d4f706e040
fixed qmake building with new folder structure
2009-10-25 19:29:10 +01:00
Daniel Marjamäki
09859c1019
refactoring the folder structure
2009-10-25 12:49:06 +01:00