Commit Graph

1146 Commits

Author SHA1 Message Date
Oliver Stöneberg 1b9865be12
donate-cpu-server.py: sort time report entries by factor and corrected titles (#3102) 2021-01-31 12:01:01 +01:00
Oliver Stöneberg 99d9abee41
donate-cpu-server.py: fixed daca crash report (#3092) 2021-01-29 10:28:35 +01:00
Oliver Stöneberg ff9d6499ec
donate-cpu-server.py: split time report into improvement and regression report (#3081) 2021-01-25 08:10:28 +01:00
Oliver Stöneberg f46a9e3543
fixed/excluded some shellcheck warnings and actually fail the build when something is found (#3068) 2021-01-20 18:43:49 +01:00
Rikard Falkeborn 50cdb6cbfc
Astyle: sync windows and linux folders (#3016) 2021-01-06 17:13:44 +01:00
Oliver Stöneberg 96704c9971
fixed and enabled some more clang-tidy warnings (#3007) 2021-01-05 17:51:32 +01:00
orbitcowboy 01c434f8bf donate_cpu: Auto detect ntl-library 2021-01-04 16:28:05 +01:00
Rikard Falkeborn 8dc8aa0459
Matchcompiler parse all Match|simpleMatch on the same line (#2993)
* MatchCompiler: Neaten error messages

Especially the added space makes it a little more readable.

* MatchCompiler: Add spaces between operators

* Matchcompiler: Don't bailout if non-const pattern

If matchcompiler found a call to Token::Match() or Token::simpleMatch()
with an unknown string argument, subsequent calls to Token::Match() or
Token::simpleMatch() on the same line would not be processed by
matchcompiler.

To fix this, keep track of the last index we found a match, and update
it accordingly when the line is modified. To avoid having to keep track
of if "Match" or "simpleMatch" is the first match we find, just make a
loop over them.
2020-12-31 19:28:06 +01:00
orbitcowboy c643e7e7b5 donate_cpu: Improved auto detection of bsd library configuration 2020-12-28 18:08:36 +01:00
orbitcowboy 922e2b5713 donate_cpu: Added auto detection for GiNaC 2020-12-28 17:41:16 +01:00
orbitcowboy 28b4d1a6b3 donate_cpu: Auto detect pcre.h 2020-12-28 09:30:39 +01:00
orbitcowboy 81be03fd6d donate_cpu: Incremented client version. 2020-12-27 14:41:36 +01:00
orbitcowboy 4ab5b33cc7 donate_cpu: Auto detect wxSqlite3 includes 2020-12-27 12:44:56 +01:00
Oliver Stöneberg 018b26a4ef
donate_cpu_lib.py: fixed some cases with missing error information / cleanups (#2982) 2020-12-26 17:59:19 +01:00
orbitcowboy 23c7621b24 donate_cpu_lib.py: Improved auto detection of bsd config 2020-12-18 13:23:41 +01:00
orbitcowboy 52e6bd76c4 donate_cpu_lib.py: Improved auto detection of bsd config 2020-12-18 13:21:49 +01:00
orbitcowboy 099d4ce574 donate_cpu: Add another header to auto detect BSD configuration. 2020-12-12 17:36:31 +01:00
orbitcowboy 4b079c8934 donate_cpu: Add rule for automatically activate bsd.cfg 2020-12-12 17:29:25 +01:00
Daniel Marjamäki dffa40803e donate-cpu-server: update versions 2020-12-05 13:23:53 +01:00
Daniel Marjamäki c7cbe7f2d3 rename externals/tinyxml to externals/tinyxml2 2020-11-16 09:11:53 +01:00
Daniel Marjamäki f779a44be0 astyle formatting 2020-11-14 21:40:38 +01:00
Daniel Marjamäki ef5d5e84c5 Fixed #8936 (Add PicoJSON Copyright notice) 2020-11-14 21:31:50 +01:00
Daniel Marjamäki 5b156d20bd compare_ast_symdb.py: small fix and refactorings 2020-10-31 17:37:23 +01:00
Daniel Marjamäki 6cf571af97 compare_ast_symdb.py: improved script for comparing cppcheck/clang ast etc 2020-10-31 14:57:12 +01:00
Daniel Marjamäki b96f23a388 Fixed tools/compare_ast.py 2020-10-30 10:14:18 +01:00
Daniel Marjamäki ef42b82a49 fix tools/compare_ast.py 2020-10-29 21:18:40 +01:00
Daniel Marjamäki 417bc5c732 tools; remove old script for comparing cppcheck and clang asts 2020-10-27 21:02:34 +01:00
orbitcowboy d37ddc7114 donate_cpu_lib.py: Formatted Qt list, there are no functional changes 2020-10-04 18:42:59 +02:00
orbitcowboy 9d2564993a donate_cpu_lib.py: Improved Qt config detection by adding more Qt-headers. 2020-10-04 18:31:30 +02:00
orbitcowboy 71f5e5bb46 donate_cpu_lib.py: Improved detection of Qt-includes by adding <QMetaType> 2020-10-03 20:38:42 +02:00
orbitcowboy 1886a43f98 donate_cpu_lib.py: Improved detection of Qt headers: added <Qtest> detection. 2020-10-03 20:15:08 +02:00
orbitcowboy 5eb718f9b4 donate_cpu_lib.py: Improved detection of GTK headers 2020-10-03 19:36:32 +02:00
Daniel Marjamäki ad620413f1 donate-cpu-server: OLD_VERSION=2.2 2020-10-03 12:55:55 +02:00
orbitcowboy 0b62ca7250 donate_cpu.py: Improved detection of Qt headers 2020-10-03 12:19:02 +02:00
orbitcowboy 14f70cf131 Attempt to make travis happy 2020-10-02 20:45:06 +02:00
orbitcowboy b19e631292 Added macros from ICU-Project (ref. to https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/index.html). This found by daca@home. 2020-10-02 20:01:06 +02:00
Daniel Marjamäki 8a90e55ece triage: fix version match for 2.1 2020-09-14 15:43:24 +02:00
firewave fa7e687853 donate_cpu_lib.py: fixed Python error 2020-06-15 22:12:22 +02:00
Daniel Marjamäki 33388217a5 new default branch is main 2020-06-15 20:04:57 +02:00
Daniel Marjamäki 60208a11d1 donate_cpu: Update OLD_VERSION to 2.1 2020-06-15 19:48:20 +02:00
Daniel Marjamäki e2c99ee697 donate_cpu: master branch was renamed to main 2020-06-15 19:46:34 +02: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
Ken-Patrick Lehrmann d1279856d5
Fix cmake in Release mode (#2655)
In tools/, it did not understand that some files are generated by
matchcompiler.py.

```
CMake Error at tools/CMakeLists.txt:7 (add_executable):
  Cannot find source file:

    </some/path>/cppcheck/build/lib/build/mc_pathmatch.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx

CMake Error at tools/CMakeLists.txt:7 (add_executable):
  No SOURCES given to target: dmake

```

Co-authored-by: Ken-Patrick Lehrmann <kp.lehrmann@gmail.com>
2020-05-22 20:20:22 +02:00
Ken-Patrick Lehrmann 9a5e53032d
Update matchcompiler after change in Token::Match (#2653)
The change in token.cpp was done in f6788c047
This should fix the failures in travis.

Co-authored-by: Ken-Patrick Lehrmann <kp.lehrmann@gmail.com>
2020-05-20 21:33:29 +02:00
Daniel Marjamäki c5455764ad astyle formatting
[ci skip]
2020-05-20 16:39:27 +02:00
Daniel Marjamäki e2ead44a2d dmake updates. externals/z3_version.h should never be added as a dependency 2020-05-19 20:14:29 +02:00
Daniel Marjamäki d8d794c522 Fix validateXML 2020-05-15 17:05:55 +02:00
Rikard Falkeborn 1d80cd23ca
test-my-pr: Add timing info (#2642) 2020-05-14 19:45:53 +02:00
Oliver Stöneberg 4f7d162555
matchcompiler.py: only add additional includes if necessary (#2636) 2020-05-12 21:49:39 +02:00
Oliver Stöneberg e066300f95
added dmake targets to CMake (#2634) 2020-05-10 16:41:50 +02:00
Daniel Marjamäki 8d25901a96 daca@home: update OLD_VERSION 2020-05-10 14:30:53 +02:00
Oliver Stöneberg 1388e9385b
cleaned up setting of compiler options and a few more things in CMake (#2599)
* cleaned up compiler options related code in CMake

* moved cmake_minimum_required() and raised to latest 2.8.x version

* use proper compiler version check / print compiler version

* fixed linking of sanitized builds

* added proper version checks to newer Clang warnings and enabled them / moved tinyxml_objs flags to proper compiler

* disabled -Wdeprecated-declarations for Clang

* compileroptions.cmake: removed unnecessary check for clang++ existence - CMAKE_CXX_COMPILER_ID is determined by CMake

* printInfo.cmake: removed unnecessary message for ANALYZE_ADDRESS - LSAN is part of ASAN and enabled by default

* cleaned up if() comparisons in CMake

* added/adjusted TODOs
2020-04-22 11:04:19 +02:00
Oliver Stöneberg 1af959af2c
fixed -Wextra-semi-stmt Clang warnings (#2553)
* fixed -Wextra-semi-stmt Clang warnings

* adjusted REDIRECT macro to require a semicolon

* testmathlib.cpp: rolled back accidental change
2020-04-21 17:27:51 +02:00
Sebastian feb767a66b
donate_cpu_lib.py: Fix that timed out analyses are handled as crashes (#2561)
Sometimes it could happen that SIGSEGV is thrown when Cppcheck is killed
because of a timeout. Then the execution is wrongly handled as a crash
and debugged with gdb instead of marking it as timed out.
This fixes that issue by checking the time out before checking sig_num.
2020-02-28 08:12:10 +01:00
Rikard Falkeborn 73ee317866
donate_cpu: Fix timeout if multithreaded (#2510)
Highly inspired by https://stackoverflow.com/a/4791612.
2020-02-25 11:49:56 +01:00
versat bdf715b3e5 donate-cpu-server.py: Fix link in headline and code inspection warnings 2020-02-19 09:42:32 +01:00
Rikard Falkeborn b13ae83845
donate_cpu: Use with ... as (#2520) 2020-02-03 10:27:32 +01:00
Rikard Falkeborn 0d361f8a2e
test-my-pr: Retry if failed to get package (#2515) 2020-02-02 18:00:36 +01:00
Rikard Falkeborn 60c3d4c482
daca@home: Add links to packages on time page (#2518)
Also, increase the size of the package field to match the setting for
the other pages (some packages are too small to fit at the moment).
2020-02-02 16:36:19 +01:00
Rikard Falkeborn 50216d53dd tools/test: Make scripts executable (#2509) 2020-01-27 06:53:58 +01:00
Rikard Falkeborn ba33c7f6cd daca2: Improve package sorting using natsort (#2505)
* daca2: Improve package sorting using natsort

This switches the external dependency from semver to natsort, and
improves comparison of packages where one or more of the packages do not
use semantic versioning (major.minor.patch).

This also makes daca2-download and daca2-getpackages work with python 3.
In theory, they should work with python 2 as well, but I have not tested
it.

* Make daca2 scripts executable

* Update hashbangs to python3

* Update usage description

To avoid specifying python version in the usage description, just
show how to execute the scripts and leave the rest to the shebangs.

* No need to specify python version in start_donate_cpu_server_test_local.sh

Leave it to the hashbang instead.
2020-01-26 18:39:37 +01:00
Sebastian 206eb0f527
Fix #9584: Limit stack trace depth in daca@home crash page (#2502)
This limits the backtrace to a maximum of 50 entries.
Trac ticket: https://trac.cppcheck.net/ticket/9584
2020-01-25 15:20:06 +01:00
versat 7280dab5b2 donate-cpu-server.py: Fix rejection of xz packages 2020-01-24 13:31:55 +01:00
Sebastian 2d95c35974
Donate CPU/test-my-pr: Add timeout for the Cppcheck execution (#2500)
This adds a timeout of 60 minutes for the Cppcheck analysis.
Timed out results do not count as crash but they are uploaded and
marked with "TO!" in the list of the latest results. No "diff" is
generated for timed out results so they do not add wrong entries to
the "Diff report".
In test-my-pr.py the timed out results are listed separately just like
the crashes.
donate-cpu-server.py: Add timeout report
2020-01-24 12:33:51 +01:00
Sebastian d8e0f40663
donate-cpu/test-my-pr: Minor fixes (PEP 8, old Python 2 code, ...) (#2499)
* donate-cpu/test-my-pr: Minor fixes (PEP 8, old Python 2 code, ...)

* test-my-pr.py: Add Python 3 shebang
2020-01-21 14:27:39 +01:00
Sebastian 7c7b0e55ed
daca2-getpackages.py: Fix #9508: Add support for xz compressed archives (#2493)
Using .tar.xz packages adds about 4500 additional packages that can be
tested and changes many existing packages where a more recent version
can be used now that is only available as .tar.xz file.

Related ticket: https://trac.cppcheck.net/ticket/9508

donate-cpu.py: Require at least Python 3.4
xz support was added with 3.3.
2020-01-17 12:23:07 +01:00
Sebastian 53623ddf6f
daca2-getpackages.py: Fix semver sorting and getting latest package (#2490)
There were two issues:
1. The version was not correctly extracted out of the filename. When
extracting a sub-string in Python one has to specify start index and
end index instead of start index and length.
2. The function `semver.cmp()` does nothing useful. Instead the function
`semver.compare()` must be called when two version should be compared.
See https://github.com/python-semver/python-semver/issues/117#issuecomment-479188221

Because `semver.compare()` now really compares the versions it is
possible that an exception is thrown if a version is not in the semver
version format. In such cases the sorting is aborted and the last
filename in the array is returned. This is often but not always already
the latest version from what I have seen.
2020-01-16 20:02:56 +01:00
Sebastian cd9ec5aac6
daca@home client: Require at least Python 3 from now on (#2491)
This makes it possible to implement new features like .tar.xz support
(see https://trac.cppcheck.net/ticket/9508) or aborting endlessly
running analysis via timeout (see
https://sourceforge.net/p/cppcheck/discussion/development/thread/86813a8a53/).
2020-01-16 20:01:46 +01:00
Rikard Falkeborn 41caf28c6f Make triage work with log-files from test-my-pr.py (#2468)
* triage: Allow master as version

Log-files from test-my-pr.py shows "master" as version. Extend regexp to
match "master", and improve regexp handling slightly to avoid making
assumptions on the length of the version.

* triage: Show log-files when opening files

test-my-pr.py defaults to save output as "my_check_diff.log". Show
log-files by default to make it more convenient to check these files as
well.
2020-01-03 19:33:42 +01:00
versat 5715ba7ce0 Donate CPU client test scripts: Use Python from shebang 2019-12-22 19:33:10 +01:00
versat 5d007bb9bb donate_cpu_lib.py: Enable library detection as planned after 1.90 release 2019-12-21 19:26:31 +01:00
versat 7216c3079c donate-cpu-server.py: Set OLD_VERSION to 1.90 2019-12-21 19:12:41 +01:00
Daniel Marjamäki 6890757986 Update Copyright year 2019-12-21 11:23:01 +01:00
Rikard Falkeborn eb6203cee3 test-my-pr: Allow work_path to be relative (#2444)
Previously, calling test-my-pr with a relative work-path resulted in a
crash when trying to create the result file (due to the change of
current working directory).
2019-12-12 16:43:40 +01:00
Rikard Falkeborn 3ff4d83e6d donate_cpu_lib: Fix python 3 crash if fail to get package (#2445)
* donate_cpu_lib: Fix python 3 crash if fail to get package

Decoding a string is not allowed in python 3 (in python 2 it works).
If fetching the package fails, assign an empty byte string instead to
avoid crashing.

* Initialize package instead
2019-12-12 15:04:25 +01:00
Sebastian de4d44ae2f
opencv2.cfg: Add initial OpenCV 2.x API Library Configuration (#2439) 2019-12-10 19:34:30 +01:00
amai2012 7fdaa4ae89 Sync dmake and Makefile (change missing from 3a71eb834d) 2019-12-04 20:27:48 +01:00
amai2012 3a71eb834d Run xmllint on cppcheck-errors.rng. Speed up creation of example XML output for validateXML target 2019-12-02 22:03:59 +01:00
Bo Rydberg e6d692d960 Fix daca2 using latest version of package (#2393)
* Add semver import for sorting ls-lR list

* Fix using latest release version of package

* Import semver with pip in travis file
2019-11-24 13:05:21 +01:00
Sebastian 1b28fb2d1a
donate-cpu.py: Verify argument for jobs (-jN) (#2386)
Yesterday, I observed that some client with a wrong jobs setting
(only "-j") requested one package after another and always uploaded
results where it only said that the argument "-j" is invalid for
Cppcheck.
This check should avoid such cases where results are overwritten with
useless data and the server is kept busy for nothing.
2019-11-22 22:04:41 +01:00
Sebastian 5f2f19a646
dmake: Update Visual Studio solution and project (#2385)
This also fixes syntax errors for modern code that is not supported
by old Visual Studio IDEs/compilers.
2019-11-21 19:39:19 +01:00
versat 946c5e4dbc astyle client/server: Remove scripts because they are not used
If someone needs them please tell us and we can restore the scripts
and let the server run again.
2019-11-21 08:06:26 +01:00
Sebastian 590ec74998
astyle client/server: Update server address + minor changes (#2383) 2019-11-21 08:01:05 +01:00
Armin Müller 130ebe4b85 Typos found by running "codespell" (#2380) 2019-11-19 20:02:24 +01:00
amai2012 0024c3e446 Run xmllint on cfg/cppcheck-cfg.rng 2019-11-17 16:25:10 +01:00
Sebastian 9e0ae11ca2
Donate CPU client: Fix TortoiseSVN analysis (#2353)
- Keep Visual Studio Solution/Project files
- Remove Linux library configurations
- Use correct path to solution file
2019-11-12 15:34:04 +01:00
versat c04589faf3 donate_cpu_lib.py: Prepare using new configs mfc.cfg, microsoft_atl.cfg
This will especially improve analysis of Windows projects like
TortoiseSVN which has been added with fb8b9b12cb
2019-11-12 12:15:50 +01:00
Daniel Marjamäki fb8b9b12cb donate-cpu: adjust options for TortoiseSVN 2019-11-10 13:36:34 +01:00
Daniel Marjamäki 8c9b717773 donate-cpu-server: tweaks for package http://cppcheck.sf.net/tortoisesvn.tgz 2019-11-09 19:30:15 +01:00
Sebastian b93321e038
donate-cpu.py: Add shebang, warn when run under Python 2 (#2336)
Add shebang to run the client via Python 3 by default.
Add warning if Python 2 is used.
As discussed in the forum https://sourceforge.net/p/cppcheck/discussion/development/thread/86813a8a53/ switching to Python 3 has some benefits.
2019-11-09 18:18:57 +01:00
Sebastian 828a3fda1f
pylintrc_travis: Enable more checks, fix anomalous-backslash-in-string issues (#2334) 2019-11-06 17:49:37 +01:00
Sebastian 0a38b1b511 pylintrc_travis: Enable more messages and fix issues (#2332)
The plan is to enable more and more useful messages and fix the issues
step by step to improve the code quality.
2019-11-05 21:05:43 +01:00
Sebastian 83caedec8a
donate-cpu.py: Fix two pylint warnings (#2327)
Line 102: Comparison to literal
Line 117: Unnecessary "else" after "break"
2019-11-04 18:36:14 +01:00
Maksim Derbasov afe59531c7 Triage cleanup (#2324)
* regex for version

* fields names improved

* codestyle

* m prefix for fsmodel

* string duplication removed

* find in files: show all entries

* spaces

* added hint to checkboxes; element naming fixed

* layout naming improvement

* spacing 6->1
2019-11-04 07:10:31 +01:00
Maksim Derbasov 7de55b09f8 Triage tool ui improvement (#2320)
* triage tool: ui improvement

* small code tweak

* ci fix

* ci fix 2nd attempt
2019-11-03 08:30:30 +01:00
Armin Müller c95b5d0a3c donate-cpu-server.py: Add explanation how to read timing list (#2315)
* Add explanation how to read timing list

* fixed HTML
2019-11-03 08:27:05 +01:00
Daniel Marjamäki 908cd39572 daca2-packages: improved filter for versions 2019-11-03 08:13:06 +01:00
Daniel Marjamäki dbbea54b74 daca2-getpackages: if a package has many versions then only scan latest 2019-11-03 08:05:06 +01:00
Maksim Derbasov 91a4bcd71e Triage tool usability improvement (#2319)
* gitignore for triage tool

* window header

* Search filename / in files functionallity for triage tool

* small codeclean
2019-11-01 09:29:00 +01:00