Daniel Marjamäki
276f017fbe
Partial fix for #11897 (Safety: show what checks are enabled/disabled) ( #5372 )
...
Example output on stdout:
```
$ ./cppcheck m1.cpp
Checking m1.cpp ...
Active checkers: 59/177
```
2023-08-29 12:00:52 +02:00
Daniel Marjamäki
3989408738
Update copyright year
2022-02-05 11:45:17 +01:00
Oliver Stöneberg
171da2e6f9
avoid dependency on transitive includes - based on include-what-you-use ( #3757 )
2022-01-27 19:03:20 +01:00
Oliver Stöneberg
6397e29f84
cleaned up includes based on include-what-you-use ( #3141 )
2021-04-03 21:30:50 +02:00
Daniel Marjamäki
42437277dc
Update Copyright year
2021-03-21 20:58:32 +01:00
PKEuS
141d2ac215
Refactorization: Improved internal implementation of severity and certainty levels
...
Backported from LCppC.
2021-02-24 22:00:06 +01:00
Daniel Marjamäki
37245a8179
Update copyright year
2020-06-13 16:37:12 +02:00
Oliver Stöneberg
37bc0483a4
made check.h less heavy ( #2633 )
2020-05-23 07:16:49 +02:00
Daniel Marjamäki
4d52949be6
Refactoring: Use ranged for loop
2018-07-13 16:50:12 +02:00
Daniel Marjamäki
79ffe1d4fc
Rename _tokenizer, _settings, _errorLogger
2018-06-16 16:10:28 +02:00
Daniel Marjamäki
45379a3aa6
Updated copyright year for modified files
...
[ci skip]
2018-06-10 22:07:21 +02:00
Daniel Marjamäki
f336c2efe7
Refactoring; Renamed Scope::classStart and Scope::classEnd
2018-04-27 22:36:30 +02:00
Daniel Marjamäki
c4caee6b18
Updated copyright year
2018-01-14 15:37:52 +01:00
Ayaz Salikhov
28aa939d69
iwyu - include what you use
2017-05-27 04:33:47 +02:00
PKEuS
b1f4bd7504
Refactorization: Reimplemented Settings::_enabled as a bitfeld instead of std::set ( #7995 )
2017-04-11 11:49:26 +02:00
Roberto Martelloni
28f1222dc2
CWE mapping of useAutoPointerMalloc, uselessCallsCompare, uselessCallsSwap, uselessCallsSubstr, uselessCallsEmpty, uselessCallsRemove, derefInvalidIterator, reademptycontainer, multiplySizeof, divideSizeof, stringLiteralWrite, incorrectStringCompare, literalWithCharPtrCompare, charLiteralWithCharPtrCompare, incorrectStringBooleanError, staticStringCompare, stringCompare, signConversion, truncLongCastAssignment, truncLongCastReturn, unusedFunction, unusedVariable, unusedAllocatedMemory, unreadVariable, unassignedVariable, unusedStructMember, postfixOperator, va_start_wrongParameter ( #824 )
...
Add an optional extended description…
2016-09-03 00:31:35 +02: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
Daniel Marjamäki
ff11ba9847
Updated copyright year to 2015
2015-01-03 12:14:58 +01:00
PKEuS
20753f4697
Refactorization: Use AST in CheckOther::checkRedundantCopy(), CheckOther::clarifyStatement() and CheckPostfixOperator::postfixOperator().
2014-05-18 13:00:58 +02:00
Daniel Marjamäki
fd3a8a2a18
Update copyright
2014-02-15 07:45:39 +01:00
PKEuS
12f5ccfb4e
Refactorized postfix operator check:
...
- Support class members
- Support references (removed wrong bailout)
- Removed wrong unit tests and wrong messages for std::cout << k-- << std::endl;
2013-03-31 04:17:23 -07:00
Robert Reif
1fd78d2b56
CheckPostfixOperator: Use Token::variable. ticket: #4535
2013-02-05 06:47:08 +01:00
Reijo Tomperi
5d5f7085bf
Updating year 2012 -> 2013 to .cpp and .h files and man page.
2013-01-01 18:29:08 +02:00
Robert Reif
f82eff6589
speedup checkpostfixoperator.cpp by caching commonly looked up stuff in the symbol database. Ticket: #4266
2012-11-12 06:16:38 +01:00
PKEuS
c463d97386
Refactorization:
...
- Implemented consistent behaviour of Variable::typeStartToken/typeEndToken: Skip const and static on all variables.
- Simplified patterns containing "static|" or "const|" when matching typeStartToken.
2012-06-08 09:05:02 -07:00
Reijo Tomperi
8cae17fda8
Update year to 2012
2012-01-01 01:05:37 +02:00
Edoardo Prezioso
b28a44dc3b
Change: 'next()->next()'->'tokAt(2)', 'previous()->previous()'->'tokAt(-2)'.
2011-11-12 22:33:03 +01:00
Daniel Marjamäki
6f8e42a5af
changed the astyle formatting flags
2011-10-13 20:53:06 +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
cfcfa3f000
Use "enabled" list for the style checking.
...
Settings-class currently enables style checking via dedicated
boolean attribute. All other CLI's enable-options are handled
through the enable-list. This commit moves style-check enabling
to use the enable-list.
Main advantage is the consistency how options are handled/stored
in the Settings class. Which also unifies using them for the other
code. You need to enable certain type of checks? Use the
addEnabled()-method. You want to check if certain type of checks
are enabled? Use the isEnabled()-method.
2011-08-07 10:28:52 +03:00
Robert Reif
aa65eed02b
convert CheckPostfixOperator::postfixOperator() to use the symbol database
2011-07-23 15:14:15 -04:00
Reijo Tomperi
5a72bed064
Fix #2847 , cppcheck hangs with 100% cpu load
...
http://sourceforge.net/apps/trac/cppcheck/ticket/2847
2011-06-22 14:09:42 +03:00
Jnos Maros
39114e3482
Fixed #2608 ([lib/checkpostfixoperator.cpp:87]: (error) Possible null-pointer dereference: decltok)
2011-02-24 07:37:33 +01:00
Kimmo Varis
7d73b523be
Clarify few verbose messages.
...
Dan pointed out to me earlier that he wants both short- and
verbose messages to be independently understandable. So modifying
some verbose messages to be easier to understand without the short
message.
2011-02-04 11:10:24 +02:00
Reijo Tomperi
226b605774
Change year 2010 -> 2011 in license texts.
2011-01-09 21:33:36 +02:00
Daniel Marjamäki
7ec169f66a
Fixed #2321 (false positive: (performance) Prefer prefix ++/-- operators for non-primitive types.)
2010-12-30 14:27:32 +01:00
Kimmo Varis
c9c6de24a6
Remove extra space from error message.
2010-11-27 20:54:02 +02:00
Kimmo Varis
9b4b8b2abe
Ticket #2238 (Improve postincrement warning message)
...
Have a proper short message for post ++/-- operators.
Pre ++/-- operators are usually more efficient for non-primitive types.
2010-11-27 10:30:57 +02:00
Robert Reif
bc8ecf2aa7
Fixed #2168 (Segmentation fault of cppcheck)
2010-11-04 17:54:04 +01:00
Daniel Marjamäki
9ae4a758b8
Fixed #2116 (Internal error. Token::Match called with varid 0)
2010-10-21 21:28:32 +02:00
Daniel Marjamäki
92a1e9e76e
Severities: Added 'warning' and 'performance' severities. No changes to the command line options nor to the XML format. Ticket: #2106
2010-10-17 14:41:00 +02:00
Daniel Marjamäki
e11d9f1628
astyle formatting
2010-10-14 19:59:10 +02:00
Debrard Sebastien
d0629803a9
warning de compilation
2010-10-12 19:57:17 +02:00
Debrard Sebastien
3273f964c8
comment
2010-10-12 19:56:35 +02:00
Debrard Sebastien
1a4e3dcc44
increment check
2010-10-12 19:54:39 +02:00