forked from vedanthh/TPC-DS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (24 loc) · 753 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
all: lint
SHELL := /bin/bash
export SUPER_LINTER_VERSION='v4.8.5'
export EXCLUDED_DIRECTORY='00_compile_tpcds/t.*/.*'
.PHONY: dependencies
dependencies:
sudo yum -y install epel-release
sudo yum install ShellCheck
.PHONY: shfmt
shfmt:
find . -name "*.sh" -not -path './00_compile_tpcds/t*' | xargs shfmt -d -i 2 -sr
.PHONY: lint
lint:
find . -name "*.sh" -not -path './00_compile_tpcds/t*' | grep -v 'tpcds_variables.sh' | xargs shellcheck -S warning
.PHONY: super-linter
super-linter:
docker run --rm \
-e VALIDATE_BASH=true \
-e VALIDATE_BASH_EXEC=true \
-e RUN_LOCAL=true \
-e LOG_LEVEL=ERROR \
-e FILTER_REGEX_EXCLUDE=$(EXCLUDED_DIRECTORY) \
-v ${PWD}:/tmp/lint \
gcr.io/gp-virtual/super-linter:slim-$(SUPER_LINTER_VERSION)