Daniel Marjamäki
43e8430a80
Fixed #10149 (compile database; incomplete handling of directory and file)
2021-01-30 12:27:40 +01:00
Daniel Marjamäki
f700d81e59
ImportProject: Fixed compile_commands.json problems
2020-12-25 14:47:01 +01:00
orbitcowboy
53a4f68cb2
wxwidgets.cfg: Added support for more interface, found by daca@home
2020-12-25 12:16:06 +01:00
Daniel Marjamäki
cf57233f5d
ImportProject: Try to handle -D and -I in the same way
2020-12-25 11:51:24 +01:00
Daniel Marjamäki
54b5e77548
TestImportProject: Use raw strings
2020-09-06 16:00:19 +02:00
Dan
7efd84ecaf
Fix false skipping of folder-seperator ( #2749 )
2020-09-06 15:35:14 +02:00
Daniel Marjamäki
6277eece67
Variable contracts
2020-08-24 20:57:49 +02:00
Daniel Marjamäki
4ab04db53c
Rename 'cppcheckID' to 'hash'
2020-07-21 11:27:03 +02:00
Daniel Marjamäki
3723c708fc
ImportProject; Do not fail loading a GUI project that has warning tags
2020-07-19 08:07:10 +02:00
Daniel Marjamäki
7a4e6daecd
Fix import GUI project problem
2020-07-17 11:26:03 +02:00
Daniel Marjamäki
9edbec8594
astyle formatting
2020-07-16 16:36:11 +02:00
Daniel Marjamäki
118e9eb3e2
Better handling of CppcheckID suppressions
2020-07-16 15:27:23 +02:00
Daniel Marjamäki
d303510c78
Use value temp.maxTemplateRecursion
2020-06-27 12:57:09 +02:00
Daniel Marjamäki
57187ef876
ImportProject: Read max template recursion configuration value
2020-06-27 10:34:02 +02:00
Daniel Marjamäki
9772770226
Import project: Fix standard
2020-05-31 21:37:02 +02:00
Daniel Marjamäki
39fec386a1
Import project: Add stdcpp20 and stdcpplatest
2020-05-26 08:53:37 +02:00
Daniel Marjamäki
d70911c801
ImportProject: Read --std settings from vcxproj file
2020-05-25 21:43:24 +02:00
Daniel Marjamäki
f7bff1a272
Import project: Avoid NULL pointer dereference
2020-05-24 21:39:18 +02:00
Daniel Marjamäki
e448cc68b5
Import project: Speed up if --file-filter has been provided
2020-05-24 21:23:49 +02:00
Daniel Marjamäki
08ddd84780
Update copyright year
2020-05-10 11:16:32 +02:00
Daniel Marjamäki
3e0218299b
Revert "Update copyright year"
...
This reverts commit 6eec6c4bd5
.
2020-05-10 11:13:05 +02:00
Daniel Marjamäki
6eec6c4bd5
Update copyright year
2020-05-10 11:11:34 +02:00
Daniel Marjamäki
2e369cc842
astyle formatting
...
[ci skip]
2020-04-27 17:35:52 +02:00
Daniel Marjamäki
f7096a2232
Bug hunting: basic handling of contracts through GUI
2020-04-27 09:08:50 +02:00
Lukas Grützmacher
095fd2bc62
add command line option to select single project configuration of loaded solution ( #2523 )
...
* add command line option to select single project configuration of loaded solution
* Update cmdlineparser.cpp
* Update manual.md
* fix initialization
2020-04-19 18:19:28 +02:00
Oliver Stöneberg
2c1e36e63e
cleaned up includes based on include-what-you-use ( #2600 )
...
* cleaned up includes based on include-what-you-use
* check.h: trying to work around Visual Studio 2012 bug
* fixed Visual Studio compilation
2020-04-13 13:44:48 +02:00
Daniel Marjamäki
a9f55f4985
CLI: add -isystem include paths when running Clang
2020-02-02 16:35:42 +01:00
Daniel Marjamäki
216698c164
Fix cppcheck project import for Clang parser setting
2020-02-02 12:15:23 +01:00
Daniel Marjamäki
632dc0f141
GUI: Select parser; Cppcheck or Clang
2020-02-02 10:45:42 +01:00
Daniel Marjamäki
fb38e87bf4
astyle formatting
...
[ci skip]
2020-01-31 14:13:52 +01:00
fuzzelhjb
074d08e39e
Check specific Visual Studio configurations ( #2503 )
2020-01-31 07:08:38 +01:00
fuzzelhjb
d82da987e5
Support clang tidy ( #2486 )
2020-01-30 07:14:17 +01:00
Aleksandr Serbin
11993ed999
Ticket 5607: Allow to exclude folders with glob pattern ( #2498 )
2020-01-24 07:06:09 +01:00
Sebastian
c990d10ffa
Check for JSON error when parsing addon .json files + fixes ( #2374 )
...
* cppcheck.cpp: Check for JSON error when parsing addon .json files
This fixes that errors in JSON files given via `--addon=*.json` are
silently ignored and maybe only a part of the JSON file is used.
Now the error message which picojson can return is checked and a
corresponding error message is returned again by getAddonInfo().
* naming.json: Fix missing comma
* CLI: Fix naming violations detected by addon naming.py via naming.json
* Addon naming: Add argument for validating names of constants
* LIB: Rename functions/variables so they are valid, loosen naming rules
* GUI: Fix naming violations
2019-11-20 15:37: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
Oliver Stöneberg
de9f489b08
use range loops / constness ( #2181 )
...
* use range loops / constness
* platform.cpp: avoid shadowed variable
2019-09-19 20:29:33 +02:00
Daniel Marjamäki
8855978f8a
Import project: Ignoring paths better
2019-09-12 09:32:24 +02:00
Daniel Marjamäki
0fbbe2ff23
Refactor load/write of cppcheck project. Reuse same string constants in cli and gui.
2019-08-09 21:15:02 +02:00
Daniel Marjamäki
3ec45acc43
astyle formatting
...
[ci skip]
2019-07-24 08:22:12 +02:00
Daniel Marjamäki
680fbfe612
Fix Cppcheck warning, unused value
2019-07-23 14:10:34 +02:00
Daniel Marjamäki
681bd0a911
GUI: Better settings for extended safe checks
2019-07-23 11:54:38 +02:00
Daniel Marjamäki
c97dc79815
--addon: Use json for addon output
2019-06-24 19:29:43 +02:00
Daniel Marjamäki
d69f002757
Fixed Cppcheck shadowVar warning
2019-04-30 20:19:21 +02:00
Daniel Marjamäki
ece13033b2
dmake: use -isystem for externals to avoid compiler warnings
2019-04-19 14:52:49 +02:00
Daniel Marjamäki
f26b15e5b5
astyle formatting
...
[ci skip]
2019-04-16 19:07:44 +02:00
bbennetts
7287ffe781
Handle 'arguments' sections in compile_commands.json ( #1797 )
...
* Handle 'arguments' sections in compile_commands.json
Previous code assumes 'commands' exists and ill assert if t does not.
* Correct typo checking for "arguments" rather than "commands"
* Use ostringstring rather than stringstream
* Add test deominstrating graceful degradation
* Add test for parsing "arguments" rather than "commands"
2019-04-15 20:03:42 +02:00
Daniel Marjamäki
83f8d7fab9
test/cli: Improved proj2 testing. fixed bug for relative path when vs-solution is imported with relative path
2019-04-15 19:00:57 +02:00
Daniel Marjamäki
15eba39963
test/cli: better handling of absolute ignored paths
2019-04-15 08:48:58 +02:00
Daniel Marjamäki
0cc2b5ca14
Fix wrong assignment
2019-04-14 07:27:23 +02:00
Daniel Marjamäki
a0dd853642
analyzing one vs config (first debug config that matches platform)
2019-04-13 20:01:40 +02:00
Daniel Marjamäki
dfe417c369
msvc compatibility: /constexpr/const/
2019-04-11 21:06:37 +02:00
Daniel Marjamäki
c9172b169a
Improved handling of paths when importing cppcheck gui project
2019-04-11 21:02:49 +02:00
Daniel Marjamäki
7ede0feb2c
Better handling for excluded paths
2019-04-11 18:46:57 +02:00
Daniel Marjamäki
e27b54664e
appveyor: /constexpr/const/
2019-04-10 19:15:56 +02:00
Daniel Marjamäki
42fdb1f826
ImportProject: checkHeaders, checkUnusedTemplates, maxCtuDepth
2019-04-10 17:04:18 +02:00
Daniel Marjamäki
bf9006737a
Addons: Adding support in Cppcheck CLI to execute addons
2019-04-07 17:01:59 +02:00
Daniel Marjamäki
6d7ec98dd6
Import Project: import suppressions from gui project
2019-04-07 13:15:25 +02:00
Daniel Marjamäki
111db91387
ImportProject: Import excluded paths properly
2019-04-07 12:31:52 +02:00
Daniel Marjamäki
3701db96a3
Refactoring; use range for loop
2019-04-07 11:58:42 +02:00
Daniel Marjamäki
4a45655bc2
astyle formatting
...
[ci skip]
2019-03-27 18:15:12 +01:00
Oliver Stöneberg
88dc74929a
Add defines set by compiler options when using compilation database ( #1763 )
...
* Add defines set by compiler options when using compilation database
sets __cplusplus and __STDC_VERSION__ based on -std and the defines for -municode, -fpie, -fPIE, -fpic and -fPIC
* Fixed merge
2019-03-27 10:23:04 +01:00
Daniel Marjamäki
7c6f21a158
astyle formatting
2019-03-26 20:51:04 +01:00
firewave
ce11778a20
fixed parsing of -std= in compilation database
2019-03-26 19:02:08 +01:00
Daniel Marjamäki
bd7790fd8c
Update copyright year
2019-02-09 07:24:06 +01:00
Daniel Marjamäki
8925299947
Attempt to fix MSVC compile issue
2019-02-01 00:09:07 +01:00
Daniel Marjamäki
53967c83e9
Fixed compile error
2019-01-31 23:52:48 +01:00
Daniel Marjamäki
961f66baff
Fixed #8820 (import GUI project)
...
This has basic handling of GUI projects. But further work will be needed to handle addons etc, the plan is that we will be able to run addons from the command line soon.
2019-01-31 20:40:21 +01:00
Daniel Marjamäki
91435310cb
Fixed #8925 (compile_commands.json: False positives in .mm (Objective-C++) files, that file type should maybe just be ignored)
2019-01-21 06:36:31 +01:00
Daniel Marjamäki
c6b48b67f9
astyle formatting
...
[ci skip]
2019-01-11 16:37:12 +01:00
juremenart
45def06d59
fix trailing / from CMAKE JSON file and update unittests to cover both (w and w/o cases) ( #1592 )
...
* fix for CMake compile_commands.json input - director does not include trailing / which makes include directories wrong - so add it if it doesnt exist
* fix the bugfix for trailing / in the directory name of CMAKE JSON file, add also new test case to see if it works in both cases (with and without trailing /)
* revert adding accidental new line
2019-01-11 16:36:55 +01:00
Daniel Marjamäki
ea0232653f
Fixed #8563 (CPPCheck not able to locate file through compilation database)
2019-01-05 23:11:43 +01:00
Daniel Marjamäki
5f5c33baf2
Json: Use simple json library picojson to read compile databases
2019-01-05 17:45:07 +01:00
Daniel Marjamäki
86f9fb778b
Fixed #8864 (compile commands: handle define with string value)
2018-11-25 15:09:23 +01:00
Daniel Marjamäki
c7e5176284
Fixed #8061 (Problems with handling of --project argument)
2018-08-31 16:06:52 +02:00
Daniel Marjamäki
a30941d885
Refactoring; Use range for loops
2018-08-19 17:27:41 +02:00
firewave
01ceb9bae7
fixed issue 8661: Misleading error message when compilation database is not recognized
2018-07-25 16:26:25 +02:00
amai2012
f947b3b025
Fix some doxygen warnings
2018-06-07 08:33:32 +02:00
bwoester
9b28499412
Import BCB6 projects ( #1245 )
...
* added support for reading borland c++ builder 6 projects
* add: fetch sysdefines from project
add: start providing bcb6 predefines (WIP)
* configure all the internal defines for BCB6
* make sure define strings don't start with ';'
* improvements on bwoesters BCB6 project support
- improved `*.bpr` XML handling by reducing the number of loops
- added `const` where aplicable
- optimized compiler argument parser performance
- reformatted code with provided astyle config
* - undo looping (keep it the same as the other implementations)
- keep parsing of cflags simple and separate from the synonym cleanup (no need for micro optimization in this place)
- move input validation to FileSettings::setDefines
- re-run astyle
* use [] instead of at() when comparing characters
2018-05-20 18:19:20 +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
4836df9b1d
Fix Token::Match pattern
2018-04-05 15:47:25 +02:00
Daniel Marjamäki
e5db23fff3
project: import compile_commands.json generated by compiledb-generator
2018-04-05 15:40:59 +02:00
jrp2014
b6504c70ca
Improve constness
2018-04-04 21:51:31 +02:00
Daniel Marjamäki
7e4dba6a7e
Updated copyright year
2018-03-31 20:59:09 +02:00
Matthias Krüger
f009cfc845
fix some typos found by codespell.
2018-02-04 20:53:43 +01:00
Daniel Marjamäki
c4caee6b18
Updated copyright year
2018-01-14 15:37:52 +01:00
Daniel Marjamäki
4a7f923fca
astyle formatting
...
[ci skip]
2017-12-26 22:12:30 +01:00
baltth
6cbd69bf2d
Fix define parsing from compile_command.json ( #1013 )
...
* Define value parsing from compile_commands.json
* Handle escaping in defined values
* Added test for importCompileCommands
* Added used defines for imported projects
* Fixed unnecessary string literals
2017-12-26 13:04:27 +01:00
Daniel Marjamäki
cbb23f14d2
astyle formatting
...
[ci skip]
2017-11-11 11:13:45 +01:00
BNT
cc4c9032de
Support relative paths in Visual Studio projects properties ( #995 )
...
* transform relative paths with the help of the project dir to absolute
paths so the actual checker can resolve include paths defined in
property sheets
* fix coding style (one-line if)
* add existing importproject testfile to visual studio project to appear
when loading solution
* also explicitly export struct from within class to enable linking in
testrunner
2017-11-11 11:13:18 +01:00
Daniel Marjamäki
30e6a05aa0
ImportProject: Macro names in visual studio solutions/projects are case insensitive
2017-09-24 22:36:20 +02:00
Dmitry-Me
017e72d145
Read attribute once, better variable name
2017-08-28 19:11:04 +03:00
Dmitry-Me
61e290750e
Read attribute once, better variable name
2017-08-24 18:28:52 +03:00
Dmitry-Me
3bcfc33014
Break loop early
2017-08-24 18:26:53 +03:00
Gennady Feldman
1c71c789d6
Stop parsing a define with value at the '='. ( #937 )
2017-08-09 20:02:25 +02:00
Daniel Marjamäki
c0890b5255
ImportProject: Improve cppcheckDefines()
2017-08-08 22:57:11 +02:00
Daniel Marjamäki
9861240e79
ImportProject: Only expose Cppcheck Visual Studio defines for Cppcheck
2017-08-08 22:27:08 +02:00
Nekto89
729af993fe
Fix absolute pathes import from vcxproj ( #934 )
...
Fixed importing vcxproj that contains files with absolute pathes.
2017-08-07 23:51:12 +02:00
Daniel Marjamäki
ccea0b17b3
ImportProject: Read system includes and standard from compile database
2017-08-03 20:33:56 +02:00
Daniel Marjamäki
4eb43a5557
Fixed some recent regression in ImportProject for vcxproj projects
2017-08-02 22:51:22 +02:00
Daniel Marjamäki
60f819dbe7
Refactoring, use continue in loop
2017-08-02 08:00:52 +02:00