Benjamin Fovet
1f83c014d5
Remove redundant word in --library description ( #886 )
2017-04-04 01:40:37 +02:00
Daniel Marjamäki
c2a6ee3ea1
Use 'endsWith'
2017-04-01 18:27:53 +02:00
Matthias Krüger
2832b61a7c
--cppcheck-build-dir: --help was telling about --analyze-dir while the actual flag according to code is --cppcheck-build-dir.
...
Fix --help.
2016-11-16 01:33:39 +01:00
Daniel Marjamäki
7d7212c465
--cppcheck-build-dir: generate unique analyzeinfo filenames when source files have same names
2016-11-14 20:50:08 +01:00
Daniel Marjamäki
9ff3e85899
Added --cppcheck-build-dir flag
2016-10-29 12:18:11 +02:00
orbitcowboy
a50405b8ab
cli: Added documentation for --doc option.
2016-09-09 14:03:12 +02:00
Daniel Marjamäki
606e31602c
Fixed #7177 (Support compile_commands.json)
2016-08-13 10:50:03 +02:00
Daniel Marjamäki
c586ae8cbe
Revert 'project' - it is not ready yet
2016-08-07 17:10:37 +02:00
Daniel Marjamäki
f45dc345a9
Merge branch 'master' into project
2016-08-07 15:47:41 +02:00
Daniel Marjamäki
78fc307c73
1
2016-08-07 15:45:36 +02:00
Matthias Krüger
45e600f71c
Only warn about XML 1 if XML output is desired.
2016-08-07 15:37:06 +02:00
Daniel Marjamäki
f83661b206
Merge branch 'master' into project
2016-08-07 15:36:35 +02:00
Daniel Marjamäki
4dbdb50317
split
2016-08-07 15:35:41 +02:00
PKEuS
ec4a85ecef
Added deprecation warning for XML format 1, which will be removed in cppcheck 1.81
2016-08-07 13:50:52 +02:00
Daniel Marjamäki
09d6f4f0a4
1
2016-08-06 21:04:50 +02:00
Daniel Marjamäki
3f3fc3d232
1
2016-08-05 19:46:24 +02:00
PKEuS
63aa2fbed0
--append is deprecated now and will be removed in cppcheck 1.80.
2016-07-29 10:50:37 +02:00
PKEuS
b5d3ecb942
Updated TinyXML, make use of second argument of XMLElement::Attribute()
2016-07-09 11:56:07 +02:00
Daniel Marjamäki
85c7456546
http://cppcheck.sourceforge.net => http://cppcheck.net
2016-06-05 18:17:47 +02:00
Daniel Marjamäki
ec733e7e71
CLI: added --platform=<file> interface
2016-01-07 20:19:08 +01:00
Daniel Marjamäki
79e663dd6f
Settings: Remove '_' prefix for public member variables
2016-01-03 16:18:17 +01:00
Daniel Marjamäki
599327bfb1
cmdlineparser: Added -E option
2016-01-02 11:48:36 +01:00
Lauri Nurmi
996c9244d8
Update copyright year to 2007-2016.
2016-01-01 15:34:45 +02:00
Daniel Marjamäki
1f16e72b19
Removed --debug-fp. The reduce tool should be used instead.
2015-12-10 10:44:36 +01:00
PKEuS
ac17541ca9
Refactorizations:
...
- Fixed a few more MSVC warnings by using correct types
- Store severity as enum instead of string in Settings::Rule
2015-11-28 12:30:21 +01:00
Alexander Mai
03ecb980a5
Small refactoring of stacktrace printing code
2015-11-25 22:37:38 +01:00
PKEuS
6235515889
Refactorized cmdlineparser.cpp:
...
- Added const char* overload for PrintMessage()
- Call Path::removeQuotationMarks() before any other path formatting functions
- Fixed --help output on terminal outputs with 80 columns
- Hide -l option on systems where it does not do anything
- Added pre-check for "-" at the beginning to distinguish between options and files early
2015-11-20 12:01:04 +01:00
Daniel Marjamäki
0f9d90d2be
Changed Copyrights. Removed my name.
2015-11-18 20:04:50 +01:00
PKEuS
4e5b9dc692
Refactorization: Removed lengthy comment and actually check std::ifstream::operator bool().
2015-11-15 11:21:48 +01:00
PKEuS
958f2ac091
Removed special error messages when removed options --exitcode-suppressions or --suppressions are used
2015-11-15 10:03:20 +01:00
Daniel Marjamäki
6545172d8c
Revert "Add a dynamic rule enable/disable system"
...
This reverts commit 231b486e49
.
There was regressions reported in tools/generate_and_run_more_tests.sh.
2015-10-09 21:56:19 +02:00
Albert Aribaud
231b486e49
Add a dynamic rule enable/disable system
2015-10-09 19:57:05 +02:00
PKEuS
eec6914e44
Removed deprecated options --exitcode-suppressions and --suppressions, print an error when they are used
2015-09-05 12:13:58 +02:00
PKEuS
1627b19dd6
Refactorizations:
...
- Call std::string::find() with char instead of char* where possible
- Avoid string copying
- Optimized several Token::tokAt/strAt calls
2015-08-16 10:33:51 +02:00
Daniel Marjamäki
a17f4d0a2d
CLI: Added --debug-normal option that will show --debug output after 1st simplifications. This output is relevant for the 'normal' checkers.
2015-07-28 12:46:32 +02:00
PKEuS
cfde690bb2
Fixed two comments and GUI build
2015-07-25 19:17:40 +02:00
PKEuS
92b867dd2c
Fixed behaviour of --quiet/-q and its description
2015-07-25 17:55:12 +02:00
PKEuS
8ed0180279
Use C++11 string.back() instead of string[string.length()-1]
2015-07-25 17:19:53 +02:00
PKEuS
40a6941577
Warn about usage of --suppressions or --exitcode-suppressions (they are deprecated)
...
Removed two redundant strncmp calls
2015-07-25 17:17:52 +02:00
PKEuS
0d127f15a5
Fixed grammar mistake; fixed two VS2013 code analysis messages; removed redundant Token::Match call
2015-03-15 10:06:56 +01:00
PKEuS
3d83b9e4a6
Added flag --platform=native to avoid performing platform specific code
2015-03-15 10:02:39 +01:00
Daniel Marjamäki
92de2a3ca3
More verbose help text about --library=<cfg>
2015-03-08 15:25:00 +01:00
PKEuS
787cbcb02e
Accept unknown elements in Library files, but print a warning. This fixes backward compatibility of libraries with older cppcheck versions
2015-01-10 22:18:57 +01:00
Daniel Marjamäki
ff11ba9847
Updated copyright year to 2015
2015-01-03 12:14:58 +01:00
PKEuS
4d81945ac5
Fixed a couple of #6276 integer over/underflow issues
2014-12-09 23:28:22 +01:00
Robert Reif
e2f72b4cb1
Fixed #6215 (Move Windows platform types into library)
2014-10-19 07:34:40 +02:00
Daniel Marjamäki
fbc6323a9b
doc: changed --doc output to Markdown syntax
2014-09-30 14:56:12 +02:00
PKEuS
cbb8360b30
Added version attribute to .cfg files ( #5928 )
2014-09-29 16:26:17 +02:00
Matthias Krüger
c70425c06e
showtime: print possible options when invalid mode is given.
2014-09-17 12:49:59 +02:00
Daniel Marjamäki
8db5836e3f
Fixed #5982 (Add xml dump)
2014-07-14 15:51:45 +02:00
PKEuS
f7f639465a
Fixed remaining VS warnings (hopefully all of them, this time)
2014-06-05 10:45:25 +02:00
Daniel Marjamäki
ed78d3e148
Library: Better error reporting when loading fails
2014-05-26 17:00:41 +02:00
Alexander Mai
5198c05f35
--exception-handling now takes optional argument to choose between stdout and stderr for its output. stdout is new default value
2014-05-25 08:47:37 +02:00
PKEuS
adf38fcfd0
Further include cleanup
2014-05-24 12:50:04 +02:00
PKEuS
65916e027c
Don't complain "could not find or open any of the paths given." if no arguments were passed to cppcheck (and help was shown)
2014-05-18 13:46:01 +02:00
PKEuS
e9411e05ba
Refactorized inefficient usage of std::string and const char[].
2014-04-02 13:56:34 +02:00
Troshin V.S
840fba7672
CLI: Add -l command line option
2014-03-25 18:35:59 +01:00
Alexander Mai
825bb0f027
Fixed #5286 (Add signal/exception handling to cppcheck and cppcheck-gui)
2014-03-16 12:04:13 +01:00
Julian Santander
fae8ef48b8
Fixed #5529 (Further control in selecting what configurations to consider)
2014-03-10 15:49:02 +01:00
Daniel Marjamäki
fd3a8a2a18
Update copyright
2014-02-15 07:45:39 +01:00
Daniel Marjamäki
30cae358d8
Removed the --value-flow flag. ValueFlow analysis will always be enabled from now on.
2014-01-17 18:07:05 +01:00
Daniel Marjamäki
d8270c710a
Add new experimental value flow analysis
2014-01-04 20:57:02 +01:00
Alexander Mai
b411efa33f
Fixed #5302 (Invalid parameter for --showtime should cause an error)
2014-01-03 10:00:47 +01:00
Matthias Krüger
287bc5d284
be more informative when "-j N --enable=unusedFunction" (N>1) is passed.
...
unusedFunction check is disabled when -j is passed.
2013-12-31 16:31:34 +01:00
Daniel Marjamäki
5ba02d2fdd
AST: Always use AST
2013-12-09 18:06:19 +01:00
Daniel Marjamki
8910bae801
Fixed #5137 (Defining empty macro from commandline does not seem to work)
2013-11-03 09:46:03 +01:00
Daniel Marjamäki
bbdfd8b5c7
Make it possible to create AST, by using the --ast flag
2013-11-02 18:37:35 +01:00
Daniel Marjamäki
43b40b7465
Refactoring: Reordered includes. Put local ones before system includes.
2013-09-04 06:18:22 +02:00
Daniel Marjamäki
1a2aaa6780
Library: If load from current path fails, try to load 'default' configuration from cppcheck-executable path. Allow that '.cfg' extension is not used. Allow that multiple configurations are provided (comma separated).
2013-07-20 10:21:05 +02:00
Daniel Marjamäki
a216edfd07
updated manual and CLI --help output
2013-07-20 09:38:44 +02:00
XhmikosR
29475d056a
Use the full sourceforget.net url.
2013-07-16 09:01:56 +02:00
Daniel Marjamäki
7d47fd65a2
Renamed --environment to --library. Added --check-library. Renamed Environment to Library
2013-07-08 18:26:18 +02:00
Alexander Mai
b7bb16ea77
Fixed #4897 (callStackToString is not available when using custom message template)
2013-07-08 06:44:25 +02:00
Daniel Marjamäki
de2f959312
CLI: don't crash if summary in rule file is empty
2013-07-06 12:01:46 +02:00
Daniel Marjamäki
61e1dd5096
Environment: Refactoring and cleanup
2013-07-05 20:55:31 +02:00
Daniel Marjamäki
d96fb577cd
CLI: Added --environment flag
2013-07-02 07:18:19 +02:00
Daniel Marjamäki
6b2bab535b
CLI,LIB: Added --std setting for GTK
2013-06-29 12:55:24 +02:00
Daniel Marjamäki
00909486ab
unusedFunction: updated help text and manual. it is recommended that this check is only enabled when the whole program is scanned.
2013-06-16 11:57:02 +02:00
Reijo Tomperi
ae65a47f5f
Add missing line change to CLI help text, near style.
2013-06-13 20:57:15 +03:00
Daniel Marjamäki
537166cf47
Rules: Make it possible run a rule on the 'normal' token list
2013-06-09 14:58:56 +02:00
Daniel Marjamäki
964b6cbd82
help: Improved help text for -D and -U
2013-06-09 13:00:08 +02:00
Daniel Marjamäki
c65437c74c
manual, help text: updates of --enable text. updates of 'Preprocessor configurations' section, the --force and --max-configs can be used together with -D.
2013-06-09 10:34:45 +02:00
Daniel Marjamki
4e09b06bc1
Fixed #4827 (allow checking multiple configurations when using -D by also using --max-configs or --force)
2013-06-08 16:46:54 +02:00
Daniel Marjamäki
75f6013d13
Fixed #4755 (buggy --xml reports in 1.59)
2013-05-20 16:19:31 +02:00
Kamil Dudka
e46f0cf124
CLI: Added missing NL in help message
2013-02-20 17:07:54 +01:00
PKEuS
167e11b645
Switch to TinyXml2
2013-02-16 10:01:34 -08:00
Daniel Marjamki
fc58c6018c
CLI: enable warning messages by --enable=style
2013-02-02 15:48:19 +01:00
Andrew C. Martin
4a73c93750
Fix compiler warnings and comment/string typos
...
- fix g++ warning:
> lib/checkother.cpp:3779: warning: comparison between signed and unsigned integer expressions
- fix suncc warning (see [everything2](http://everything2.com/title/C%252B%252B%253A+static+extern+%2522C%2522 )):
> "lib/checkmemoryleak.cpp", line 578: Warning (Anachronism): Formal argument __compar of type extern "C" int(*)(const void*,const void*) in call to bsearch(const void*, const void*, unsigned long, unsigned long, extern "C" int(*)(const void*,const void*)) is being passed int(*)(const void*,const void*).
- prefer empty() / isEmpty() over "size() > 0" (cases not caught by stlSize)
- fix word misspellings (mostly comments, a few output lines)
- Parenthesis => Parentheses (both variations were used in the codebase)
- fix typo and wording ("never alwayw") in gui/test/data/benchmark/simple.cpp's CheckOther::unsignedPositive():
```
- "An unsigned variable will never alwayw be positive so it is either pointless or "
+ "An unsigned variable can't be negative so it is either pointless or "
```
2013-01-16 07:37:07 -07:00
Reijo Tomperi
5d5f7085bf
Updating year 2012 -> 2013 to .cpp and .h files and man page.
2013-01-01 18:29:08 +02:00
Simon Kagstrom
66a3e5e313
Ticket 4408: cmdlineparser: Improve description of --include=
2012-12-28 12:43:43 +01:00
Simon Kagstrom
2b698919c4
Ticket #4408 : cmdlineparser: Don't force single configuration with --include=
2012-12-28 12:43:43 +01:00
Simon Kagstrom
ef28bde3e4
Fixed #4408 (Force inclusion of files (a la -include /.../ in GCC))
2012-12-27 16:52:31 +01:00
acm4me
7da155c8ba
Support for Sun Studio C++ compiler
2012-12-27 11:51:12 +01:00
PKEuS
16a58d1c11
Use reference instead of copying string in cmdlineparser.cpp
2012-11-03 20:42:32 +01:00
Daniel Marjamäki
1e024a9abc
cleanup more java/c# code. Thanks amai for telling me about this.
2012-10-03 19:19:49 +02:00
Daniel Marjamäki
3e58472cd3
Fixed #4013 (Several test failures in testcmdlineparser.cpp)
2012-09-14 06:58:14 +02:00
PKEuS
2db1dbe2ce
Changed some function prototypes according to cppcheck messages about functions that can be static.
2012-09-11 19:19:11 +02:00
PKEuS
50f9dd52ab
Used enum instead of string in implementation for '--language='.
2012-09-11 08:53:27 +02:00
PKEuS
87131f6105
Added new cmdline option --language= (alias of GCC-like -x) to enforce a specific language. Valid values: c, c++, java, c#. ( #3994 )
2012-09-10 18:51:32 +02:00
Daniel Marjamäki
6fc7f0227c
cli: updated example with --std=posux flag
2012-08-27 19:00:00 +02:00
PKEuS
046712aaec
Removed --doc formating hack that removes more than three newlines and added format testing of Check::classInfo instead.
...
- Fixed test failures shown by new test.
Use const_iterator instead of iterator in testcppcheck.cpp when possible
2012-08-26 16:22:46 +02:00
Daniel Marjamäki
f127728582
Enable --std=c11 and --std=c++11 by default
2012-08-25 21:57:45 +02:00
Daniel Marjamäki
87eb2d444c
cli: add --inconclusive to the help screen
2012-07-26 09:10:39 +02:00
Daniel Marjamäki
7122aeff58
Fixed #3617 (CLI: '-DMACRO' should be considered as '-DMACRO=1')
2012-07-05 19:35:41 +02:00
PKEuS
367c02f066
Fixed #3883 : 80-char overflow in help text.
2012-06-11 02:05:18 -07:00
Dirk Jagdmann
eea92d96ec
Fixed #3757 (fix command line help and manpage by replacing --max-ifdefs)
2012-04-25 19:58:34 +02:00
PKEuS
bac8ed7127
Refactorized stringification of tokens:
...
- Function that stringifies one token: Token::stringify()
- Functions that stringify a list of tokens: Token::stringifyList()
-- Single and powerful "base" function, used by several "light" functions
Refactorized
- testtokenize.cpp and testsimplifytokens.cpp: Use improved stringification functions instead of several local implementations
- Avoided redundand creation of std::string when using TestTokenizer::tokenizeAndStringify and in cmdlineparser.cpp
2012-04-16 19:51:07 +02:00
PKEuS
a420a36606
Removed deprecated cmdline options -s, --style, -a, --all, --auto-dealloc, --test-2-pass
2012-04-15 13:10:41 +02:00
PKEuS
3eede5ba8c
Fixed/Improved description of -rp/--relative-paths
...
run astyle
2012-04-14 16:07:37 +02:00
PKEuS
9f054fbb3c
Fixed crash when "-rp=" or "--relative-paths=" is given - print Error.
2012-04-14 14:44:15 +02:00
PKEuS
25167b58a9
Implemented #2990 : Print relative paths if -rp or --relative-paths is given
2012-04-06 10:49:21 +02:00
Reijo Tomperi
ca5e9740b4
Fix #3578 (--std help text in cli is confusing)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/3578
2012-02-09 18:34:16 +02:00
Daniel Marjamaki
29e66783fa
Fixed #3351 (--includes-file is not working as expected)
2012-02-05 15:28:37 +01:00
Daniel Marjamaki
2ff592e8d9
fixed handling of -i in windows
2012-02-04 19:21:38 +01:00
PKEuS
96ae010e48
- Correctly set Scope::function variable in symboldatabase
...
- Refactorizations
- Fixed some cppcheck warnings
2012-01-21 10:08:09 +01:00
Reijo Tomperi
da09adc583
Fix #3510 (Improve error message for --suppressions-list)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/3510
Print additional info to error message if we suspect that multiple files were given.
2012-01-12 22:21:51 +02: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
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
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
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
makulik
0b6e7d7dd2
Small fixes for -I and --includes-file help texts
2011-10-30 21:19:16 +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
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
6f8e42a5af
changed the astyle formatting flags
2011-10-13 20:53:06 +02:00
Marek Zmysłowski
307dd00efb
Fixed #3072 (improve check: deprecated function alloca)
2011-10-06 08:10:51 +02: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
Daniel Marjamäki
8bc7b5c5b9
cmdlineparser: removed BOM
2011-08-18 23:46:31 +02: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
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
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
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
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
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
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
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
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
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
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
805773663e
Build: Renamed HAVE_DEPENDENCIES to HAVE_RULES
2011-02-14 19:37:58 +01: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
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
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
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
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
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
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