tools: Added shellcheck for bash, sh, dash or ksh files.
This commit is contained in:
parent
45a3f1ede8
commit
4a02b26fb0
3 changed files with 9 additions and 2 deletions
|
|
@ -41,3 +41,4 @@ Extensions | Tools
|
|||
.tar.bz2 | [tar_bz2](http://www.gnu.org/software/tar/manual/tar.html)
|
||||
.a .so | [nm](https://linux.die.net/man/1/nm)
|
||||
.png .jpg .gif .bmp .ppm .tiff .tga | [pil](http://python-pillow.github.io/) • [pil_half](http://python-pillow.github.io/)
|
||||
.bash .sh .dash .ksh | [shellcheck](http://hackage.haskell.org/package/ShellCheck)
|
||||
|
|
|
|||
2
TODO
2
TODO
|
|
@ -6,7 +6,6 @@ Todo (tool related)
|
|||
- Report on python doctests. (also coverage of)
|
||||
- Cache tools._python_version.
|
||||
- Colourise git_diff.
|
||||
- Add shellcheck tool for shell scripts.
|
||||
|
||||
|
||||
Done
|
||||
|
|
@ -166,6 +165,7 @@ Done
|
|||
- Add bandit tool for python.
|
||||
- Created a setup.py file.
|
||||
- Add cppcheck tool for C and C++.
|
||||
- Add shellcheck tool for shell scripts.
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -675,6 +675,11 @@ def pil_half(path):
|
|||
return Status.normal, result
|
||||
|
||||
|
||||
@deps(deps={"shellcheck"}, url="shellcheck", executables={"shellcheck"})
|
||||
def shellcheck(path):
|
||||
return _run_command(["shellcheck", path])
|
||||
|
||||
|
||||
@deps(deps={"git"}, url="git", executables={"git"})
|
||||
def git_blame(path): # FIX: Add to tools_test.py
|
||||
stdout, stderr, returncode = _do_command(
|
||||
|
|
@ -830,7 +835,8 @@ TOOLS_FOR_EXTENSIONS = \
|
|||
(["tar.gz", "tgz"], [tar_gz]),
|
||||
(["tar.bz2"], [tar_bz2]),
|
||||
(["a", "so"], [nm]),
|
||||
(IMAGE_EXTENSIONS, [pil, pil_half])
|
||||
(IMAGE_EXTENSIONS, [pil, pil_half]),
|
||||
(["bash", "sh", "dash", "ksh"], [shellcheck])
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue