shell-lint tool

This commit is contained in:
Jonathan Lange
2016-07-08 14:19:51 +01:00
parent d9ab133a85
commit 239935c063
2 changed files with 17 additions and 0 deletions

View File

@@ -4,11 +4,15 @@ Included in this repo are tools shared by weave.git and scope.git. They include
- ```cover```: a tool which merges overlapping coverage reports generated by go - ```cover```: a tool which merges overlapping coverage reports generated by go
test test
- ```files-with-type```: a tool to search directories for files of a given
MIME type
- ```lint```: a script to lint Go project; runs various tools like golint, go - ```lint```: a script to lint Go project; runs various tools like golint, go
vet, errcheck etc vet, errcheck etc
- ```rebuild-image```: a script to rebuild docker images when their input files - ```rebuild-image```: a script to rebuild docker images when their input files
change; useful when you using docker images to build your software, but you change; useful when you using docker images to build your software, but you
don't want to build the image every time. don't want to build the image every time.
- ```shell-lint```: a script to lint multiple shell files with
[shellcheck](http://www.shellcheck.net/)
- ```socks```: a simple, dockerised SOCKS proxy for getting your laptop onto - ```socks```: a simple, dockerised SOCKS proxy for getting your laptop onto
the Weave network the Weave network
- ```test```: a script to run all go unit tests in subdirectories, gather the - ```test```: a script to run all go unit tests in subdirectories, gather the

13
shell-lint Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
#
# Lint all shell files in given directories with `shellcheck`.
#
# e.g.
# $ shell-lint infra k8s
#
# Depends on:
# - shellcheck
# - files-with-type
# - file >= 5.22
"$(dirname "${BASH_SOURCE[0]}")/files-with-type" text/x-shellscript "$@" | xargs shellcheck