Commit Graph

232 Commits

Author SHA1 Message Date
Sebastian cc34fee989
.travis.yml: Add *.json file validation (#2362) 2019-11-21 09:12:25 +01:00
Sebastian 4f1db90367
naming.py: Fix FP for constructors/destructors (#2375) 2019-11-18 18:41:57 +01:00
Sebastian 61286392d9 htmlreport: Also check "cppcheck-htmlreport" with pylint on Travis (#2326)
The error that pylint does not find HtmlFormatter in pygments.formatters
is known and the common solution is to suppress this error.
See https://github.com/PyCQA/pylint/issues/491
2019-11-04 15:44:13 +01:00
Sebastian 4f927ea6c7
htmlreport: Add HTML validation and fix syntax errors (#2317)
Add HTML validation with HTML Tidy for the resulting files index.html
and stats.html.
Fix syntax errors found by the validator.
Fix that the links in the footer are not clickable by removing the
"height: 75%;" style for the classes "menu" and "menu_index".
Add some line breaks to the HTML output for better readability and for
easier debugging.
2019-11-01 15:06:44 +01:00
Sebastian e9bc62d5b4 .travis.yml: Install pygments via pip instead of apt (#2318)
This way we should get a newer version of pygments.
2019-11-01 09:10:10 +01:00
Sebastian 816aa7e211
Fix and re-enable htmlreport tests (#2310)
* htmlreport/check.sh: Remove check with obsolete file

gui/test/data/xmlfiles/xmlreport_v1.xml has been removed with commit
d95efc44c7

* .travis.yml: Enable htmlreport test again

* cppcheck-htmlreport: Fall back to guessing lexer from file content

If the lexer can not be guessed from the file extension (for example
for *.tpp) then guess the lexer that should be used from the content.
This fixes "ERROR: *" output when running "htmlreport/check.sh"
Also use specific exceptions instead of bare ones.
2019-10-30 18:01:39 +01:00
Sebastian ec521fba36
donate-cpu-server.py: Upgrade to work with Python 3 (drop Python 2 support) (#2292)
* donate-cpu-server.py: Use tools to prepare code to work with Python 3

The following commands were used for these changes:
futurize -1 -w donate-cpu-server.py
2to3 -w donate-cpu-server.py

* Make the server work under Python 3

Manually fixed the Unicode issues. Received data is decoded, sent data
is encoded.

* Add backward compatible type hints (in comments)

This enables better static analysis and suggestions in an IDE.

* Fix Pylint warning "Comparison to literal"

* .travis.yml: Fix/enhance pylint verification and Python compilation

donate-cpu-server.py is only Python 3 compatible, so it must be ignored
for pylint verification under Python 2.
All Python scripts that were verified with pylint under Python 2 are
now also verified with pylint under Python 3.

* donate-cpu-server.py: Add shebang and mark script as executable

* start_donate_cpu_server_test_local.sh: Directly execute server

Since the server script is executable now and has a shebang it can
be directly executed.

* Use Python 3.0 function annotations instead of comment type hints

Reference: https://www.python.org/dev/peps/pep-3107/
2019-10-26 21:10:21 +02:00
Sebastian 8fb794e731
libsigc++.cfg: Add configuration for library libsigc++ (#2291)
* libsigc++.cfg: Add configuration for library libsigc++

Reference: https://libsigcplusplus.github.io/libsigcplusplus/

* Make code compatible with libsigc++-2.0 instead of 3.0

Since Version 3.0 C++14 is required which is not (fully) supported in
some older GCC versions.
2019-10-26 17:37:14 +02:00
Oliver Stöneberg 3db828b46e print stack trace for UBSAN errors / enabled detect_stack_use_after_return for ASAN (#2252) 2019-10-16 13:46:23 +02:00
Daniel Marjamäki 3c085fd88a Fixed #9359 (SymbolDatabase: function lookup fails when -funsigned-char is used) 2019-10-06 12:05:58 +02:00
amai2012 6c9839a585 Validate rules files 2019-09-21 21:42:13 +02:00
Sebastian 7d26a694da
.travis.yml: Run addon tests also with Python 3 (#2185)
Python 3 does not search parent directories of the initially executed
script for modules imported by modules in this parent directory by
default. So simply set the PYTHONPATH to the ./addons directory. Thus
all scripts are found. It is similar to running the test-*.py script
from the ./addons directory, but this way all the paths in the test-*.py
scripts do not have to be changed (for example to find the cppcheck
executable.
For more details regarding the parent directory issue see for example:
https://stackoverflow.com/questions/11393492/python-package-import-from-parent-directory
For details about the used PYTHONPATH solution see:
https://stackoverflow.com/questions/4580101/python-add-pythonpath-during-command-line-module-run
2019-09-19 20:46:16 +02:00
Sebastian 8207fb7b14
cairo.cfg: Add library configuration/tests/... for cairo library (#2176)
Reference: https://www.cairographics.org/
2019-09-19 08:48:04 +02:00
Paul Fultz II e7ff983fe0 Run cmake tests on travis (#2155)
* Run cmake tests on travis

* Build with tests

* Use correct variable
2019-09-09 21:35:07 +02:00
Sebastian e9231d2eee
.travis.yml: Remove already fixed TODO comment
y2038 addon has been fixed and moved directly to the addons directory. So this comment is no longer necessary.
2019-09-09 21:19:03 +02:00
Sebastian a501f65c8c
libcurl.cfg: Add library configuration for libcurl (#2120)
Add curl_easy_*() functions and deprecated functions with warnings.
Add tests and prepare donate-cpu.py
Reference: https://curl.haxx.se/libcurl/c/
2019-08-29 15:11:59 +02:00
Sebastian 8782a5f5e4
lua.cfg: Add Lua C API library configuration with tests (#2119) 2019-08-29 11:38:21 +02:00
Sebastian f25dcd5cda
python.cfg: Add Py_CLEAR(), and add initial test file (#2110) 2019-08-24 10:17:23 +02:00
Daniel Marjamäki e24ce5b3ba .travis.yml: The 'make install' now require a FILESDIR parameter 2019-08-17 17:25:41 +02:00
Daniel Marjamäki a17f2a6f05 Compiling/Installing : The CFGDIR parameter was removed. Use FILESDIR instead. 2019-08-17 10:53:07 +02:00
Daniel Marjamäki 1718963d9f Travis: Remove step the check clang sources. We can do this on daca@home. 2019-08-05 11:39:31 +02:00
Daniel Marjamäki e60c4e4768 Travis: Remove step that analyse llvm source code 2019-07-28 08:58:06 +02:00
Georgy Komarov fe2885e430 cert.py: Refactor arguments handling (#2044)
* cert.py: Add '--quiet' option and test

Main sentinel also was required.

* travis.yml: Install pytest with --user

To avoid possible conflicts with system packages later.

* Quickfix
2019-07-26 15:40:25 +02:00
Georgy Komarov fbd7b5180b Update addons structure. Make Y2038 addon works. (#2024)
* Update addons structure. Make Y2038 addon works.

All addons are now located in same directory, where cppcheck-gui is
looking for them.

Y2038 addon has been updated to latest cppcheck version. Output is same
as 303622f01c commit as it described in
README: 303622f01c/addons/y2038/README.

* Clean up .travis.yml

* Update travis.yml paths.

* misra.py: Bring back -P argument for backward compatibility

* Fix paths

* Normalize dumpfile paths tpo cppcheck format

* Fixup 3 test.

* Add arguments regression test.

* Fixing travis build
2019-07-26 06:38:03 +02:00
Daniel Marjamäki 3458692cc7 Travis: Remove Precise job because they are decommisioning that environment :-( 2019-07-25 22:30:44 +02:00
Sebastian 8f92c43567
.travis.yml: Check more Python scripts with pylint (#2019)
Use renamed pylintrc file that is only meant for Travis checks.

Check all Python scripts in 'addons', 'htmlreport' and 'tools'

Errors for `_socketobject` class are disabled, see
https://stackoverflow.com/questions/10300082/how-to-prevent-python-pylint-complaining-about-socket-class-sendall-method

Install imported modules `unittest2` and `pexpect` via pip.

Add "./addons" to search-path for modules because
"tools/compare-ast-clang-and-cppcheck.py" imports cppcheckdata.py from
addons. Pylint does not seem to evaluate
`sys.path.insert(0, '../addons')` in the script. So an `init-hook` is
necessary in pylintrc_travis.
2019-07-24 21:09:53 +02:00
amai2012 453de18101
Run pylint on addons providing a buld breaker on travis (#2011)
* Run pylint (using a pylintrc file) on the addon Python scripts. It serves as a build breaker for severe issues.
* Skip y2038 addon for now until it's fixed.
2019-07-18 20:51:58 +02:00
Georgy Komarov 413a5a4865 MISRA: Fix rules suppression, add tests (#1996)
* MISRA: Fix suppressed rules line numbers

Line numbers represented as strings in lxml ETree, but we use it in
integer comparison later.

* MISRA: Use standard library function instead file_prefix.

* MISRA: Use pytest's capsys for capturing, add suppressions tests.

* travis.yml: Update pytest version
2019-07-16 22:32:41 +02:00
Daniel Marjamäki 7e3626c84e Travis: Check the naming conventions again 2019-07-15 20:58:07 +02:00
Daniel Marjamäki bafffa6cf2 Travis: Activate and speedup NONNEG syntax check 2019-07-15 13:01:58 +02:00
Daniel Marjamäki 2cfc2d25bb Travis: Temporarily disable the naming conventions check 2019-07-15 08:14:04 +02:00
Daniel Marjamäki 842f8c569b Travis: remove NONNEG syntax check to limit time 2019-07-15 07:50:02 +02:00
Daniel Marjamäki a9d47d4de2 Travis: Use -std=c++0x in NONNEG compile 2019-07-15 07:15:56 +02:00
Daniel Marjamäki aeefaf7004 Travis: Fix one more 'nonneg' issue 2019-07-14 22:49:37 +02:00
Daniel Marjamäki 593733f522 Travis; Try to fix Travis build. Limit self check of gui code 2019-07-14 22:27:22 +02:00
Daniel Marjamäki 33284be64a Try to fix Travis 2019-07-14 21:56:33 +02:00
Daniel Marjamäki 7be6fbf658 Travis: Reduce execution time 2019-07-14 20:46:50 +02:00
Daniel Marjamäki 0014fe880e Mark members and arguments with 'nonneg' 2019-07-14 12:22:33 +02:00
Daniel Marjamäki 1b4485a738 Makefile: Add one more flag 'MATCHCOMPILER=yes' 2019-06-23 13:43:09 +02:00
Daniel Marjamäki de9c999d79 Better handling of spaces in paths 2019-06-22 19:20:15 +02:00
Georgy Komarov e979b0652c misra.py: Fix up and improve load rules parser. (#1895)
* misra.py: Fixup load rules parser.

* misra.py: Report when rule text is missing in rule-texts file

* misra.py: Allow to skip misra checks not specified in rule-texts.

* misra.py: Remove top-level control flow.

Create separate class that stores settings, instead of global variables.

This is required to perform imports from misra.py for testing purposes.

* misra.py: Add simple pytest test for load rules.

* misra.py: Add document structure tests.

* misra.py: Exit after show rules table.

* misra.py: Add document structure tests.

* misra.py: Fixup import pitfall with python2

* misra.py: Minor fixes
2019-06-17 21:17:29 +02:00
Daniel Marjamäki 54ba9482c6 Travis: Tweak self checking. Only check normal source code folders. 2019-06-15 16:44:34 +02:00
Daniel Marjamäki 181991204a Travis: Improved Cppcheck self check 2019-06-15 14:34:46 +02:00
Daniel Marjamäki b3a46e72dc Fix and test syntaxError suppression 2019-05-01 11:54:13 +02:00
Daniel Marjamäki b0baf4f65b Travis: Fix the cppcheck self-check 2019-04-30 08:56:20 +02:00
Daniel Marjamäki ff8cf4fe25 gui/test: Add projectfile test 2019-04-20 19:07:14 +02:00
Daniel Marjamäki 5a14473963 Disable gui/test again 2019-04-19 14:55:10 +02:00
Daniel Marjamäki 91c000c09d Travis: Try to reactivate the gui/test tests 2019-04-19 11:57:52 +02:00
Daniel Marjamäki bb00435736 Travis: Temporarily disable gui/test until problems are fixed 2019-04-19 11:23:59 +02:00
Daniel Marjamäki 93b27b2022 cleanup gui/test 2019-04-19 09:41:58 +02:00