Commit Graph

946 Commits

Author SHA1 Message Date
Sebastian a309095ec3
donate-cpu-server.py: Fix rare version verification issue (#2008)
The loop should be exited as soon as the line with the Cppcheck version
information has been found. Not only when the verification failed.
2019-07-17 14:29:07 +02:00
Sebastian 7d7078f126 Makefile/dmake: Increase stack size to 8M for Cygwin builds to avoid segfaults (#2001)
* Makefile: Increase stack size to 8M for Cygwin builds to avoid segfaults

See https://github.com/danmar/cppcheck/pull/1988
and https://github.com/danmar/cppcheck/pull/1998

* dmake.cpp: Add parameter to CXXFLAGS for increased stack size in Cygwin
2019-07-16 12:14:18 +02:00
Oliver Stöneberg 4561229906 donate-cpu.py: treat signal 6 (SIGABRT) as crash as well so we get a … (#1995)
* donate-cpu.py: treat signal 6 (SIGABRT) as crash as well so we get a stack trace in the result

* donate-cpu.py: simplified returncode/signal check / also generate stack traces for SIGILL, SIGFPE, SIGBUS

* donate-cpu.py: avoid usage of "not" in if

* donate-cpu.py: do not overwrite returncode in crash handling
2019-07-15 15:37:31 +02:00
Daniel Marjamäki 5bc0347fd5 Remove 'unsigned' in match compiler 2019-07-15 13:49:35 +02:00
Sebastian 9b1066f0bc donate-cpu.py: Enable sqlite3 library for local includes. (#1973)
Many projects use a local copy of the sqlite3 library and several of
them use local includes.
2019-07-09 15:59:00 +02:00
Sebastian c45dff1e1d
openmp.cfg: Add library configuration for OpenMP (#1956)
See https://www.openmp.org/
2019-07-05 03:00:52 +02:00
Sebastian db3284e3dd
donate-cpu-server.py: Fix #9192: Old results are shown in the reports (#1941)
Trac ticket: https://trac.cppcheck.net/ticket/9192
This commit also fixes that negative values of the elapsed time are
used for calculating total times. These crashes and errors are now
ignored in the time report since there is no useful timing information
in that case.

Tested with a local daca@home server with old and new results.
2019-07-01 14:55:38 +02:00
Sebastian fd3e1ceefc
donate-cpu.py: Enable new libraries (planned after release of 1.88) (#1940)
Tested locally
2019-07-01 10:40:10 +02:00
Daniel Marjamäki 8be4af33d3 tools/donate-cpu-server: speed up the diff reports using the new diff files 2019-06-30 23:16:04 +02:00
Scott Furry e459762bcd Suppress Code semantic and syntax warnings (#1936)
Sources were built with Clang but with increased verbosity of error detection.

A number of syntax and semantic warnings were encountered. Commit adds
changes to correct these warnings.

Some changes involve removing extra, and unncessary, semi-colons at EOL
(e.g. at end of switch clause).

Project astyle settings are not currently setup to detect if a file is to
have an extra carriage return after the last line of data. Two files were
altered to ensure an extra carriage return.

An advisory to enhance code was encountered in triage code. Clang advisory
on a for-loop interation value suggested that:
`use reference type 'const QString &' to prevent copying`
2019-06-30 21:43:25 +02:00
Daniel Marjamäki 7fe021199b tools/pr.py: use -b to just checkout pull request code in a branch 2019-06-30 21:24:11 +02:00
Daniel Marjamäki c0b06fbce9 tools/readme.md: short description of astyle-client 2019-06-30 19:20:29 +02:00
Daniel Marjamäki daa770a5ee tools/daca2-report.py: I removed this script, I do not see any usage for it 2019-06-30 18:53:09 +02:00
Daniel Marjamäki 098144fbe8 donate-cpu-server.py: Fixed bug 2019-06-30 14:14:02 +02:00
Daniel Marjamäki c9db395d43 donate-cpu-server: Refactor diff handling. Statistics for a package is generated when the package is uploaded. 2019-06-30 14:02:51 +02:00
Daniel Marjamäki 423e23b430 donate-cpu: changed names 2019-06-30 12:43:05 +02:00
Daniel Marjamäki 090fa255e8 daca@home: use Cppcheck-1.88 as base version 2019-06-29 11:01:42 +02:00
Daniel Marjamäki 243db9b69a astyle_client: reformat given source files 2019-06-27 09:24:22 +02:00
Daniel Marjamäki 0f89280b94 astyle: tweaks in client 2019-06-26 20:53:59 +02:00
Daniel Marjamäki 7e68ba5a87 astyle: minor tweaks in client/server scripts 2019-06-26 20:38:21 +02:00
Daniel Marjamäki 76542509a8 astyle: Added client/server 2019-06-26 20:27:02 +02:00
Scott Furry 0d76d078e2 Implement User Selectable Code Editor Style in cppcheck-gui (#1913)
Building on #1874, commit adds user controls to choose
or edit style in cppcheck-gui ONLY. Commit does not
address CodeEditor style usage in triage app at this time.

Code Editor style can be altered from the added "Code Editor"
tab in the user preferences. The user has the option to select
default light, default dark, or to customize.

If user leaves the style set to light or dark defaults, this
will be reflected in the choices shown in the preferences
dialog.

User choice for Code Editor Style is saved in the cppcheck-gui
preferences under the heading "EditorStyle".
2019-06-23 19:04:53 +02:00
Daniel Marjamäki 1b4485a738 Makefile: Add one more flag 'MATCHCOMPILER=yes' 2019-06-23 13:43:09 +02:00
Ken-Patrick a83b308300 Fix run-dmake step (#1894) 2019-06-16 15:06:28 +02:00
orbitcowboy 9d34ff6fb9 nspr.cfg: Added (limited) support for some macros from Netscape Portable Runtime (NSPR) library. Reference: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR 2019-06-16 13:32:03 +02:00
Daniel Marjamäki a140095bbe Fix Cppcheck warning 2019-06-15 14:37:02 +02:00
Paul Fultz II 12f4353d40 Add build scripts for triage tool (#1862) 2019-06-01 10:48:39 +02:00
Carlo Marcelo Arenas Belón bf5c71bdca sync (#1835)
* build: remove -Wabi and add -Wundef

gcc >= 8 throws a warning about -Wabi (without a specific ABI version)
being ignored, while -Wundef seems more useful (as shown by the change
in config.h, which was probably an unfortunate typo)

travis.yaml should probably be updated soon, but was left out from this
change as the current images don't yet need it

* lib: unused function in valueflow

refactored out since 8c03be3212

lib/valueflow.cpp:3124:21: warning: unused function 'endTemplateArgument' [-Wunused-function]

* readme: include picojson

* make: also clean exe
2019-05-17 09:31:41 +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 b0e1138f80 pr.py: fix 2019-04-16 20:13:38 +02:00
Daniel Marjamäki 0c3a6b44f8 tools/pr.py: add --rebase=true to pull command and abort if there are conflicts 2019-04-15 06:59:28 +02:00
IOBYTE 2b6d599f1e donate-cpu.py: show size of results sent to server (#1784) 2019-04-05 14:11:03 +02:00
Oliver Stöneberg 6e6cdae20e donate-cpu.py: improved error handling when fetching cppcheck version (#1780)
During a local scan it did not get any cppcheck versions causing the script to fail with an exception when creating the diff.
2019-04-04 13:09:35 +02:00
versat 20814d37d0 donate-cpu-server.py: Fix wrong detection of invalid messageIds.
Packages now can contain something like:
```
    head results:
    Checking temp/openvdb/Platform.cc: __GNUC__=1...
    [New Thread 7892.0x91c]
```
"New Thread 7892.0x91c" was wrongly identified as messageId in the HEAD
report.
This commit adds code to skip lines that start with `[` or where the
messageId contains at least one space.
2019-04-03 11:46:45 +02:00
Oliver Stöneberg 8c26d4ee6a donate-cpu.py: more error detection improvements / properly update data on server (#1768)
* donate-cpu.py: made exitcodes > 0 negative so they will be detected a crash / changed the ThreadExecutor error to -222

* donate-cpu.py: unconditionally upload results and info now that errors are properly handled - will also properly clear the result/info in case there are no more messages

* donate-cpu.py: bumped version

* donate-cpu.py: added stdout to output in case of exitcode != 0

* donate-cpu.py: do not scan packages with no relevant files

* donate-cpu.py: bumped version
2019-04-03 09:27:04 +02:00
versat 6b9a25869e donate-cpu.py: Improve upload error handling, remove old "fast" code.
If an upload fails, the reason (exception text) is now printed.
Fix: If the last retry failed do not wait until continuing.
Remove some obsolete "fast" code in the uploadResults() function.

Tested with Python 2.7.16 and Python 3.6.8.
2019-04-02 10:23:57 +02:00
versat a05cdadbf4 donate-cpu-server.py: Remove obsolete experimental "fast" code.
Since the directory for the results does no longer exist on the server,
the server currently crashes every time older clients try to upload
experimental fast results via "write-fast" command.
Now this command is just ignored so the server is instantly ready
again after a "write-fast" command.
2019-03-29 12:52:27 +01:00
Oliver Stöneberg 36950d7d0d donate-cpu-server.py: added stale report / cleanups (#1767)
* donate-cpu.server.py: increased "Package" column width for latest report and small cleanup

* donate-cpu.server.py: added date and time to crash report

* donate-cpu.server.py: simplified strDateTime()

* donate-cpu.server.py: add stale report to show results which are older than 30 days

* donate-cpu-server.py: added version and some logging
2019-03-29 12:12:16 +01:00
versat cdb449a1b8 donate-cpu.py: Only some cosmetic / coding style fixes. 2019-03-29 09:51:56 +01:00
Oliver Stöneberg 8d7d93aea7 donate-cpu.py: improved error detection (#1766)
* threadexecutor.cpp: streamlined error messages

* donate-cpu.py: detect additional signals and exitcode != 0 as crash as well and (ab)use elapsedTime to make the errorcode visible in the output / also detect ThreadExecutor issues

* donate-cpu.py: bumped version

* donate-cpu.py: fixed detection of ThreadExecutor errors
2019-03-29 06:53:40 +01:00
Oliver Stöneberg 7d383d1684 donate-cpu.py: add stack traces for daca@home crashes / bugfixes (#1764)
* Get stack traces for daca@home crashes

If a command in daca@home crashes, execute it again within gdb to get a stack trace.

* donate-cpu.py: added "gdb" to checkRequirements()

* donate-cpu.py: handle wget failures

* donate-cpu.py: added --no-upload option to disable all uploads

* donate-cpu.py: set max_packages to 1 if --package is provided to avoid endless processing of the same package

* donate-cpu.py: no longer treat missing sources as a crash

* donate-cpu.py: fixed wget "http://: Invalid host name." error caused by empty argument in subprocess.call()

* donate-cpu.py: added --no-upload to --help

* donate-cpu.py: detect crashes when using -j1

* donate-cpu.py: added -g to compiler flags

* donate-cpu.py: fixed gdb call and stacktrace printing / always pass "-j1" to gdb call so the exception will actually occur in the application

* donate-cpu.py: removed left-over --verbose from wget call

* donate-cpu.py: removed unnecessary break

* donate-cpu.py: only use gdb for crash in head run / actually provide the stack trace for the output

* donate-cpu.py: include the last checked file with the stack trace

* donate-cpu.py: removed unnecessary wget() call and a sleep in it / also inverted some logic

* donate-cpu.py: small hasInclude() optimization

* donate-cpu.py: bumped version number

* donate-cpu.py: detect start of gdb output when Cygwin is used

The Cygwin output looks like this:

Thread 1 "cppcheck" received signal SIGSEGV, Segmentation fault.

Co-Authored-By: firewave <firewave@users.noreply.github.com>
2019-03-28 15:49:20 +01:00
Daniel Marjamäki 8231912af9 daca2-getpackages: more protection when it goes wrong 2019-03-27 06:41:35 +01:00
Daniel Marjamäki 8f7eae2948 daca2-getpackages: terminate with an exit code if download fails 2019-03-27 06:33:08 +01:00
Daniel Marjamäki c7155a8e08 Removed '--experimental-fast' flag 2019-03-17 08:19:56 +01:00
versat 4e051ef865 donate-cpu.py: Improve Python library detection.
The official documentation recommends to include the Python C API via
`#include "Python.h"`:
https://docs.python.org/3/c-api/intro.html
And many projects do it exactly this way, that is why the client script
often does not detect the usage of the Python C API.
2019-03-15 16:16:38 +01:00
versat 49f2fd6d4a donate-cpu.py: Detect and use ruby library. 2019-03-15 15:34:06 +01:00
Sebastian 1230357146
Library: Add initial configuration with tests for SQLite3 library. (#1737) 2019-03-13 13:57:40 +01:00
Daniel Marjamäki 35bbe5617a Revert "Add semver import for sorting ls-lR list (#1735)"
This reverts commit e61343f213.
2019-03-12 06:25:11 +01:00
Bo Rydberg e61343f213 Add semver import for sorting ls-lR list (#1735) 2019-03-12 06:14:31 +01:00
Daniel Marjamäki 5915fd50a5 triage: add options 'show 100 random results' and 'version' 2019-03-09 11:01:22 +01:00