Commit Graph

223 Commits

Author SHA1 Message Date
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
Daniel Marjamäki 17ec37b366 Run gui tests on Travis 2019-04-19 07:56:10 +02:00
Daniel Marjamäki 0c7d4eb91f Try to fix Travis 2019-04-17 09:04:51 +02:00
Daniel Marjamäki 65d18b3da9 test/cli: refactorings 2019-04-15 10:02:25 +02:00
Daniel Marjamäki 964c2a237a Travis: Try to run the cli testing on Travis 2019-04-14 12:49:43 +02:00
Daniel Marjamäki c47de235f7 Travis: Disable noisy Wshadow warnings 2019-04-10 19:10:05 +02:00
Sebastian 4735b6ca1b
addons/naming.py: Fix crash on unnamed arguments, add regex validation. (#1762)
Crash has been reported in the forum:
https://sourceforge.net/p/cppcheck/discussion/development/thread/138788ac6b/
A small test has been added to avoid regression.
2019-03-26 18:54:09 +01:00
Sebastian d204869d3d
.travis.yml: Add retries to the `apt-get` commands. (#1749)
Travis often fails to update / install the packages via `apt-get` and
jobs must be restarted manually. This should fix the problem or at least
reduce the frequency at which these failures occur.
Details about the problem and the `travis_retry` command can be found
here:
https://blog.travis-ci.com/2013-05-20-network-timeouts-build-retries
2019-03-21 13:51:14 +01:00
Sebastian 597107ac9a
.travis.yml: update to xenial; add jobs for ubsan and asan (#1745)
As tested by @matthiaskrgr in the branch
https://github.com/matthiaskrgr/cppcheck/commits/travis_xenial
Add job to build Cppcheck on Ubuntu 14.04 trusty (same as for precise).
2019-03-20 15:30:01 +01:00
Sebastian 5728bd63af
.travis.yml: Minor fixes of addons execution / documentation (#1739) 2019-03-14 14:49:02 +01:00