Commit Graph

510 Commits

Author SHA1 Message Date
Matthias Krüger ea18e4b245 daca: count varid 0 occurences per file. 2014-03-12 12:49:06 +01:00
XhmikosR aabee422e0 PEP8 fixes. 2014-03-11 17:42:14 +02:00
Alexander Mai b44c1b52ee daca2: made mainpage report sortable 2014-03-09 08:33:27 +01:00
Simon Martin a3d1cac79c Ticket #5373: Keep track whether tokens come from a C or C++ file to properly handle %type% in Token::Match with "delete" 2014-03-08 21:26:06 +01:00
Daniel Marjamäki dddd9848b8 daca2: remove ../clang/INPUTS/.. files since these take so long time to scan 2014-03-06 20:36:52 +01:00
Daniel Marjamäki 5eb79f0fa5 Merge pull request #252 from matthiaskrgr/dmake_externals
Dmake externals
2014-03-04 06:04:11 +01:00
Matthias Krüger c108321329 dmake: when building cppcheck. do not include "externals" dir, there are no files in there (only the tinyxml dir which is already handled via -Iexternals/tinyxml). 2014-03-03 12:09:21 +01:00
Matthias Krüger a9df4a3288 man, htdocs, gui, test, tools: bump a few more copyrights to 2014 2014-03-03 11:03:17 +01:00
Daniel Marjamäki 43d48574c5 ci.py: fixed daca2folder() when results is empty 2014-02-23 10:26:01 +01:00
Daniel Marjamäki 1d801ce7b1 daca2: fixed wget function 2014-02-23 10:21:00 +01:00
Daniel Marjamäki 6273a270c7 daca2: tell wget to overwrite file. We want that the correct file is used. 2014-02-22 07:52:51 +01:00
Lauri Nurmi 91340d4043 Emulate the C++11 'nullptr' and 'static_assert' 2014-02-15 07:52:17 +01:00
Daniel Marjamäki fd3a8a2a18 Update copyright 2014-02-15 07:45:39 +01:00
Daniel Marjamäki b88fbb9857 CI: run daca2 on oldest folder 2014-02-07 06:37:42 +01:00
Matthias Krüger ec7e54c123 daca2: count crashes of cppcheck in index table. 2014-01-29 12:54:52 +01:00
Daniel Marjamäki a7146916b1 Makefile: added -Wno-sign-compare. I don't like this warning 2014-01-18 09:51:48 +01:00
Ryan Pavlik 065db3d9f6 Add a rule to the cli makefile to actually build TinyXML2 2014-01-17 15:52:05 -06:00
Matthias Krüger 0cfd60aa34 travis: rewrite config file.
Uses CXXFLAGS -O2 instead of default flags to speed up self checking.

Testing is done with the following settings:

1) gcc    CXXFLAGS=-O2
2) gcc    CXXFLAGS=-O2  SRCDIR=build VERIFY=1
3) gcc    CXXFLAGS=-O2  MAKEFLAGS="HAVE_RULES=yes"
4) gcc    CXXFLAGS=-O2  SRCDIR=build VERIFY=1  MAKEFLAGS="HAVE_RULES=yes"
5) clang  CXXFLAGS=-O2
6) clang  CXXFLAGS=-O2  SRCDIR=build VERIFY=1
7) clang  CXXFLAGS=-O2  MAKEFLAGS="HAVE_RULES=yes"
8) clang  CXXFLAGS=-O2  SRCDIR=build VERIFY=1  MAKEFLAGS="HAVE_RULES=yes"

Changes made to before_install:
installe libpcre3

Changes made to script:
* make and make test are now called seperately
* cppcheck also checks "build" folder (created by SRCDIR=build) if existing.
* gui is built twice, one time with HAVE_RULES=yes as qmake argument and one time without it.
* a script has been added and run which returns false if cppcheck --showtime=top5 does not return 7 lines indicating that something is broken
2014-01-12 22:47:21 +01:00
Daniel Marjamäki 424675982a dmake: use -std=c++0x instead of -std=c++11 as it's supported by earlier gcc 2014-01-12 15:38:51 +01:00
Daniel Marjamäki 50c8075b15 dmake: use -std=c++11 even if CXXFLAGS is redefined 2014-01-12 13:47:53 +01:00
Daniel Marjamäki 4224f873fd dmake: added -std=c++11 flag 2014-01-12 13:14:46 +01:00
Daniel Marjamäki d618730c96 Merge pull request #211 from matthiaskrgr/filemodes
make tools/times-tags.sh and tools/times.sh executable (mode 755).
2014-01-05 22:17:55 -08:00
Daniel Marjamäki af8f5ef57c daca2: remove aws code from daca2-report 2014-01-06 06:51:04 +01:00
Matthias Krüger bf34a0aafa make tools/times-tags.sh and tools/times.sh executable (mode 755). 2014-01-05 13:58:59 +01:00
Daniel Marjamäki 0851408a26 times.sh: Use SRCDIR to get more accurate results 2014-01-05 13:07:32 +01:00
Daniel Marjamäki cb40e83261 daca2: added --tries and --timeout in wget command 2014-01-02 16:50:12 +01:00
Daniel Marjamäki 5d31385161 daca2: fixed exitcode handling 2013-12-31 20:56:16 +01:00
Daniel Marjamäki 56a5b0d55f daca2: If cppcheck crash, the exitcode is nonzero. Write message in the report when the exitcode is nonzero. 2013-12-31 18:24:32 +01:00
Daniel Marjamäki a3a8edc00d ci: use CFGDIR flag 2013-12-28 12:17:30 +01:00
Daniel Marjamäki 9e0d7d86e9 dmake: Improved handling of CFGDIR 2013-12-28 12:15:08 +01:00
Lucas Manuel Rodriguez 4a46029ba6 Add readme.md for 'tools' directory 2013-12-27 13:58:08 -02:00
Daniel Marjamäki d3a848f2e6 Makefile: Added optional CFGDIR parameter that allows user to specify where Cppcheck will look for cfg files. 2013-12-26 18:41:51 +01:00
Daniel Marjamäki 31368d946b daca2-report: insert spaces between 'Most recently updated' items 2013-12-15 12:33:06 +01:00
Daniel Marjamäki 825174d394 ci.py: changed scp commands 2013-12-13 06:57:08 +01:00
Daniel Marjamäki 77a5ad03a6 ci: minor updates 2013-12-12 21:08:15 +01:00
Daniel Marjamäki 17099d74d6 ci.py: copy std.cfg to daca2 folder to get better results. 2013-12-12 20:10:46 +01:00
Daniel Marjamäki 663f5a14b0 daca2: avoid hang for iceowl package 2013-11-30 16:16:11 +01:00
Daniel Marjamäki 2b7835c5f9 daca2-report: Removed text about hardware running daca2 2013-11-28 19:27:37 +01:00
Daniel Marjamäki a4eeddd0f6 daca2-report: handle when datestr is None 2013-11-28 17:44:50 +01:00
Daniel Marjamäki 6b4016be42 daca2-report: get results from aws and show most recent results on web 2013-11-27 19:17:22 +01:00
Daniel Marjamäki d60c885f08 Daca2: use proper build flags in ci.py 2013-11-24 14:57:54 +01:00
Daniel Marjamäki 4e626d0907 daca2: update aws script. copy results for raspberry. 2013-11-24 14:55:49 +01:00
Daniel Marjamäki d5bb5d6b77 daca2: Change date field to date when analysis ends. 2013-11-24 10:50:16 +01:00
Daniel Marjamäki 02c299405b daca2: write number of error,warning,performance,portability,style in report 2013-11-24 10:47:12 +01:00
Daniel Marjamäki 514218da31 Daca2: Updated aws compilation flags 2013-11-23 16:38:52 +01:00
Daniel Marjamäki 0be5caf48d Daca2: updated aws script 2013-11-23 16:35:52 +01:00
Daniel Marjamäki a62a46c010 DACA2: little cleanup of aws script 2013-11-23 16:25:04 +01:00
Daniel Marjamäki a35a3236d6 Daca2: Added aws.py for secondary daca2 script 2013-11-23 16:22:11 +01:00
Daniel Marjamäki 992f61d911 ci.py: refactoring 2013-11-23 16:00:28 +01:00
Daniel Marjamäki 007e2d9dd5 daca2: handle links better 2013-11-18 17:59:47 +01:00
XhmikosR ff4cf68338 Improve daca2-report.py.
* remove empty <td>
* add meta charset
* remove double space
* remove unneeded escapes
2013-11-10 17:35:31 +02:00
Daniel Marjamäki e73acbaab6 daca2-report: graphical updates. write date when each 'folder' is updated. write some more description about the project. try to fix problem that & is not displayed properly 2013-11-04 13:18:01 +01:00
Daniel Marjamäki 46b4a19bd3 Added CI script to repo 2013-11-02 17:39:42 +01:00
Daniel Marjamäki e948f4c9ee daca2: don't remove large text files. there was some strange problem that results.txt was removed when a results.txt in a subfolder was removed. 2013-11-02 12:03:25 +01:00
Daniel Marjamäki b577b12660 daca2: skip boost to avoid hang 2013-10-28 18:09:05 +01:00
Daniel Marjamäki 9faaef840b daca2: check all extracted files 2013-10-27 07:53:23 +01:00
Daniel Marjamäki aaf5bbb7ad daca2: minor tweaks of wget and removeLargeFiles 2013-10-26 11:47:15 +02:00
Daniel Marjamäki 45e7c488a0 daca2: dont terminate when a package fails. try to continue. 2013-10-25 06:43:08 +02:00
Daniel Marjamäki 2f864dec49 daca2: fixes 2013-10-24 18:36:08 +02:00
Daniel Marjamäki ab2864e1cb daca2: use ls-lR file 2013-10-24 18:22:15 +02:00
Daniel Marjamäki fc9998e439 daca2: bailout if download fails 2013-10-24 17:39:37 +02:00
Daniel Marjamäki b15eeb0aa8 autopep8 formatting 2013-10-20 18:36:33 +02:00
Daniel Marjamäki 47766736fc daca2: handle xz compression 2013-10-20 12:45:05 +02:00
Daniel Marjamäki f58b4b61e2 daca2: improved command line flags 2013-10-20 11:28:16 +02:00
Daniel Marjamäki 17f8edfada daca2: tried to improve getpackages to be more robust 2013-10-20 11:25:31 +02:00
Daniel Marjamäki 4debaa2b92 daca2: alloc passing rev to script 2013-10-20 10:49:54 +02:00
Daniel Marjamäki 7f9f624215 daca2: more reliable ftp 2013-10-19 13:46:15 +02:00
Daniel Marjamäki c9491f952b daca2: skip flite, quick fix of possible hang 2013-10-19 09:53:23 +02:00
XhmikosR 0dba668661 daca2-report.py: use a doctype. 2013-10-18 17:37:03 +02:00
Daniel Marjamäki 88447385c2 autopep8 formatting 2013-10-18 17:35:59 +02:00
Daniel Marjamäki 072c80bde8 daca2: cleanup large files before cppcheck starts 2013-10-18 05:31:00 +02:00
Daniel Marjamäki 91e23c0660 daca2: don't check large files 2013-10-18 04:53:14 +02:00
Daniel Marjamäki 2d38245ea7 daca2-report: rephrazed 'Most recently updated' 2013-10-16 22:31:33 +02:00
Daniel Marjamäki c593092611 daca2-report.py: Added script that generates daca2 report 2013-10-16 18:15:51 +02:00
Daniel Marjamäki 94f91f20e1 daca2: improved cleanup 2013-10-16 17:22:00 +02:00
Daniel Marjamäki cee40beee1 daca2: removing readonly files/folders 2013-10-14 15:49:11 +02:00
Daniel Marjamäki 554790afcf daca2: refactoring. gather list of archives from ftp server then disconnect. 2013-10-13 14:13:10 +02:00
Daniel Marjamäki a305698442 daca2: catch EOFError exceptions 2013-10-13 13:10:25 +02:00
Daniel Marjamäki cb56db5f21 daca2: import missing datetime module 2013-10-13 11:47:51 +02:00
Daniel Marjamäki a61ccf2e9a daca2: write date in results 2013-10-13 11:43:05 +02:00
Daniel Marjamäki 69ec624ea5 daca2: refactoring 2013-10-13 11:10:22 +02:00
Daniel Marjamäki 398ed973f4 matchcompiler: autopep8 formatting 2013-10-13 11:01:50 +02:00
Daniel Marjamäki a7e925283a daca2: autopep8 formatting 2013-10-13 10:51:18 +02:00
Daniel Marjamäki 9aee165650 daca2: catch exception when generating daca2 report 2013-10-13 10:40:01 +02:00
Daniel Marjamäki b1470dc36e daca2: choose folder from command line 2013-10-13 08:35:20 +02:00
Daniel Marjamäki 95138dbead daca2: generate report 2013-10-13 08:07:39 +02:00
Daniel Marjamäki aa1b77f45d daca2: removed -j2 to reduce cpu load 2013-10-12 20:40:04 +02:00
XhmikosR e6e6335473 Revert 568a49c409 and do the changes properly. 2013-10-12 19:44:07 +03:00
XhmikosR 568a49c409 daca2.py: PEP8 fixes 2013-10-12 18:50:54 +03:00
Daniel Marjamäki d30ebe268a daca2: refactorings and fix of indentlevel that might have screwed up the script. 2013-10-12 16:49:37 +02:00
Daniel Marjamäki 0b9d0e48cf daca2: added script that runs cppcheck on debian source code 2013-10-12 14:02:03 +02:00
Daniel Marjamäki ee325008c4 dmake: install htmlreport 2013-10-12 12:26:27 +02:00
Daniel Marjamäki 3f1e074846 reduce: Fixed compiler error (MathLib::longToString() doesnt exist) 2013-10-06 19:07:47 +02:00
Robert Reif bf8a786265 reduce: add more settings from cppcheck cli 2013-08-19 06:06:53 +02:00
Daniel Marjamäki 982f63d58e reduce: update #include order 2013-08-18 18:19:24 +02:00
Robert Reif 784a8a1fcb reduce: refactorings 2013-08-18 18:15:46 +02:00
Daniel Marjamäki 6a369f0841 astyle formatting 2013-08-18 09:01:26 +02:00
Robert Reif 865ff82425 reduce: add -D 2013-08-18 07:24:30 +02:00
Daniel Marjamäki 99cb04306d reduce: allow -I command flag to specify include paths 2013-08-17 19:46:56 +02:00
Daniel Marjamäki d41e0f82cf reduce: Fix compilation problems 2013-08-17 19:20:47 +02:00
Daniel Marjamäki cb73a1d0c7 tools/times: modified script to allow longer dataseries 2013-07-21 13:16:34 +02:00
Daniel Marjamäki 8ba14edb51 dmake: fixed lib.pri for gui (tinyxml) 2013-07-08 21:56:09 +02:00
Daniel Marjamäki d96fb577cd CLI: Added --environment flag 2013-07-02 07:18:19 +02:00
Andreas Bießmann 90a6472af9 dmake: fix for local includes
When building cppcheck we may pull in conflicting global definitions before
local ones, rearrange include order to prevent this.

Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
2013-06-03 19:45:29 +02:00
Daniel Marjamki 45cf562212 matchcompiler: fixed find(simple)match compiler problems. 2013-06-02 13:57:25 +02:00
Daniel Marjamki 35b13da3a5 matchcompiler: find(simple)match doesn't work well. the compiled functions are not static => the wrong function can be executed. this is a quick fix that just disable find(simple)match compiled patterns. 2013-06-02 12:41:34 +02:00
Frank Zingsheim 650027a07a Fixed #4797 (matchcompiler.py cannot handle overloaded findsimplematch and findmatch) 2013-05-15 18:18:58 +02:00
Daniel Marjamäki e1fd003e2d makefile: make it possible to turn on matchcompiler verifications with 'VERIFY=1' 2013-05-15 13:04:19 +02:00
XhmikosR ae73466f97 Python scripts: PEP8 fixes 2013-03-03 09:59:16 +01:00
PKEuS 2ad38c8701 Updated matchcompiler to support %cop% 2013-03-01 02:52:44 -08:00
Daniel Marjamäki c07576e07e dmake: generating unix makefile from windows. Ticket: #3887
When you commit the generated Makefile from windows you must probably be careful about the line endings.
2013-02-24 03:30:58 -08:00
Stefan Naewe 26ddf07366 tools/dmake: update with MINGW32 support
Signed-off-by: Stefan Naewe <stefan.naewe@googlemail.com>
2013-02-08 12:15:41 +01:00
Daniel Marjamäki 0a88a136ca Reduce: Added --cfg command 2013-01-27 03:20:24 +01:00
Daniel Marjamäki 89b54cb2c9 reduce: reduce structs/enums/etc better 2013-01-20 09:05:50 +01:00
Daniel Marjamäki d87d54339d reduce: fix output 2013-01-17 21:02:52 +01:00
Thomas Jarosch 4fb6751d08 MC: Enable compiled matches for Token::findmatch() and Token::findsimplematch()
Speed is exactly the same and the --verify mode of the
match compiler ensured everything works as expected.
2013-01-16 21:50:32 +01:00
Thomas Jarosch 9f9c654621 MC: Implement verify mode for compiled Token::findmatch patterns 2013-01-14 11:18:33 +01:00
Thomas Jarosch 63e18d6b1c MC: Split _replaceTokenFindMatch() into two small functions 2013-01-14 11:06:59 +01:00
Thomas Jarosch 017783a77e MC: Save one indentation level 2013-01-14 11:06:55 +01:00
Thomas Jarosch 06a7d301e2 MC: Switch to assertEqual function from python's unittest 2013-01-14 11:06:40 +01:00
Thomas Jarosch 3bb8237cdc MC: Turn MatchCompiler tests into python unit test 2013-01-14 11:06:33 +01:00
Thomas Jarosch c0044122f4 Add self test for _replaceTokenFindMatch 2013-01-12 15:28:38 +01:00
Thomas Jarosch ff9e864a07 Add self test for replaceTokenMatch 2013-01-12 15:28:38 +01:00
Thomas Jarosch a7377f180a Quote output of _assertEquals()
It's easier to detect trailing spaces this way.
2013-01-12 15:28:38 +01:00
Thomas Jarosch 4038d4b562 Place main code into own function 2013-01-12 15:28:38 +01:00
Thomas Jarosch fdcfbd5ff9 Add missing copyright header 2013-01-10 11:10:45 +01:00
Thomas Jarosch 6bd7463c54 Add local copy of argparse module to support python 2.6 / python 3.0 2013-01-09 21:30:53 +01:00
Edoardo Prezioso 6236e1dc38 Token::Match: removed harmless special code for initial '!!foo' patterns. 2013-01-09 20:13:33 +01:00
Thomas Jarosch de36324d62 Match compiler: Add cmdline handling 2013-01-09 19:41:03 +01:00
Thomas Jarosch 97e1e50139 Match compiler: Workaround broken code generation for "!!foo" patterns
This is just meant for the upcoming release.
2013-01-09 19:25:24 +01:00
Thomas Jarosch e1be85a552 Match compiler: Be more user friendly on how to invoke it 2013-01-09 19:22:40 +01:00
Thomas Jarosch ade0b741b7 Match compiler: Create 'build' directory if needed 2013-01-09 19:15:13 +01:00
Thomas Jarosch 982503f457 Match compiler: Workaround broken optimizations in verify mode
If the match compiler uses the 'verify' mode and we
compile with -O2, some tests comparing the on-the-fly-parser
to the compiled match fail.

Small functions are inlined by the -O2 compile flag.
If we disable function inlining and still compile with -O2,
everything is back to normal.

gdb didn't show anything useful during the mismatch
since the needed variables are optimized out. Once
we start printing them, the problem vanishes, too.
-> Can only be diagnosed at the x86 assembly level.

The problem vanished by switching the invocation order
of Token::Match() and the compiled match, so just swap them.

Also add commented out helper code
to better diagnose mismatch problems.
2013-01-09 19:03:42 +01:00
Daniel Marjamäki 9ecc74e845 tools/reduce: change default timeout to 5 minutes no matter if --hang is used or not. 2013-01-08 07:10:14 +01:00
Thomas Jarosch 9970414a2f Match compiler: Implement 'verify mode' for Token::Match
Verify mode runs the same ::Match pattern on a token
using the on-the-fly parser and the compiled match parser.
The result is compared and we abort on mismatch.

Already detected an error in our test suite, needs investigation.
2013-01-07 22:27:57 +01:00
Thomas Jarosch 9b51d81e99 Match compiler: Split _replaceTokenMatch() into two small functions 2013-01-07 21:39:49 +01:00
Daniel Marjamäki 7657b84c44 reduce: rename stdout to print to avoid name clash 2013-01-07 18:45:29 +01:00
Thomas Jarosch 3918948dd5 Match compiler: Aggregate match functions with the same pattern / function call signature
Reduces the number of generated functions from 2290 to 1916.
2013-01-04 04:47:01 +01:00
Thomas Jarosch 5f09cb2e4d Match compiler: Store matchFunctions and matchStrs in the class instead of passing it around 2013-01-04 03:56:21 +01:00
Thomas Jarosch 542c6e82d3 Match compiler: Cosmetic changes after running pylint 2013-01-04 03:44:04 +01:00
Thomas Jarosch 71a236b3df Match compiler: Turn code into a python class
This will make passing around internal states a lot easier
2013-01-04 03:38:40 +01:00
Thomas Jarosch f9c752667e Match compiler: Inline generated pattern match code for Token::findmatch
Verified the output in build/ stayed the same
if Token::findmatch support is disabled.
2013-01-04 03:13:22 +01:00
Thomas Jarosch 4b386986fc Match compiler: Check varid on first use like Token::Match does 2013-01-04 01:14:52 +01:00
Thomas Jarosch 5d5efdf99f Match compiler: Add support for Token::findmatch
(still disabled for performance reasons)
2013-01-04 01:01:57 +01:00
Thomas Jarosch 241d23ba8e Remove reduce tool in 'make clean' 2013-01-03 21:59:28 +01:00
Thomas Jarosch 4a2d2f78ef tools/reduce: Remove unused variable detected by cppcheck
[reduce.cpp:475]: (style) Variable 'decl' is assigned a value that is never used.
2013-01-03 21:38:47 +01:00
Thomas Jarosch 7417144784 Match compiler: Compile Token::findsimplematch() calls
Disabled for now as it runs slowers than before.
2013-01-03 19:33:37 +01:00
Daniel Marjamäki 76c8887f5f tools/reduce: remove cast in function parameter 2013-01-03 18:28:20 +01:00
Daniel Marjamäki 16612d010d tools/reduce: improvements to make it possible to reduce code that hangs 2013-01-03 15:22:54 +01:00
Daniel Marjamäki ed803b302b reduce: remove more stuff. unneeded #define , unneeded constructors, unneeded #ifndef etc 2013-01-02 17:08:04 +01:00