Commit Graph

1026 Commits

Author SHA1 Message Date
Daniel Marjamäki f72847530e Donate CPU: make server more robust when latest results are missing 2018-10-15 11:01:51 +02:00
Daniel Marjamäki 12c81ac0bf Remove deprecated daca scripts 2018-10-14 16:42:49 +02:00
Daniel Marjamäki 441d50df25 donate-cpu: use 1.85 as base version 2018-10-14 16:31:13 +02:00
Carlo Marcelo Arenas Belon 9d73cf08bc tools: allow short SHA1 longer than 7 (#1399)
newer versions of git use a variable lenght proportional to the
repository size (9 for cppcheck)

remove old chomp helper function and make copying the revision
smarter to hopefully cover for edge case that needed it
2018-09-28 19:04:39 +02:00
amai2012 b6103d15a6 #8711 Run Makefile target validateXML on travis 2018-09-24 14:27:02 +02:00
amai2012 cf8523b198 #8711 Extend XML being generated to validate the XML output format by adding an unmatchedSuppression. Also use proper cppcheck executable to generate them 2018-09-24 13:13:05 +02:00
LE GARREC Vincent 2675793e31 Missing return value in git-pre-commit-cppcheck (#1382) 2018-09-21 04:56:53 +02:00
Sebastian 996334eead
Donate CPU: Only extract relevant source files from archives #8716 (#1379)
Use python tarfile instead of tar to extract the packages.
Only extract source files of interest.
Skip dangerous files that could overwrite files outside the temp folder.
Fixes https://trac.cppcheck.net/ticket/8716
2018-09-15 18:56:46 +02:00
Daniel Marjamäki 91a8807810 Donate CPU: include inconclusive results 2018-09-09 13:16:39 +02:00
Sebastian 7fdd039bee
donate-cpu.py: Fix crash when wget destination file does not exist. (#1368)
When os.remove() tried to remove a file that did not exist (which is the case when the script is started for the first time or the working directory has been cleared) a FileNotFoundError was issued and the script just crashed.
2018-09-07 15:59:59 +02:00
Daniel Marjamäki 4a4d4fd2be Donate CPU: Improve diff report so changes from today can be seen separately 2018-09-06 17:31:07 +02:00
versat 1d52875d4f donate-cpu.py: Fix parameter name in comments/help text. 2018-09-06 13:15:54 +02:00
Daniel Marjamäki ee104303b7 Donate CPU: create diff report for todays results 2018-09-06 06:53:40 +02:00
Sebastian 220c06e356 Donate CPU Server: Fix broken links in crash report. (#1364) 2018-09-03 13:07:47 +02:00
Daniel Marjamäki f88326c51f Donate CPU: let the server remember latest packages when restarting 2018-09-02 14:08:09 +02:00
Daniel Marjamäki c6369e6519 Donate CPU: Added a simple time report 2018-09-02 09:35:38 +02:00
Daniel Marjamäki 215bc3b303 Donate CPU:
* timeout after 30 seconds
 * added content for http://cppcheck.osuosl.org:8000/
2018-09-02 07:28:25 +02:00
Daniel Marjamäki 79840add38 Donate CPU: Use shutil.rmtree instead of 'rm' 2018-09-01 17:04:34 +02:00
Daniel Marjamäki d5a9332684 triage: show url and filename in edit boxes 2018-09-01 07:36:58 +02:00
Daniel Marjamäki 59731d70e8 triage: set error line properly 2018-09-01 06:39:22 +02:00
Daniel Marjamäki 173c737a5c Fixed #8718 (Donate CPU: Optionally allow specifying a custom workfolder) 2018-08-31 14:29:15 +02:00
Daniel Marjamäki 5767a0ed6f Donate CPU: Added crash report 2018-08-31 14:28:01 +02:00
Daniel Marjamäki c1f436f7c0 Donate CPU: Try to handle crashes better 2018-08-29 22:07:48 +02:00
Daniel Marjamäki 1547059a21 triage: handle daca@home diffs better 2018-08-29 22:07:31 +02:00
Daniel Marjamäki 4ef59754a4 Donate CPU: Added a '--stop-time' argument 2018-08-29 11:08:56 +02:00
Daniel Marjamäki 50ded8d789 Donate CPU: Include 'elapsed time' in the output 2018-08-29 06:51:33 +02:00
Daniel Marjamäki eadb4226e9 Donate CPU: Try to fix utf-8 decode problem. Just skip invalid chars, we're not very interested in those. 2018-08-28 12:02:28 +02:00
Daniel Marjamäki ec5a13d351 Donate CPU: Fix old path 2018-08-27 18:44:17 +02:00
Daniel Marjamäki 4002fcd3e3 Donate CPU: Improved the server, now you can see diff 2018-08-27 18:21:16 +02:00
Daniel Marjamäki bbebdf0ab4 Donate CPU: Updated the 'latest.html' report 2018-08-26 16:57:09 +02:00
Daniel Marjamäki 629639f6ae Donate CPU: Updated scripts 2018-08-26 16:47:20 +02:00
Daniel Marjamäki 6ec6f70f2d Donate CPU: Concentrate on the diff 2018-08-26 16:23:42 +02:00
Daniel Marjamäki b2f0bd315d Donate CPU: Diff results in the client 2018-08-26 13:42:01 +02:00
Daniel Marjamäki 08837b2232 Donate CPU: Use CRLF in HTTP responses 2018-08-26 11:17:18 +02:00
Daniel Marjamäki c65d79c0ec Donate CPU: Speedup server. Keep packageIndex in package-index.txt 2018-08-25 20:58:31 +02:00
Daniel Marjamäki 829a373416 Python cleanup 2018-08-25 20:43:20 +02:00
Daniel Marjamäki c7880e2c8d Donate CPU: Made client python3 compatible 2018-08-25 20:34:43 +02:00
Daniel Marjamäki 5da38e33c0 Donate CPU: Make server more robust 2018-08-25 20:00:04 +02:00
Daniel Marjamäki 7049249460 Donate CPU: Tried to make scripts more robust 2018-08-25 18:38:51 +02:00
Daniel Marjamäki 18343d1122 Donate CPU: get package 2018-08-25 11:08:41 +02:00
Daniel Marjamäki 4ece582bed Donate CPU: looking at packages 2018-08-25 10:59:49 +02:00
Daniel Marjamäki 33b93cdd3a Donate CPU: send data in chunks 2018-08-25 10:25:05 +02:00
Daniel Marjamäki 48f5792ca1 Donate CPU: Speedup the latest report 2018-08-25 09:06:15 +02:00
Daniel Marjamäki efe40950c9 Donate CPU: Added report http://cppcheck.osuosl.org:8000/latest.html 2018-08-25 08:49:40 +02:00
Daniel Marjamäki 045ef9a715 Donate CPU: More updates. Run both 1.84 and head. 2018-08-24 21:07:50 +02:00
Daniel Marjamäki 28d1682a54 Donate CPU: Some fixes in donate-cpu.py 2018-08-24 18:49:11 +02:00
Daniel Marjamäki 921a1a0396 Donate CPU: add a short sleep after git clone/pull 2018-08-24 18:21:16 +02:00
Daniel Marjamäki a460ba422f Donate CPU: Fix unresolved reference 2018-08-24 14:46:59 +02:00
Daniel Marjamäki 138e53aeb9 Donate CPU: Updated client script. Try to catch compile errors better. 2018-08-24 13:20:38 +02:00
Daniel Marjamäki 8c88f65fb2 Donate CPU: minor updates in server 2018-08-24 13:04:25 +02:00
Daniel Marjamäki b049203be7 Donate CPU: updated server 2018-08-23 22:13:53 +02:00
Daniel Marjamäki 1e919e696b Donate CPU: show info on server 2018-08-23 21:54:46 +02:00
Daniel Marjamäki 40364561e3 Donate CPU: minor tweaks in client 2018-08-23 21:47:43 +02:00
Daniel Marjamäki 8459380a79 Donate CPU: Added simple client/server scripts 2018-08-23 21:31:02 +02:00
Daniel Marjamäki 3a90f1fc41 daca2-report: use 'diff' tool 2018-08-14 17:49:27 +02:00
Daniel Marjamäki 20da3d2b46 rundaca: fix syntax error 2018-08-07 09:19:33 +02:00
Daniel Marjamäki c44b72082f rundaca: try to get best folder automatically 2018-08-07 09:18:41 +02:00
Oliver Stöneberg bb27bc280a more small *.py cleanups (#1329)
* added CLion project folder to .gitignore

* adjusted project name in CMakeLists.txt

* avoid warning when compiling "Debug" with Visual Studio via CMake

There was a GCC-style compiler flag in the common flags in compileroptions.cmake which caused the following warning:
cl : Command line warning D9002 : ignoring unknown option '-O0'

* compileroptions.cmake: restored original formatting

* daca2.py: added missing import

* misra.py: removed unnecessary escaping from regular expression
2018-08-06 22:07:58 +02:00
Daniel Marjamäki 750ba1a4c1 rundaca: do not read password from command line argument 2018-08-06 13:37:42 +02:00
Oliver Stöneberg 13cf982b77 some small *.py script cleanup (#1328)
* added CLion project folder to .gitignore

* adjusted project name in CMakeLists.txt

* avoid warning when compiling "Debug" with Visual Studio via CMake

There was a GCC-style compiler flag in the common flags in compileroptions.cmake which caused the following warning:
cl : Command line warning D9002 : ignoring unknown option '-O0'

* compileroptions.cmake: restored original formatting

* some small *.py script cleanups
2018-08-05 20:36:21 +02:00
Daniel Marjamäki b68759ccf5 Added script that tests a patch with daca 2018-08-04 09:42:55 +02:00
Daniel Marjamäki bb73a741a8 daca2-report: tweaked diff report 2018-07-01 14:59:38 +02:00
Daniel Marjamäki da2867c09a daca2-report: attempt to speedup report 2018-06-29 18:14:15 +02:00
Daniel Marjamäki ba8529ce32 daca2-report: Remove column data from diff-warnings because there are changes I want to ignore 2018-06-29 15:35:13 +02:00
Daniel Marjamäki 535526680c rundaca2.py: better error output 2018-06-29 11:27:49 +02:00
Daniel Marjamäki 0ba23c28bf daca2-report: fix checking for positives 2018-06-29 11:16:08 +02:00
Daniel Marjamäki 2d00be7a9a Removed the daca2-diff script. This functionality is embedded in daca2-report instead. 2018-06-29 08:48:01 +02:00
Daniel Marjamäki 6812cb57ba daca2-report: a bit better report 2018-06-29 08:47:00 +02:00
Daniel Marjamäki fc46956a08 daca2-report: show negatives and positives 2018-06-29 07:30:20 +02:00
Daniel Marjamäki b76706fed4 Fixed #8643 (daca2: comparison of versions) 2018-06-28 22:35:48 +02:00
Daniel Marjamäki e111902682 daca: skip hashdeep and lice to avoid hangs 2018-06-21 09:26:06 +02:00
amai2012 453c663fb0
#8611 Rename xmlV2.rng. Renaming it to cppcheck-errors.rng (#1278) 2018-06-06 15:25:09 +02:00
AlexF 99bb0d975c do not need -d'^I' argument for cut command, it's easy input wrong char for invisible char without copying (#1271) 2018-05-30 12:45:32 +02:00
amai2012 ceff09d491 #5178 Supply DTD/(XSD/RNG for cppcheck XML output. Add target to Makefile to create and validate XML from regular run. Update xmlV2.rng accordingly. 2018-05-24 16:12:43 +02:00
Daniel Marjamäki 0a0ffcdac6 daca2: skip --exception-handling to avoid hangs (#8589) 2018-05-21 08:54:21 +02:00
amai2012 64f0d31280 #5718 Supply DTD/XSD/RNG for cppcheck XML output - supply rng for current XML output. Add an automatic check on travis against the --errorlist output 2018-05-17 12:46:15 +02:00
Daniel Marjamäki a716183d33 daca2-search.cgi: string concatenation 2018-05-08 06:58:39 +02:00
Daniel Marjamäki 6ed3c130e7 daca2-search.cgi: Use compound assignment 2018-05-08 06:41:05 +02:00
Markus Elfring bd6173be6e Using compiled regular expressions for DACA2 functions (#1209)
​The method “match” was used as a module-level function in ​for loops
of implementations for DACA2 functions so far.
Use ​compiled regular expression objects instead.

Delete a duplicate element from an alternation.

Link: https://trac.cppcheck.net/ticket/8553
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2018-05-07 22:18:05 +02:00
Daniel Marjamäki 78e1474f55 daca2-report: cleanup. thanks elfring for spotting this. 2018-05-07 22:13:00 +02:00
Daniel Marjamäki b2789cc2c6 daca2-report: fixed review comment 2018-05-07 22:09:26 +02:00
Daniel Marjamäki bd02aca242 daca2: if there is a crash then try to show which file it was caused by 2018-05-07 07:10:00 +02:00
Daniel Marjamäki 02fde2025b Updated run-coverity.sh script 2018-05-05 15:23:35 +02:00
Daniel Marjamäki 31ac889d38 rundaca2: remove cpulimit option 2018-05-04 22:34:04 +02:00
Daniel Marjamäki 8d3570debf triage: use the codeeditor in the gui 2018-05-02 12:59:34 +02:00
Daniel Marjamäki 3c1e39f246 daca2-addons: make it work again 2018-05-02 12:59:07 +02:00
Daniel Marjamäki 47ba7abf0b triage: updated the codeeditor 2018-05-02 10:57:04 +02:00
Daniel Marjamäki 3ef1627d11 Fix noCopyConstructor and noOperatorEq warnings in tools/triage/mainwindow.h 2018-05-01 10:55:06 +02:00
Daniel Marjamäki 2470c711e4 Fix some more Travis warnings 2018-05-01 09:43:51 +02:00
Daniel Marjamäki fce7a0a128 dump: add Function::type 2018-04-30 16:52:51 +02:00
Daniel Marjamäki 05184555b2 clang-ast: print constructors and destructors 2018-04-30 15:42:40 +02:00
Daniel Marjamäki 1bb7c7fbf2 clang-ast: ensure that '-std=c++11' is used 2018-04-30 10:28:44 +02:00
Daniel Marjamäki 45a89b1c46 compare-ast-clang-and-cppcheck: Write some statistics. 2018-04-30 10:24:01 +02:00
Daniel Marjamäki aff108a16f compare-ast-clang-and-cppcheck: Added script that compares the clang and cppcheck AST. For now it only checks if the SymbolDatabase contains the proper function objects. 2018-04-30 10:18:33 +02:00
Daniel Marjamäki f44f726e10 clang-ast: argument is source file. show CXXMethod also. 2018-04-29 22:37:18 +02:00
Daniel Marjamäki 68cd43d3f9 clang-ast: add tool that uses libclang to output ast for a file 2018-04-29 22:22:32 +02:00
alexander 795f244804 Omit test/synthetic from tags file 2018-04-19 22:42:04 +02:00
Daniel Marjamäki a8cd2ac0ea triage: update project file 2018-04-16 10:50:56 +02:00
Daniel Marjamäki 8c082f1b3f Remove lib/cxx11emu.h 2018-04-09 22:28:41 +02:00
Daniel Marjamäki 7e4dba6a7e Updated copyright year 2018-03-31 20:59:09 +02:00
amai2012 27d4495d41 Add executable bit to reduce.py 2018-03-21 09:13:26 +01:00
Daniel Marjamäki dfd8ef5d52 generate_cfg_tests: fix argument count 2018-03-19 20:46:55 +01:00
Daniel Marjamäki e932c44ae6 generate cfg tests: updated NULL pointer testing 2018-03-18 19:04:17 +01:00
Daniel Marjamäki 0741c389c0 generated cfg tests: updates, most unmatched suppressions are removed now 2018-03-18 14:06:26 +01:00
Daniel Marjamäki c800ac5118 generate_cfg_tests: updating testing for not-null 2018-03-18 13:53:46 +01:00
Daniel Marjamäki 914eea7ed1 generated cfg tests: updated test files 2018-03-18 13:22:33 +01:00
Daniel Marjamäki 52fb9d3743 generate_cfg_tests: Added tool that generates test cases from cfg file 2018-03-18 12:50:55 +01:00
Daniel Marjamäki e6cd8498a8 tools/triage: updated codeeditor 2018-02-17 22:26:35 +01:00
Sebastian 78cceea8f6
dmake: Fix windows project and build (#1091)
Replace legacy dmake.vcproj with according .sln and .vcxproj files.
Update windows code in filelister.cpp so dmake compiles and works again.
2018-02-17 06:31:12 +01:00
Daniel Marjamäki cc2eb14130 daca2-report: fixes 2018-02-15 21:21:43 +01:00
amai 0f00259a96 Validate platform files 2018-02-15 20:35:12 +01:00
Daniel Marjamäki 791f85295c tools/compare.cs: changed format for error message 2018-02-15 15:17:04 +01:00
Daniel Marjamäki a796330a50 tools/compare.cs: Rename methods 2018-02-15 14:50:13 +01:00
Daniel Marjamäki f5b0f1f792 tools/combine.cs: handle daca2 template output 2018-02-14 10:52:56 +01:00
Daniel Marjamäki 2f4261e405 tools/compare.cs: change color theme 2018-02-13 13:15:39 +01:00
Daniel Marjamäki 22db3d77f7 daca2-report.py: fixed pep8 warning 'E713 test for membership should be 'not in'' 2018-02-13 09:31:05 +01:00
Daniel Marjamäki fe1ae7240a python formatting. Run autopep8 and replace tabs with spaces.
autopep8 -i --max-line-length=160 *.py
    sed -i 's/\t/    /' *.py

[ci skip]
2018-02-13 09:26:11 +01:00
Daniel Marjamäki f624905534 tools/compare.cs: minor tweaks 2018-02-12 21:12:40 +01:00
Daniel Marjamäki cd5adf0707 tools/compare.cs: Added a tool that compare reports and generate a webreport 2018-02-12 16:24:13 +01:00
Daniel Marjamäki c26ae955ad tools/triage: set proper shuffle seed, less priority for results in tests 2018-02-09 21:44:53 +01:00
Daniel Marjamäki c650c8a111 tools/triage: try to unpack package from ~/daca2-packages 2018-02-08 22:18:50 +01:00
Daniel Marjamäki a2d9b3fbb3 triage: moved source code 2018-02-08 08:27:16 +01:00
Daniel Marjamäki 7a4b0fb0e5 daca2-report: refactoring 2018-02-07 20:02:19 +01:00
Daniel Marjamäki 21c7bc9291 daca2-report: Write a summary at the bottom 2018-02-07 15:38:07 +01:00
Matthias Krüger f009cfc845 fix some typos found by codespell. 2018-02-04 20:53:43 +01:00
Daniel Marjamäki 6ce9646ac6 Triage: If there are more than 100 results then pick 100 random warnings 2018-02-04 16:14:33 +01:00
Daniel Marjamäki 7b5e994f29 triage: better handling of error messages with notes 2018-02-04 09:12:41 +01:00
Sebastian d9952dc6cf
tools/run_more_tests.sh: Fixed comment
Name of the script that uses this script was wrong.
2018-02-02 11:27:38 +01:00
Sebastian 402807b3b0 daca2.py Minor fix: fomat string argument (found by Codacity) (#1037)
* daca2.py Minor fix: fomat string argument (found by Codacity)

* daca2.py: Change print call to logging.critical call
2018-01-23 13:05:07 +01:00
Daniel Marjamäki c4caee6b18 Updated copyright year 2018-01-14 15:37:52 +01:00
Daniel Marjamäki 1ad797d220 Tools: Added script that runs coverity and uploads the result 2018-01-06 11:58:46 +01:00
Daniel Marjamäki 5eee9d6d18 tools/triage: Load results from file instead of pasting them 2018-01-02 23:39:30 +01:00
Daniel Marjamäki 95d8534d89 rundaca: increase cpu limit 2018-01-02 22:01:39 +01:00
Daniel Marjamäki d3f0f7ff12 tools/trac-keywords.py: dont include empty keyword 2018-01-01 23:08:58 +01:00
Daniel Marjamäki 2ad8ed0931 Tools: Add simple script that extract keywords from given trac database 2018-01-01 22:56:47 +01:00
Daniel Marjamäki 3b6fbd067e triage: small tweaks 2018-01-01 10:52:51 +01:00
Daniel Marjamäki 4c490b599b Tools: Add simple tool to triage daca results 2018-01-01 09:22:11 +01:00
Daniel Marjamäki 791c633d18 daca: limit cpu usage 2017-12-30 23:07:17 +01:00
Daniel Marjamäki 2545a628b2 rundaca2: fix import 2017-10-03 17:37:08 +02:00
Daniel Marjamäki a1df585ec1 rundaca2: if file upload fails, retry 2017-09-28 09:57:13 +02:00
Daniel Marjamäki b1a4860a0c extracttests.py: allow that only TP tests are extracted 2017-09-22 23:23:36 +02:00
Daniel Marjamäki 4bd251a6d9 daca2: skip docs and examples.. that might be garbage 2017-09-15 22:19:11 +02:00
Ayaz Salikhov f0b5327450 Fix codestyle (#953) 2017-09-07 13:00:46 +02:00
Daniel Marjamäki 4ca004c836 daca2-search.cgi: write summary if no arguments are used 2017-09-05 21:48:39 +02:00
Matthias Krüger bdef3f4582 daca2: add script which crawls the daca logs and feeds them into a git repository.
This can be used to track daca changes over a period of time.
2017-09-03 22:31:36 +02:00
Daniel Marjamäki e3439c0bbf daca2: added search script 2017-09-03 22:15:28 +02:00
amai 74d9883260 Use shorter rules for linking the executables 2017-08-22 23:01:18 +02:00
orbitcowboy 7c5d14bf66 Updated dmake: activated validateCFG when 'make checkcfg' is called. 2017-07-29 12:42:43 +02:00
Ayaz Salikhov 2e6a22e882 Improve Python code 2017-07-22 11:05:50 +02:00
Matthias Krüger 159e420146 dmake: fix SRCDIR=build build.
The problem was hardcoded "lib" path which needs to be $(SRCDIR)
2017-06-21 17:59:00 +02:00
Daniel Marjamäki 2665e6e60c Fix dmake, it now depends on simplecpp::simplifyPath 2017-06-21 15:29:00 +02:00
Ivan Ryabov 170cfc24a2 Make detection of clang++ compiler more robust (#915)
* Make detection of clang++ compiler more robust
* Updated makefile generator
2017-06-16 12:56:29 +02:00
Daniel Marjamäki fc79941828 fix matchcompiler.py 2017-06-05 13:41:38 +02:00
Ayaz Salikhov 3dc4188292 Improve Python code 2017-06-05 13:23:00 +02:00
Ayaz Salikhov 2dd6168258 Improve Python code 2017-06-04 22:51:48 +02:00
Daniel Marjamäki 68127adc57 daca2: minor cleanup 2017-06-04 14:09:41 +02:00
Daniel Marjamäki 2106099029 daca2: print error message (DacaWrongData) instead of crashing when wrong data is seen 2017-06-04 14:05:34 +02:00
Daniel Marjamäki 4c62190e32 daca2: dont upload results if password is not set 2017-06-03 15:53:43 +02:00
Daniel Marjamäki 6ac1aafa49 daca2-report: better handling when no packages found 2017-06-03 14:03:16 +02:00
Daniel Marjamäki 73ac088688 daca2 fixes 2017-06-03 12:10:41 +02:00
Daniel Marjamäki dd4353fac8 daca2: run stable and unstable separately 2017-06-03 11:34:11 +02:00
Daniel Marjamäki bbe90bdbdb daca2: fix comment 2017-05-27 21:12:13 +02:00
uburuntu d41d091c07 ENH: perfomance: seeking of one char is more efficiently 2017-05-27 04:15:54 +02:00
Daniel Marjamäki 0262020707 --template: Removed 'clang' and renamed 'cppcheck2' to 'daca2' 2017-05-25 05:24:42 +02:00
Matthias Krüger 3930f2d6bc try to fix "make" target (was broken due to missing comment-char). 2017-05-24 00:25:14 +02:00
amai cea82c4ee9 Add validateCFG target to validate library files against RNG 2017-05-24 00:07:59 +02:00
Daniel Marjamäki a3c0eecccf Added --template=cppcheck2 output format 2017-05-23 12:19:11 +02:00
Daniel Marjamäki 19fb99d6e8 daca2-report: update counters for clang format 2017-05-22 10:54:17 +02:00
Daniel Marjamäki 882e1e6064 daca2: use 'clang' output template 2017-05-22 07:44:58 +02:00
Dmitry Marakasov 94d39f6e91 Fix matchcompiler failure in case of parallel build
During parallel build, multiple processes will try to create build_dir
in parallel, so the build will fail. Fix that by calling makedirs
unconditionally and ignoring errors from it. If there's actual
problem with directory creation, it'll be caught later by isdir()
check.
2017-05-20 23:25:52 +02:00
amai 8fa4a92ce1 Make tags target phony. Add entry to gitignore 2017-05-20 22:27:49 +02:00
tetsuo55 2d24d5ce01 dmake: Add support for mingw64
running dmake under mingw64 causes an error
the makefile will have to be recreated
under linux
2017-05-11 10:36:37 +02:00
Alexander Mai 9d54ffd521 Correct script 2017-05-03 21:09:20 +02:00
Matthias Krüger a26abfb8e4 reduce: fix build, adapt settings. 2017-04-11 12:09:18 +02:00
Matthias Krüger c65725cb1b matchcompiler: don't emmit '!true' or '!false'. Fold to 'false' or 'true'. 2017-04-02 16:35:39 +02:00
Matthias Krüger 1e5e32c4a2 testrunner: remove non-gcc-style output format 2017-02-26 21:39:06 +01:00
Matthias Krüger 9e2650db96 reduce: main(): replace "return false;" by "return EXIT_FAILURE;", clang 4 warned about this:
tools/reduce.cpp:771:17: warning: bool literal returned from 'main' [-Wmain]
                return false;
                ^      ~~~~~
tools/reduce.cpp:776:17: warning: bool literal returned from 'main' [-Wmain]
                return false;
                ^      ~~~~~
tools/reduce.cpp:782:17: warning: bool literal returned from 'main' [-Wmain]
                return false;
                ^      ~~~~~
2017-01-17 01:32:29 +01:00
PKEuS 0236f67454 Fixed matchcompiler with Python 3.6 on Windows by using UTF-8 as encoding 2017-01-01 10:27:48 +01:00
Matthias Krüger ecc91ba914 fix a couple of issues in shell scripts found by codacy. 2016-12-25 00:43:47 +01:00
Boris Egorov 743dcdd669 daca2: Use logging module instead of opening/closing results file 2016-12-08 21:18:16 +07:00
Boris Egorov c250e385d3 daca2: Use argparse instead of manual argument parsing 2016-12-08 21:14:13 +07:00
Matthias Krüger 27bd4a7f4c daca2: enable --inconclusive 2016-12-06 11:19:33 +01:00
Daniel Marjamäki 5426cfb15e daca2: output warning id to make it possible to write more statistics 2016-12-06 09:33:41 +01:00
Matthias Krüger 59bbe6cd42 matchcompiler: simplify some more code 2016-11-26 16:27:39 +01:00
Matthias Krüger 80cb350a6b matchcompiler: remove redundant variable 'neg' and do some minor reformatting 2016-11-26 15:41:59 +01:00
Matthias Krüger b687e011f2 matchcompiler: --show-skipped: print locations of skipped patterns in file:line notation. 2016-11-24 00:36:23 +01:00
Daniel Marjamäki 0e9bf9f0c6 daca: skip virtuoso-opensource for now since it hangs 2016-10-17 09:48:02 +02:00
Daniel Marjamäki fff8aa8590 dmake: pathmatch was moved from cli to lib 2016-10-02 13:32:39 +02:00
Daniel Marjamäki e8b6235e23 dmake: pathmatch was moved from cli to lib 2016-10-02 13:15:51 +02:00
Daniel Marjamäki 3605457cbe CLI: Fix exclude of absolute path. #4399 2016-10-02 12:38:44 +02:00
Daniel Marjamäki 652043fa22 daca2: allow setting cpu limit 2016-09-20 12:46:15 +02:00
Daniel Marjamäki fd6b18f759 daca2: changed removeLargeFiles and removeAllExceptResults. hopefully these will handle problems better. And hopefully the problems will be logged better. 2016-08-21 11:54:08 +02:00
Matthias Krüger 032d2e5cd1 CXXFLAGS: remove -Winline (ticket #7693)
The debug build (with -Winline) has no optimizations and when setting optimizations for a release builds, CXXFLAGS are overridden.
So we either do a non-optimized debug build (where no inlining takes place which makes -Winline redundant) or do a release build without -Warning flags which means we would never see -O2 and -Winline together.
2016-08-19 11:19:15 +02:00
Roberto Martelloni c7c10d0b43 added python script to list in CSV format all errors without a CWE 2016-08-09 23:21:03 +01:00
Daniel Marjamäki 15c1942a64 daca2: allow skipping packages and allow setting workdir 2016-08-01 11:29:04 +02:00
Daniel Marjamäki 016bcaf9fe dmake: Disable compiler warnings for external files 2016-07-28 13:54:08 +02:00
XhmikosR 07b43c6929 Ran autopep8. 2016-07-25 13:16:55 +03:00
Daniel Marjamäki 035a9a162a daca2: write current time in report 2016-07-22 08:31:00 +02:00
Daniel Marjamäki 03d2829fb9 Merge simplecpp branch 2016-07-20 12:21:00 +02:00
Daniel Marjamäki a87b4368cb Revert "Preprocessor: Start replacing our Preprocessor code with simplecpp"
This reverts commit 9820783b60.

There was Travis errors I'll need to look more at.
2016-07-07 23:45:42 +02:00
Daniel Marjamäki 9820783b60 Preprocessor: Start replacing our Preprocessor code with simplecpp 2016-07-07 22:58:56 +02:00
Daniel Marjamäki e795eef465 rundaca: don't link libstdc++ statically 2016-07-01 15:46:20 +02:00
Daniel Marjamäki 315f705f53 rundaca: statically link libstdc++ for now 2016-06-20 10:13:56 +02:00
Daniel Marjamäki fbc499d033 daca2-download.py: minor tweaks 2016-05-22 16:39:02 +02:00
Daniel Marjamäki 98626e5a46 rundaca2.py: The START is an index 2016-05-10 11:00:57 +02:00
Matthias Krüger 9bcb36e0bb dmake: disable -Wsign-promo 2016-05-07 19:38:40 +02:00
Jérémy Lefaure 08d8b2da38 git-pre-commit-cppcheck: check only added or modified source files
The regexp is written according to git-diff-index manual.
2016-05-07 19:09:13 +02:00
Frank Zingsheim f5bf0ff824 Fixed #7392 (matchcompiler fails with python 3.5) 2016-05-04 11:19:07 +02:00
Alexander Mai 0442764467 Skip another package in daca2 (gcc-arm) to avoid timeouts 2016-04-25 20:48:11 +02:00
Daniel Marjamäki 648d492f94 daca2: don't skip insighttoolkit, it does not hang as far as I see. 2016-02-15 16:56:23 +01:00
Daniel Marjamäki a892e6eddc daca2: do not skip boost 2016-02-12 12:08:39 +01:00
Daniel Marjamäki 087b233ffd Daca2: don't skip flite anymore. Analysis without MAXTIME is still very slow. 2016-02-11 16:16:09 +01:00
Daniel Marjamäki ec9facb701 rundaca: allow that start folder is set on command line, can be used when restarting daca2. 2016-02-08 09:28:02 +01:00
Daniel Marjamäki b45c2851b0 daca2: changed checking of test code again. people might want to run cppcheck on their testcode to ensure there is not UB. we skip gcc testsuite because the torture tests are not meant to be valid. 2016-02-05 08:39:29 +01:00
Daniel Marjamäki 1d9537b259 daca2: don't run cppcheck on test code, that is rarelly meant to be valid and proper code 2016-02-05 08:34:35 +01:00
Alexander Mai 7b68da3017 Set max file size to 1MB 2016-02-02 17:44:52 +01:00
PKEuS 4b9241f643 Removed support for patterns like |a|b and a||b (equal to a|b|)
-> Improved performance by 1,3% (non-matchcompiled build)
2016-02-02 11:46:42 +01:00
Alexander Mai f8de6a66ca Raise file size limit for daca2 from 100kb to 1mb 2016-01-31 21:18:50 +01:00
Robert Reif 0ddb2f1ce1 Fixed #7298 (reduce doesn't support --library= and --std= on the command line) 2016-01-31 12:45:17 +01:00
Daniel Marjamäki 8ef17e70ca reduce: try removing codeblocks below ';{}' 2016-01-28 08:05:43 +01:00
Daniel Marjamäki 477d02bbe7 reduce: fix
[ci skip]
2016-01-27 15:30:10 +01:00
Daniel Marjamäki 4d2caff360 reduce: try to reduce blocks better 2016-01-27 15:03:52 +01:00
Daniel Marjamäki ef1dd89d72 reduce: cleanups 2016-01-27 08:20:58 +01:00
Daniel Marjamäki cb6c9e1a71 reduce.py: fix hang 2016-01-25 16:25:50 +01:00
Daniel Marjamäki 620c6e8f1c reduce: improved removing of code blocks. loop until nothing is removed. 2016-01-25 13:41:27 +01:00
Daniel Marjamäki 7d8853d604 reduce: speed up the 'combinelines' pass 2016-01-21 14:42:10 +01:00
Daniel Marjamäki 49ff511324 Added script reduce.py that reduces code. It can complement the reduce tool. It can also be used with other tools and not just cppcheck. 2016-01-21 11:03:55 +01:00
Daniel Marjamäki 516f043a43 times-vs.py: Added usage instructions 2016-01-19 13:46:21 +01:00
Daniel Marjamäki 93dd3a21fd Add times script for windows that uses VS compiler 2016-01-19 13:35:38 +01:00
Albert ARIBAUD (3ADEV) 38e70dfb74 Preprocessor directives for addons
This patch augments the XML dumps with a 'directivelist'
subnode which lists all raw preprocessor directives met
while reading the source code in each configuration.

Also, the addons/cppcheckdata.py file has been extended
to give easy access to the list of directives and to
provide Python support for the --template (or short -t)
option.

Finally, an new addon, addons/y2038/y2038.py, is created
to detect when a glibc symbol might be Y2038-sensitive,
based on whether and how _TIME_BITS and _USE_TIME_BITS64
are defined when meeting the symbol.
2016-01-15 12:36:35 +01:00
Aleksandr Pikalev e92bbf6481 Fixed #7275 - Make GUI tests buildable
* Use -std=c++11 flag for gcc and clang
 * Use $$PWD variable in qmake files to have correct paths
 * Change tokenizer.simplifyTokenList() to tokenizer.simplifyTokenList2()
 * Add build-generated files to .gitignore
 * Link libpcre only if rules are enabled
2016-01-08 15:21:36 +01:00
Martin Ettl 7cb27d91c4 dmake: Added -Wno-multichar flag. 2016-01-08 11:40:54 +01:00
Albert ARIBAUD (3ADEV) 97b43c78ce Run all Python code through autopep8
Run all Python code through autopep8 as follows:

    autopep8 -ri --ignore=E261,E262,E302 --max-line-length 1000 .

E261 or E262 would cause spaces after a comment's hash sign
to be squashed. Since some of the comments in cppcheck's
Python code have space-indented code examples, not ignoring
E261 or E262 would wreck the formatting of those examples.

E302 prevents autopep8 from adding some blank lines.

setting --max-line-width ensures no line will be wrapped.
2016-01-05 13:30:32 +01:00
Albert ARIBAUD (3ADEV) 4b247c94dd Remove tools/argparse.py
As cppcheck only supports Python 2.7 and 3, and as
both provide argparse already, we can remove the
one in cppcheck.

build/*.cpp, as generated with "make SRCBUILD=build",
is strictly unchanged by this removal.
2016-01-05 10:25:12 +01:00
Matthias Krüger d3093a6ca5 reduce: fix build 2016-01-03 17:29:40 +01:00
Daniel Marjamäki ca4f55ec4c Cleanup Copyrights. Now all should be just for Cppcheck team. 2016-01-01 23:04:16 +01:00
Lauri Nurmi 996c9244d8 Update copyright year to 2007-2016. 2016-01-01 15:34:45 +02:00
Daniel Marjamäki 8171154e12 Fixed #7230 (Confusing code snippet in error message) 2015-12-31 01:15:49 +01:00
Matthias Krüger 315d50271a add small script which converts code to a format for testrunner testcases. 2015-12-17 14:25:24 +01:00
Frank Zingsheim e0e8c3fe60 Fix #7210 (Compiled match versus parsed match "|a|b") 2015-12-11 20:21:38 +01:00
Daniel Marjamäki 392cda8bce Remove qmake pro files. qmake is just for cppcheck-gui nowadays. 2015-12-11 15:20:57 +01:00
Alexander Mai f762affea0 Small refactoring: replace NULL by nullptr, remove redundant static keyword, Tokenizer::setVarId() uses const variable 'notstart' 2015-11-30 22:13:49 +01:00
Daniel Marjamäki a5149d68ab daca2: fix compilation of cppcheck 2015-11-23 11:19:44 +01:00
Daniel Marjamäki 0f9d90d2be Changed Copyrights. Removed my name. 2015-11-18 20:04:50 +01:00
Daniel Marjamäki d0e1583f20 daca2: compile with debug info, when there is exception write info on stderr 2015-11-18 13:36:23 +01:00
Alexander Mai 6cf7ff4243 Try to get error information upon crash in daca2 into log output 2015-11-15 20:38:55 +01:00
Alexander Mai 65666a1ba4 Makefile: explicit list directories which should be used with ctags. Run astyle. 2015-11-15 19:03:18 +01:00
Simon Martin 14d2830e49 Restore build on OSX, where make defines CXX as "c++" by default. 2015-11-14 07:53:34 +01:00
orbitcowboy ab90a7eb49 Fixed broken HAVE_RULE support. Updated Makefile. Added override keyword when HAVE_RULES is set. 2015-11-13 11:38:06 +01:00
Matthias Krüger 11915f84e2 dmake: force-add -std=c++0x if we compile with g++ or clang++ 2015-11-10 21:07:06 +01:00
Alexander Mai ab296fa93f 7111 segmentation fault (invalid code) in Tokenizer::simplifyRedundantParentheses 2015-11-08 13:45:55 +01:00
Alexander Mai 445907d930 Makefile: Move -std=c++0x to CXXFLAGS to allow using other compilers 2015-11-08 12:52:56 +01:00
Boris Egorov c74529ae08 Add git pre-commit hook script 2015-10-19 11:23:01 +02:00
Matthias Krüger 73b088a6dd dmake: don't compile clang build with -D_GLIBCXX_DEBUG since it breaks the build. 2015-10-05 09:50:18 +02:00
Daniel Marjamäki 7f4d39270c Updated DACA2 scripts 2015-09-28 09:08:37 +02:00
Daniel Marjamäki b7ee08ea65 remove unused script aws.py 2015-09-10 07:29:42 +02:00
Alexander Mai 0d7d1e8350 Add 'run-dmake' as PHONY target to Makefile to avoid linking dmake always 2015-09-05 17:12:15 +02:00
Daniel Marjamäki 1b29a99e45 tools: refactoring daca2 2015-08-21 15:46:10 +02:00
XhmikosR 7d0075357e PEP8 fixes.
[ci skip]
2015-08-21 11:59:52 +03:00
Daniel Marjamäki cde7f48feb push my rundaca2.py script I use 2015-08-20 12:57:45 +02:00
Daniel Marjamäki e5308a105a daca2-addons: fix scripts 2015-08-19 15:02:09 +02:00
Daniel Marjamäki 153ac90663 daca2: added scripts for running addons 2015-08-19 14:45:42 +02:00
Dmitry Marakasov 3bf737acbd Make DB2MAN overridable
On different systems it may point to different locations, e.g. FreeBSD uses ${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl
2015-08-17 19:31:08 +03:00
PKEuS 4d80df2f4a Added pointer to Type to Token (similar to Token::Variable() and Token::function()):
- Accessible via Token::type()
- Renamed former Token::type() to Token::tokType()
- Removed SymbolDatabase::isClassOrStruct()
2015-08-15 11:19:21 +02:00
Alexander Mai a4e0a8bf54 daca2: enable exception-handling and drop valgrind from list of skipped packages 2015-08-01 17:41:26 +02:00
Daniel Marjamäki 8d3b5bb95e generate_and_run_more_tests: Add testuninitvar 2015-07-26 11:29:02 +02:00
Daniel Marjamäki 856d496c71 fix dmake 2015-07-23 15:02:32 +02:00
PKEuS 91c7361034 Fixed dmake and travis build 2015-07-23 14:53:18 +02:00
Frank Zingsheim 907dea92b1 Fixed #6844 (CMake with matchcompiler) 2015-07-23 10:49:53 +02:00
Daniel Marjamäki f37c6b9e76 generate_and_run_more_tests: add testnullpointer 2015-07-22 18:17:04 +02:00
Daniel Marjamäki 1df46140c1 generate_and_run_more_tests.sh: Refactoring 2015-07-22 13:44:08 +02:00
Daniel Marjamäki 4039e231a5 Add test scripts for 'Extra tests' 2015-07-22 13:07:17 +02:00
Daniel Marjamäki bb95bc9fc5 Travis: run extra tests 2015-07-22 12:55:39 +02:00
Daniel Marjamäki b2b4bb49fa Refactoring handling of comparisons 2015-07-22 12:31:18 +02:00
Daniel Marjamäki c67776c04d Testing: extract testcases, edit comparisons, run cppcheck, compare results 2015-07-22 09:52:24 +02:00
Daniel Marjamäki 678d755ce5 disable -Woverloaded-virtual warnings to avoid a few FPs 2015-06-30 20:38:15 +02:00
Daniel Marjamäki d0e6b77fd1 cppcheckdata.py: moved file from tools to addons 2015-06-21 09:47:52 +02:00
Daniel Marjamäki 0bdd355fac cppcheckdata.py: update ValueFlow handling 2015-06-20 21:58:23 +02:00
Frank Zingsheim 6ba2534f32 Fixed #6716 (Performance: Alternative String Representation in Match Compiler)
Quickfix of tools/test_matchcompiler.py for Alternative String Representation
_matchStrs does not exist in Match Compiler anymore.
2015-06-07 20:24:33 +02:00
Frank Zingsheim bac5aac92a Fixed #6716 (Performance: Alternative String Representation in Match Compiler) 2015-06-07 16:18:40 +02:00
Daniel Marjamäki 42e82eda96 dmake: suppress Wsign-compare warnings in release builds 2015-05-02 10:29:52 +02:00
Daniel Marjamäki 54ecf8af82 daca2-report: handle \r also 2015-04-29 17:23:24 +02:00
XhmikosR c090ed2fc9 PEP8 fixes.
[ci skip]
2015-04-20 21:11:45 +03:00
Daniel Marjamäki 066b24dc9c dmake: disable -Wconversion to avoid false positives when compiling 2015-04-15 11:32:52 +02:00
Matthias Krüger f714f38089 reduce: fix cppcheck style remark about CppcheckExecutor not being explicit.
[tools/reduce.cpp:47]: (style) Class 'CppcheckExecutor' has a constructor with 1 argument that is not explicit.
2015-04-07 01:58:10 +02:00
Matthias Krüger 80be769912 matchcompiler: pep8 fixes 2015-03-20 09:32:56 +01:00
Alexander Mai b5f0eec44a #6559 Regression/ false positive: Return value of allocation function OpenFile is not stored. Add required definitions to windows.cfg, include afx_msg. Add test file test/cfg/windows.cpp to check windows configuration. Fix for gnu.cfg. FileLister now features a non-recursive mode. 2015-03-05 06:48:44 +01:00
Daniel Marjamäki 9b874b97f0 add parse-glibc script that match annotations in system headers against cppcheck cfg files 2015-02-26 20:40:40 +01:00
PKEuS 688d5d5c54 matchcompiler.py: Added missing parantheses 2015-01-31 12:36:22 +01:00
PKEuS b2835051df Refactorization: Renamed Token::Match pattern %var% to %name%, implement new pattern %var% which is true if varId > 0. 2015-01-31 12:32:04 +01:00
Matthias Krüger e56671101e tests: add a script which runs test/cfg tests.
add new make target (checkcfg) which builds cppcheck and executes the script
       make travis run checkcfg
2015-01-27 19:46:52 +01:00
Thomas Jarosch 0c21f77873 MC: Add ability to show skipped (=non-compiled) patterns 2015-01-09 22:50:42 +01:00
Thomas Jarosch 5b4f543c3b Match compiler: Support match patterns with escaped quotes
This allows us to compile patterns like 'extern "C"'.
Fixes long standing open issues in the MC unit test.
2015-01-09 22:41:40 +01:00
Thomas Jarosch 027ce0e81f Match compiler: Add unit test for C string replacements 2015-01-09 20:20:54 +01:00
Thomas Jarosch 07231c832c Match compiler: Allow multiple spaces / no space at all when searching for C-strings
This catches 32 more C strings.
2015-01-09 01:18:50 +01:00
Thomas Jarosch 965775423b Remove useless forward declarations
Instead move the 'static' keyword to the function implementation.
2015-01-08 23:58:00 +01:00
Daniel Marjamäki ff11ba9847 Updated copyright year to 2015 2015-01-03 12:14:58 +01:00
Thomas Jarosch 95940ff0ef python3 compatibility 2014-12-22 16:04:29 +01:00
Thomas Jarosch 91e45ba8d7 pep8 fix
pep8 reported:
extracttests.py:233:16: E713 test for membership should be 'not in'
2014-12-22 14:27:47 +01:00
Daniel Marjamäki 051d42ae6b astyle formatting 2014-11-20 14:20:09 +01:00