improved linting

This commit is contained in:
Devaev Maxim 2021-04-02 02:18:27 +03:00
parent e1b2eceea5
commit 3bf68884f5
2 changed files with 7 additions and 21 deletions

3
linters/cppcheck.h Normal file
View File

@ -0,0 +1,3 @@
#define CHAR_BIT 8
#define WITH_OMX
#define WITH_GPIO

View File

@ -1,12 +1,12 @@
[tox]
envlist = cppcheck-src, cppcheck-python, flake8, pylint, mypy, vulture, htmlhint
envlist = cppcheck, flake8, pylint, mypy, vulture, htmlhint
skipsdist = true
[testenv]
basepython = python3.9
changedir = /src
[testenv:cppcheck-src]
[testenv:cppcheck]
whitelist_externals = cppcheck
commands = cppcheck \
--force \
@ -18,25 +18,8 @@ commands = cppcheck \
--suppress=variableScope \
--inline-suppr \
--library=python \
-DCHAR_BIT=8 \
-DWITH_OMX \
-DWITH_GPIO \
src python
[testenv:cppcheck-python]
whitelist_externals = cppcheck
commands = cppcheck \
--force \
--std=c11 \
--error-exitcode=1 \
--quiet \
--enable=warning,unusedFunction,portability,performance,style \
--suppress=assignmentInAssert \
--suppress=variableScope \
--inline-suppr \
--library=python \
-DCHAR_BIT=8 \
python/ustreamer.c
--include=linters/cppcheck.h \
src python/ustreamer.c janus/rtp.h janus/rtp.c janus/plugin.c
[testenv:flake8]
whitelist_externals = bash