aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml2
-rw-r--r--CONTRIBUTING.md3
-rw-r--r--Makefile1
3 files changed, 5 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index 0de7c6e..1a1686d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,6 +22,8 @@ jobs:
- stage: presubmits
name: Generate, Format, and Lint
+ before_install:
+ - sudo apt-get -y install shellcheck
install:
- make tools
script:
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 5968d0e..d5be721 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -87,6 +87,7 @@ The `Makefile` will automatically download and build any needed Go dependencies.
However, you'll also need to install some non-Go dependencies:
- `make format` requires
[`clang-format`](https://clang.llvm.org/docs/ClangFormat.html).
+ - `make lint` requires [`shellcheck`](https://github.com/koalaman/shellcheck).
- `make test-setup` and `make cli-test` require
[`e2fsprogs`](https://en.wikipedia.org/wiki/E2fsprogs) version 1.43 or
later.
@@ -96,7 +97,7 @@ However, you'll also need to install some non-Go dependencies:
On Ubuntu, the following command installs the needed packages:
```
-sudo apt-get install clang-format e2fsprogs expect keyutils
+sudo apt-get install clang-format shellcheck e2fsprogs expect keyutils
```
### Running Integration Tests
diff --git a/Makefile b/Makefile
index 6e2eda2..54c381d 100644
--- a/Makefile
+++ b/Makefile
@@ -110,6 +110,7 @@ lint: $(BIN)/golint $(BIN)/staticcheck $(BIN)/misspell
go list ./... | xargs -L1 golint -set_exit_status
staticcheck ./...
misspell -source=text $(FILES)
+ ( cd cli-tests && shellcheck -x *.sh)
clean:
rm -f $(BIN)/$(NAME) $(PAM_MODULE) $(TOOLS) coverage.out $(COVERAGE_FILES) $(PAM_CONFIG)