forked from openkruise/kruise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
61 lines (58 loc) · 2.31 KB
/
config.yml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Golang CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-go/ for more details
version: 2
jobs:
markdownlint-misspell-shellcheck:
docker:
# this image is build from Dockerfile
# https://github.com/pouchcontainer/pouchlinter/blob/master/Dockerfile
- image: pouchcontainer/pouchlinter:v0.1.2
working_directory: /go/src/github.com/openkruise/kruise
steps:
- checkout
- run:
name: use markdownlint v0.5.0 to lint markdown file (https://github.com/markdownlint/markdownlint)
command: |
find ./ -name "*.md" | grep -v vendor | grep -v commandline | grep -v .github | grep -v swagger | grep -v api | xargs mdl -r ~MD010,~MD013,~MD024,~MD029,~MD033,~MD036
- run:
name: use markdown-link-check(https://github.com/tcort/markdown-link-check) to check links in markdown files
command: |
set +e
for name in $(find . -name \*.md | grep -v vendor | grep -v CHANGELOG); do
if [ -f $name ]; then
markdown-link-check -q $name;
if [ $? -ne 0 ]; then
code=1
fi
fi
done
bash -c "exit $code";
- run:
name: use opensource tool client9/misspell to correct commonly misspelled English words
command: |
find ./* -name "*" | grep -v vendor | xargs misspell -error
- run:
name: use ShellCheck (https://github.com/koalaman/shellcheck) to check the validateness of shell scripts in pouch repo
command: |
find ./ -name "*.sh" | grep -v vendor | xargs shellcheck
code-check:
docker:
- image: pouchcontainer/pouchlinter:v0.1.2
working_directory: /go/src/github.com/openkruise/kruise
steps:
- checkout
- run:
name: validate go code with gometalinter
command: |
gometalinter --disable-all --skip vendor -E gofmt -E goimports -E golint -E goconst -E ineffassign -E misspell -E vet -d ./...
- run:
name: detect deadcode without test folder
command: |
gometalinter --disable-all --skip vendor --skip test -E deadcode -d ./...
workflows:
version: 2
ci:
jobs:
- markdownlint-misspell-shellcheck
- code-check