tools: Added cppcheck for C/C++ files.
This commit is contained in:
parent
257eae4e73
commit
45a3f1ede8
3 changed files with 11 additions and 4 deletions
|
|
@ -30,9 +30,9 @@ Extensions | Tools
|
|||
.pl .pm .t | [perl_syntax](https://en.wikipedia.org/wiki/Perl) • [perldoc](http://perldoc.perl.org/) • [perltidy](http://perltidy.sourceforge.net/)
|
||||
.pod .pod6 | [perldoc](http://perldoc.perl.org/)
|
||||
.java | [uncrustify](https://github.com/uncrustify/uncrustify)
|
||||
.c .h | [c_syntax_gcc](https://gcc.gnu.org/) • [splint](http://www.splint.org/) • [uncrustify](https://github.com/uncrustify/uncrustify)
|
||||
.c .h | [c_syntax_gcc](https://gcc.gnu.org/) • [splint](http://www.splint.org/) • [uncrustify](https://github.com/uncrustify/uncrustify) • [cppcheck](http://sourceforge.net/p/cppcheck/wiki/Home/)
|
||||
.o | [objdump_headers](https://en.wikipedia.org/wiki/Objdump) • [objdump_disassemble](https://en.wikipedia.org/wiki/Objdump) • [readelf](https://en.wikipedia.org/wiki/Objdump)
|
||||
.cc .cpp .hpp | [cpp_syntax_gcc](https://gcc.gnu.org/) • bcpp • [uncrustify](https://github.com/uncrustify/uncrustify)
|
||||
.cc .cpp .hpp | [cpp_syntax_gcc](https://gcc.gnu.org/) • bcpp • [uncrustify](https://github.com/uncrustify/uncrustify) • [cppcheck](http://sourceforge.net/p/cppcheck/wiki/Home/)
|
||||
.pdf | [pdf2txt](http://www.unixuser.org/~euske/python/pdfminer/)
|
||||
.html | [html_syntax](http://www.html-tidy.org/) • [tidy](http://www.html-tidy.org/) • [html2text](http://www.mbayer.de/html2text/)
|
||||
.php | [php7_syntax](https://en.wikipedia.org/wiki/PHP)
|
||||
|
|
|
|||
2
TODO
2
TODO
|
|
@ -6,6 +6,7 @@ Todo (tool related)
|
|||
- Report on python doctests. (also coverage of)
|
||||
- Cache tools._python_version.
|
||||
- Colourise git_diff.
|
||||
- Add shellcheck tool for shell scripts.
|
||||
|
||||
|
||||
Done
|
||||
|
|
@ -164,6 +165,7 @@ Done
|
|||
<- Yes, but wait for it to be included in python, or until it is an ubuntu package.
|
||||
- Add bandit tool for python.
|
||||
- Created a setup.py file.
|
||||
- Add cppcheck tool for C and C++.
|
||||
|
||||
A-syntax, B-tests, C-auto docs, D-lint, E-coverage, F-profile, G-tidy, H-import deps
|
||||
A B C D E F G H
|
||||
|
|
|
|||
|
|
@ -612,6 +612,11 @@ def uncrustify(path):
|
|||
return status, _syntax_highlight_using_path(stdout, path)
|
||||
|
||||
|
||||
@deps(deps={"cppcheck"}, url="cppcheck", executables={"cppcheck"})
|
||||
def cppcheck(path):
|
||||
return _run_command(["cppcheck", path])
|
||||
|
||||
|
||||
@deps(deps={"php7.1-cli"}, url="https://en.wikipedia.org/wiki/PHP",
|
||||
executables={"php7.1"})
|
||||
def php7_syntax(path):
|
||||
|
|
@ -815,9 +820,9 @@ TOOLS_FOR_EXTENSIONS = \
|
|||
# (["p6", "pm6"], [perl6_syntax, perldoc]),
|
||||
(["pod", "pod6"], [perldoc]),
|
||||
(["java"], [uncrustify]),
|
||||
(["c", "h"], [c_syntax_gcc, splint, uncrustify]),
|
||||
(["c", "h"], [c_syntax_gcc, splint, uncrustify, cppcheck]),
|
||||
(["o"], [objdump_headers, objdump_disassemble, readelf]),
|
||||
(["cc", "cpp", "hpp"], [cpp_syntax_gcc, bcpp, uncrustify]),
|
||||
(["cc", "cpp", "hpp"], [cpp_syntax_gcc, bcpp, uncrustify, cppcheck]),
|
||||
(["pdf"], [pdf2txt]),
|
||||
(["html"], [html_syntax, tidy, html2text]),
|
||||
(["php"], [php7_syntax]),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue