Commit Graph

122 Commits

Author SHA1 Message Date
orbitcowboy 33777c5b72 Improved const correcntess of local variables. 2018-05-29 13:24:48 +02:00
Daniel Marjamäki f7db818273 errorlogger: fix handling of {inconclusive} 2018-04-24 11:10:41 +02:00
Daniel Marjamäki 84aaec26e6 --template: fixed {code} output with tabs 2018-04-23 14:11:33 +02:00
Daniel Marjamäki f058d9ad08 CLI: Added more fields for --template and added a new --template-location. The gcc predefined template now matches latest gcc better. 2018-04-23 12:21:18 +02:00
Daniel Marjamäki b44a40801b ErrorLogger: add {column} and {code} 2018-04-23 09:18:32 +02:00
PKEuS d2146844dd Refactorizations:
- Replace several push_back-calls by emplace_back
- Replace some x = x.substr(0, y) calls by x.erase(y)
2018-04-11 09:44:35 +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
PKEuS e2002db78d Replaced make_container by C++11 initializer lists 2018-04-08 23:03:44 +02:00
Daniel Marjamäki 7e4dba6a7e Updated copyright year 2018-03-31 20:59:09 +02:00
Daniel Marjamäki ecfb4fd26c Fix --dump output 2018-03-31 10:27:34 +02:00
Daniel Marjamäki da4fc25fee Fixed #8432 (Problem with dump files and non-ASCII characters) 2018-03-30 22:34:55 +02:00
Daniel Marjamäki c4caee6b18 Updated copyright year 2018-01-14 15:37:52 +01:00
Matthias Krüger 58a64702b7 add "internalAstError" id so we can easily track ast errors on daca. 2017-09-05 22:49:16 +02:00
Dmitry-Me 2a4f68ccf8 Resolve CID 1365361
* work around possible null pointer dereference in case of missing attributes
2017-08-16 17:53:04 +03:00
Ayaz Salikhov b8cd7dbb5c Use nullptr instead of 0 or NULL (#936) 2017-08-09 20:00:26 +02:00
Daniel Marjamäki 91eb0f1fad Removed XML version 1 2017-07-29 18:56:22 +02:00
Ayaz Salikhov 28aa939d69 iwyu - include what you use 2017-05-27 04:33:47 +02:00
Daniel Marjamäki 0262020707 --template: Removed 'clang' and renamed 'cppcheck2' to 'daca2' 2017-05-25 05:24:42 +02:00
Daniel Marjamäki a3c0eecccf Added --template=cppcheck2 output format 2017-05-23 12:19:11 +02:00
Daniel Marjamäki 6cb563b3fe ErrorLogger: Adjust the severity in the 'clang' output format. as far as I know, clang severities are 'fatal error', 'error' and 'warning'. 2017-05-23 12:02:57 +02:00
Daniel Marjamäki b59bd96c6d ErrorLogger: Fix crash when error message does not have a FileLocation 2017-05-22 11:25:58 +02:00
Daniel Marjamäki 55ae206ecc ErrorPath: better output 2017-05-19 17:29:16 +02:00
Daniel Marjamäki b53a2ff9eb Command line: Added --template=clang formatting 2017-05-19 17:09:49 +02:00
Daniel Marjamäki 90a952d8c2 Add col and info in plist 2017-05-17 15:22:51 +02:00
Daniel Marjamäki ecb3f0a934 ErrorLogger: Write ErrorPath info in the xml report 2017-05-16 22:58:02 +02:00
Daniel Marjamäki c617851567 ErrorLogger: Added ErrorPath where each item has token and info 2017-05-16 22:38:13 +02:00
Daniel Marjamäki 6967d68137 Add --plist-output argument 2017-05-16 14:07:23 +02:00
Matthias Krüger 79010eecea lib: fix a bunch of warnings about differing function arguments in definition and declaration.
[lib/token.h:72] -> [lib/token.cpp:36]: (style, inconclusive) Function 'Token' argument 1 names different: declaration 'tokensBack' definition 't'.
    [lib/token.h:445] -> [lib/token.cpp:497]: (style, inconclusive) Function 'multiCompare' argument 1 names different: declaration 'needle' definition 'tok'.
    [lib/checkio.h:73] -> [lib/checkio.cpp:1385]: (style, inconclusive) Function 'ArgumentInfo' argument 3 names different: declaration 'isCPP' definition '_isCPP'.
    [lib/checkother.h:216] -> [lib/checkother.cpp:2136]: (style, inconclusive) Function 'checkComparisonFunctionIsAlwaysTrueOrFalseError' argument 2 names different: declaration 'strFunctionName' definition 'functionName'.
    [lib/errorlogger.h:214] -> [lib/errorlogger.cpp:51]: (style, inconclusive) Function 'ErrorMessage' argument 2 names different: declaration 'file0' definition 'file0_'.
    [lib/errorlogger.h:215] -> [lib/errorlogger.cpp:65]: (style, inconclusive) Function 'ErrorMessage' argument 2 names different: declaration 'file0' definition 'file0_'.
    [lib/library.h:327] -> [lib/library.cpp:1043]: (style, inconclusive) Function 'ignorefunction' argument 1 names different: declaration 'function' definition 'functionName'.
    [lib/mathlib.h:112] -> [lib/mathlib.cpp:1275]: (style, inconclusive) Function 'isNullValue' argument 1 names different: declaration 'tok' definition 'str'.
    [lib/preprocessor.h:91] -> [lib/preprocessor.cpp:122]: (style, inconclusive) Function 'setDirectives' argument 1 names different: declaration 'tokens' definition 'tokens1'.
    [lib/symboldatabase.h:860] -> [lib/symboldatabase.cpp:1801]: (style, inconclusive) Function 'argsMatch' argument 1 names different: declaration 'info' definition 'scope'.
    [lib/symboldatabase.h:1171] -> [lib/symboldatabase.cpp:2048]: (style, inconclusive) Function 'addClassFunction' argument 1 names different: declaration 'info' definition 'scope'.
    [lib/symboldatabase.h:1174] -> [lib/symboldatabase.cpp:2208]: (style, inconclusive) Function 'addNewFunction' argument 1 names different: declaration 'info' definition 'scope'.
    [lib/symboldatabase.h:1090] -> [lib/symboldatabase.cpp:3648]: (style, inconclusive) Function 'findVariableType' argument 2 names different: declaration 'type' definition 'typeTok'.
    [lib/symboldatabase.h:1101] -> [lib/symboldatabase.cpp:4308]: (style, inconclusive) Function 'findType' argument 1 names different: declaration 'tok' definition 'startTok'.
    [lib/symboldatabase.h:1176] -> [lib/symboldatabase.cpp:4349]: (style, inconclusive) Function 'findTypeInNested' argument 1 names different: declaration 'tok' definition 'startTok'.
    [lib/symboldatabase.h:1193] -> [lib/symboldatabase.cpp:4501]: (style, inconclusive) Function 'setValueType' argument 2 names different: declaration 'enumerators' definition 'enumerator'.
    [lib/path.h:159] -> [lib/path.cpp:247]: (style, inconclusive) Function 'isCPP' argument 1 names different: declaration 'extensionInLowerCase' definition 'path'.
    [lib/path.h:145] -> [lib/path.cpp:266]: (style, inconclusive) Function 'acceptFile' argument 1 names different: declaration 'filename' definition 'path'.
2017-04-03 00:06:46 +02:00
Daniel Marjamäki 1faca91c1d Added 'endsWith' utility function. This will make compiling the democlient easier. 2017-04-01 18:14:18 +02:00
PKEuS 2f0db369f0 Refactorization: Avoid construction of empty strings by using emptyString 2017-03-01 10:50:50 +01:00
Daniel Marjamäki faa32fd51d Fix Cppcheck warnings and remove Travis suppressions 2016-10-29 15:50:08 +02:00
Daniel Marjamäki 9ff3e85899 Added --cppcheck-build-dir flag 2016-10-29 12:18:11 +02:00
PKEuS 9a6569fde1 Always set ErrorMessage::file0 to ensure that the source file that cppcheck is checking when an error occurs can be identified
Removed unused function and unused includes from preprocessor.h/cpp
2016-07-26 16:28:40 +02:00
Alexander Mai 0533d7bf9c Run astyle + minor refactoring 2016-02-27 16:03:50 +01:00
Roberto Martelloni d3645d874e Mapped toomanyconfigs ,AssignmentAddressToInteger
,AssignmentIntegerToAddress ,CastIntegerToAddressAtReturn
,CastAddressToIntegerAtReturn ,assertWithSideEffect ,assignmentInAssert
,uselessAssignmentArg ,uselessAssignmentPtrArg
,comparisonOfFuncReturningBoolError
,comparisonOfTwoFuncsReturningBoolError ,comparisonOfBoolWithBoolError
,incrementboolean ,comparisonOfBoolWithInt ,compareBoolExpressionWithInt
,negativeIndex ,pointerOutOfBounds ,arrayIndexThenCheck
,possibleBufferAccessOutOfBounds ,argumentSize
,arrayIndexOutOfBoundsCond ,noConstructor ,copyCtorPointerCopying
,noCopyConstructor ,uninitMemberVar ,operatorEqVarError
,unusedPrivateFunction ,memsetClassFloat ,mallocOnClassWarning
,operatorEq ,thisSubtraction ,operatorEqRetRefThis ,operatorEqToSelf
,useInitializationList ,duplInheritedMember ,assignIfError
,comparisonError ,multiCondition ,mismatchingBitAnd
,oppositeInnerCondition ,incorrectLogicOperator ,redundantCondition
,moduloAlwaysTrueFalse to their CWEs ids.
2016-02-26 23:53:52 +00:00
Daniel Marjamäki 39a5400b7d Fix xml output for invalid chars (#6431) 2016-02-01 18:53:46 +01:00
Dmitry-Me 58541f7ffa Check string has expected format before processing it 2016-01-20 16:46:15 +03:00
Daniel Marjamäki dc5e2d5c8d xml: output file0 whenever it is different to filename, both for included files and when #line is used. 2016-01-19 07:01:21 +01:00
Akhilesh Nema 4aa2876ca0 Fixed #7278 (GUI: error rechecking with some files) 2016-01-15 16:52:22 +01:00
Lauri Nurmi 996c9244d8 Update copyright year to 2007-2016. 2016-01-01 15:34:45 +02:00
Albert ARIBAUD (3ADEV) b8dd71c577 Factorize toxml() into a single member function
lib/symboldatabase.cpp and lib/tokenize.cpp both
define a static toxml() function. Make it a single
static ErrorLogger::toxml() member function.
2015-12-07 18:21:01 +01:00
PKEuS e8522c7883 Small refactorizations:
- #include cleanup
- Use std::array instead of std::vector
- Do not create a stringstream to concatenate 4 strings
- Use std::cout instead of printf
2015-11-29 10:56:44 +01:00
Daniel Marjamäki 0f9d90d2be Changed Copyrights. Removed my name. 2015-11-18 20:04:50 +01:00
Dmitry-Me cdf1521258 Further fix search replace 2015-09-02 17:06:19 +03:00
Dmitry-Me 969b1bfbe9 Fix search-replace 2015-08-31 17:44:33 +03: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
Dmitry-Me c85112bdad Break list traversal once first match is found 2015-08-06 17:10:43 +03:00
PKEuS 8ed0180279 Use C++11 string.back() instead of string[string.length()-1] 2015-07-25 17:19:53 +02:00
Daniel Marjamäki b0df668975 fix VS warning 2015-07-25 13:23:48 +02:00
Daniel Marjamäki f3b4c1d0db Remove some useless casts, probably added to avoid false positives. 2015-07-04 13:19:21 +02:00