Daniel Marjamäki
4f9a0b8420
Refactoring suppressions
2020-02-23 19:49:53 +01:00
ghking
5479c7340b
a new method to declare inline suppress which is more readable and more convenient. ( #2533 )
2020-02-23 18:04:24 +01:00
Aleksandr Serbin
11993ed999
Ticket 5607: Allow to exclude folders with glob pattern ( #2498 )
2020-01-24 07:06:09 +01:00
Oliver Stöneberg
eac040a00b
Various clang-tidy fixes ( #2192 )
...
* use range loops
* removed redundant string initializations
* use nullptr
* use proper boolean false
* removed unnecessary continue from end of loop
* removed unnecessary c_str() usage
* use emplace_back()
* removed redundant void arguments
2019-09-25 15:25:19 +02:00
Daniel Marjamäki
004b4e4dbe
TestSuite: The ASSERT and ASSERT_EQUALS will now stop executing the test case upon failure. This can be used to avoid extra guard logic in tests.
2019-09-16 06:34:45 +02:00
warmsocks
a56bc006b7
Fixed a typo in lib/checkother.cpp. Corrected spelling errors found by codespell. ( #2170 )
2019-09-11 19:21:38 +02:00
Daniel Marjamäki
bd7790fd8c
Update copyright year
2019-02-09 07:24:06 +01:00
Daniel Marjamäki
8dd641b8be
Use OVERRIDE in test
2019-01-12 15:45:25 +01:00
Daniel Marjamäki
1cd16cf94f
Suppressions: Handle comment in file that starts with #
2019-01-12 15:21:47 +01:00
orbitcowboy
2bbe73e04a
Fixed compiler warning from VS2017: testsuppressions.cpp(450): warning C4458: declaration of 'errmsg' hides class member. ( #1397 )
2018-09-25 17:19:25 +02:00
orbitcowboy
2f032d8fa7
Improved const correctness of local variables. ( #1396 )
...
* Improved const correctness of local variables.
* Running astyle [ci-skip].
* Removed duplicate 'const'-keyword.
2018-09-24 15:08:16 +02:00
shikamu
83cb0b3394
--suppress on line 0 ( #1354 )
...
Fixed --suppress on line 0
2018-09-18 12:58:14 +02:00
Daniel Marjamäki
509cb35168
astyle formatting
...
[ci skip]
2018-09-08 15:19:32 +02:00
tam do thanh
7ad09b44c3
Ticket 7792: Suppression both exit_code and syntaxError when call cppcheck suppressions ( #1345 )
2018-09-08 11:09:49 +02:00
Kevin Kendzia
c5ebf26f9f
cppcheck.cpp: fix suppression of syntaxError ( #1333 )
...
* cppcheck.cpp: fix suppression of syntaxError
* test: add supression test for syntaxError while file read
2018-08-17 10:05:25 +02:00
Daniel Marjamäki
03b2e0eee7
inline suppressions: treat arithmetic operators as start-of-comment
2018-06-09 22:50:51 +02:00
Daniel Marjamäki
7d4a80fbd2
astyle formatting
...
[ci skip]
2018-05-29 16:30:33 +02:00
orbitcowboy
976e9e2544
Cleared -Wshadow warnings.
2018-05-29 11:54:07 +02:00
IOBYTE
ce50df8047
Fix override warnings. ( #1234 )
2018-05-15 16:37:40 +02:00
Daniel Marjamäki
1e7c1841f7
Fixed #8515 (Wrong info message about unmatched suppression)
2018-05-11 09:01:24 +02:00
Daniel Marjamäki
a0c9de0048
Suppressions: Validate inline suppressions
2018-04-11 08:18:00 +02:00
Daniel Marjamäki
e6114a2321
glob patterns: wildcards also match path separators (like before)
2018-04-09 18:59:18 +02:00
Daniel Marjamäki
f677322c69
Suppressions: Allow symbol-based inline suppressions
2018-04-09 11:50:59 +02:00
Daniel Marjamäki
a0906140a6
Suppressions: New extensible Suppressions xml format that allow more attributes. To start with it also allows symbolName.
2018-04-09 06:43:48 +02:00
Daniel Marjamäki
71511f3131
Refactor f487182
2018-02-06 08:59:36 +01:00
Daniel Marjamäki
c4caee6b18
Updated copyright year
2018-01-14 15:37:52 +01:00
Ivan Maidanski
97ffec85c0
Fixed #7502 (Correct exit code if never used function is found) ( #1026 )
2018-01-12 08:24:01 +01:00
Ayaz Salikhov
28aa939d69
iwyu - include what you use
2017-05-27 04:33:47 +02:00
Daniel Marjamäki
cee67730b1
Fixed #5746 (Cppcheck returns error-exitcode when globally suppressed error is encounted when running with multiple jobs.)
2016-05-27 20:13:51 +02:00
Daniel Marjamäki
37afc57a2a
Fixed #7455 (Suppressions: not working well with windows path separators)
2016-05-23 15:38:47 +02:00
Daniel Marjamäki
79e663dd6f
Settings: Remove '_' prefix for public member variables
2016-01-03 16:18:17 +01:00
Lauri Nurmi
996c9244d8
Update copyright year to 2007-2016.
2016-01-01 15:34:45 +02:00
Daniel Marjamäki
0f9d90d2be
Changed Copyrights. Removed my name.
2015-11-18 20:04:50 +01:00
Miika-Petteri Matikainen
acd8a092f8
Make syntaxError suppressable ( fixes #5917 and #7076 )
...
syntaxErrors were not suppressable, because they were treated as
InternalErrors which were thrown and catched during the checking,
and normal suppression rules were not applied for those.
We fix this by calling the normal reportErr() function that does
suppression matching.
2015-10-28 20:53:35 +02:00
PKEuS
149d11d9ad
Improved handling of inline assembly ( #6813 ):
...
- Add ; after asm {} block if required
- Fixed inline suppressions
2015-07-20 23:09:54 +02:00
PKEuS
bc5132e0ac
Refactorization: Moved declaration of errout, ... to testsuite.h, uniformized style
2015-03-11 22:54:43 +01:00
Thomas Jarosch
ec21134817
Fix false negatives for local suppressions
...
Introduce a new bool setting jointSuppressionReport
that will be set by the analyseWholeProgram() code path.
When the flag is enabled, unmatched suppressions are
collected after running the final whole program analysis
to prevent false positives for the unusedFunction check.
The check functions in the unit test
for single / multi file suppressions were unified.
2015-01-20 18:47:30 +01:00
Thomas Jarosch
2cb2161c5d
Fix unmatched local suppression error message for "unusedFunction" ( #6228 )
...
This fixes a regression from commit
e35329aba3
(fix for #4946 )
2015-01-07 15:40:12 +01:00
Daniel Marjamäki
ff11ba9847
Updated copyright year to 2015
2015-01-03 12:14:58 +01:00
Daniel Marjamäki
051d42ae6b
astyle formatting
2014-11-20 14:20:09 +01:00
orbitcowboy
f5d804f71a
running astyle
2014-11-20 10:13:03 +01:00
PKEuS
e35329aba3
Fixed reporting of unmatched suppressions for unusedFunction ( #4946 )
2014-09-01 10:13:03 +02:00
PKEuS
ec1bd420a7
Refactorizations optimizing std::string usage:
...
1) Added global static const std::string emptyString; object:
-> Replaces some static variables in functions which might be not threadsafe
-> Avoids constructor call (std::string::string(""))
-> Even functions that return an empty string in some branches can return by reference now.
Added to config.h to ensure that it is available everywhere
2) Added overloads for TestFixture::assertEquals for the most common use cases:
-> Moves conversion from const char[] to std::string into a function, reducing code duplication in binary.
2014-06-26 11:51:02 +02:00
Daniel Marjamäki
fd3a8a2a18
Update copyright
2014-02-15 07:45:39 +01:00
Daniel Marjamäki
2eca0a93a7
Fixed #4733 (defective unusedStructMember warning)
2013-08-28 06:46:32 +02:00
PKEuS
36dba8373b
Reuse constant objects in testpathmatch.cpp, small simplification in testsuppressions.cpp and testthreadexecutor.cpp
2013-08-07 17:55:31 +02:00
PKEuS
a9a5dc0354
Updated to AStyle 2.03, require this version
2013-08-07 16:27:37 +02:00
Daniel Marjamäki
a7da65a40b
Fixed #4618 (Unmatched suppression: don't show this information message unless --enable=information or --check-cfg is used)
2013-05-31 15:20:58 +02:00
PKEuS
2333aa2cc7
Don't use native separators for suppression matching
2013-03-12 07:53:18 -07:00
PKEuS
14feaa8d39
Refactorizations:
...
- Fixed lots of cppcheck messages about functions that can be const or static
- Fixed possible nullpointer dereference message in symboldatabase.cpp
- Replaced tokAt(+-1) by next()/previous()
2013-03-12 07:42:00 -07:00