Daniel Marjamäki
39c68e12ce
Fixed #2533 (false positive: (error) Uninitialized variable: cBuffer)
2011-02-03 22:29:32 +01:00
Daniel Marjamäki
398190460f
astyle formatting
2011-02-03 22:20:59 +01:00
Kimmo Varis
85187dca07
Update VS 2008/2010 project files for tests.
2011-02-03 17:53:50 +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
9b9b9c99f5
Add test for XML format version 2.
2011-02-03 09:44:23 +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
Robert Reif
e9ec4bc3e4
Fixed #2536 (cppcheck hangs with 100% cpu load)
2011-02-03 07:58:49 +01:00
Robert Reif
8288c28b3f
Fixed #2537 (segmentation fault of cppcheck)
2011-02-03 07:57:10 +01:00
Kimmo Varis
bacb234534
Add testsymboldatabase.cpp to test.pro.
...
Also add comment explaining omitting testfilelister_unix.cpp.
2011-02-02 22:52:47 +02:00
Kimmo Varis
ffc4bb481b
Merge branch 'ignore-paths-cli'
2011-02-02 21:09:22 +02:00
Raphael Geissert
d592250284
Fix sizeof sizeof check to handle sizeof(sizeof type)
2011-02-02 11:49:32 -06:00
Daniel Marjamäki
9a383388be
xml2: added <errors> element
2011-02-02 18:46:07 +01:00
Daniel Marjamäki
26b21a5ae0
Merge branch 'sorted-instances'
2011-02-02 18:35:42 +01:00
Kimmo Varis
84a988ec50
Update VS2008/VS2010 project files.
2011-02-02 14:37:48 +02:00
Kimmo Varis
3fc0d0f03e
Run dmake to update Makefile.
2011-02-02 14:36:45 +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
1118b132b9
Add couple of tests for xml-version cmd line option.
2011-02-02 13:33:57 +02:00
Greg Hewgill
c3ad3f78e9
test case to check whether instances are sorted
2011-02-02 22:58:24 +13:00
Robert Reif
8eb92001b3
Fixed #2530 (Tokenizer: Remove redundant 'MyClass::' inside MyClass class declaration)
2011-02-02 07:40:08 +01:00
Daniel Marjamäki
defeded4b5
Fixed #2529 (False positive: array 'req[3]' index 4 out of bounds)
2011-02-01 21:46:07 +01:00
Pete Johns
2d1ccad44e
Turned failing ASSERT_EQUALS into TODO_ASSERT_EQUALS.
2011-02-01 19:55:39 +11:00
Pete Johns
d2b6dc210b
Merge https://github.com/ghewgill/cppcheck
2011-02-01 19:52:44 +11:00
Greg Hewgill
dcc0f28f34
check that misused scope object does not pick nested class
2011-02-01 08:07:41 +13:00
Daniel Marjamäki
202c8eb4a0
Fixed #2525 (False positive 'Possible null pointer dereference')
2011-01-31 17:30:27 +01:00
Daniel Marjamäki
757c840633
astyle formatting
2011-01-31 17:26:07 +01:00
Ettl Martin
f3111b541e
#2528 added todo-testcase
2011-01-31 13:46:51 +01:00
Raphael Geissert
66253af1e5
Handle "#endif !defined" conditionals
2011-01-30 17:33:44 -06:00
Raphael Geissert
b944168bdc
Check for cpp conditionals where a define is already guaranteed
2011-01-30 12:47:17 -06:00
Pete Johns
098f0bf3e6
Fixed #2526 (Make TODO_ASSERT_EQUALS take three arguments (value, to_be, as_is)?...
...
Removed replaced EXPECTED with...
WANTED (to-be): The future expected value.
CURRENT (as-is): Documenting how cppcheck behaves now.
This removes the need for an ASSERT_EQUALS but enforces the check for every TODO_ASSERT_EQUALS.
2011-01-30 23:20:11 +11:00
Raphael Geissert
49848fd752
Remove duplicated defines
...
After simplifying define(A) conditionals, the final list of
configurations could end up containing duplicate items.
Ticket #1468
2011-01-30 02:13:32 -06:00
Robert Reif
09998d9e18
Memory leaks: less conservative checking of classes. ticket: #2517
2011-01-30 08:38:20 +01:00
Daniel Marjamäki
49fc53165c
Tokenizer: remove some unhandled macros in the global scope. ticket: #2523
2011-01-30 08:34:58 +01:00
Kimmo Varis
b9a0e10b9a
Several fixes to cmd line tests.
...
There were several tests handling two parameters as one string.
Eg. "-I path" which doesn't work correctly. Fixed these
problematic tests.
2011-01-29 19:18:47 +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
Daniel Marjamäki
a299411a82
Tokenizer: Better simplifications of static constants
2011-01-29 16:14:09 +01: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
Daniel Marjamäki
83625d8055
Fixed #2505 (Check processing of a preprocessor macro 'FREE')
2011-01-28 09:19:30 +01:00
Robert Reif
79862573ba
Symbol database: better unit testing. ticket: #2468
2011-01-28 08:33:02 +01:00
Daniel Marjamäki
88abeeebba
Fixed #2518 (Crash when checking rockbox's firmwire)
2011-01-27 21:16:25 +01:00
Daniel Marjamäki
524498e439
Tokenizer: collapse operator function names into a single token. ticket: #2519
2011-01-27 18:44:20 +01:00
Kimmo Varis
090436ea95
Add cmd line parser tests for XML ver 2 options.
2011-01-27 14:25:10 +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
Sébastien Debrard
3e7f29d6f9
fix #2510 Improve check 'sizeof for array given as function argument'
2011-01-26 20:08:06 +01:00
Sébastien Debrard
e82c190429
Merge branch 'master' of https://github.com/danmar/cppcheck
...
Conflicts:
test/testother.cpp
2011-01-25 10:05:03 +01:00
Sébastien Debrard
4cf56dac2b
Fix 2495 incorrect sizeof error message
2011-01-25 09:57:58 +01:00
Daniel Marjamäki
a596a7a8fe
Fixed #2494 (New check: clarify calculation when using ?: operator)
2011-01-24 21:40:49 +01:00
Sébastien Debrard
c7b8bd543f
fix ticket 155 - char array
2011-01-24 19:04:56 +01:00
Daniel Marjamäki
c04107131b
when using TODO_ASSERT_EQUALS it's a good idea to pair it with a ASSERT_EQUALS
2011-01-23 14:34:26 +01:00
Daniel Marjamäki
b10f0aabd6
Fixed #2376 (simplifyTypedef: upx-ucl)
2011-01-23 09:04:34 +01:00