-
Notifications
You must be signed in to change notification settings - Fork 52
115 lines (103 loc) · 3.79 KB
/
linters.yaml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Linters
on: [pull_request]
jobs:
linters:
name: reviewdog
runs-on: ubuntu-latest
container:
image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Trust my checkout
run: git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- name: make build-all
run: |
make build-all
- name: get golangci-lint version
id: get-golangci-lint-version
run: |
version=v$(grep golangci-lint .tool-versions | cut -d " " -f 2 )
echo "golangci-lint version from .tool-versions: '${version}'"
echo "version=${version}" >> "$GITHUB_OUTPUT";
- name: get go version
id: get-golang-version
run: |
version="$(grep "golang " .tool-versions| cut -f 2 -d " ")"
echo "Go version from .tool-versions: '${version}'"
echo "version=${version}" >> "$GITHUB_OUTPUT";
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
# runs 'bundle install' and caches installed gems automatically
bundler-cache: true
env:
# Needed for self-hosted runner
ImageOS: ubuntu22
- name: shellcheck
uses: reviewdog/action-shellcheck@v1
with:
reporter: github-pr-review
- name: actionlint
uses: reviewdog/action-actionlint@v1
with:
reporter: github-pr-review
- name: rubocop
uses: reviewdog/action-rubocop@v2
with:
rubocop_version: gemfile
rubocop_extensions: standard:gemfile
reporter: github-pr-review
- name: alex
uses: reviewdog/action-alex@v1
with:
reporter: github-pr-review
- name: markdownlint
uses: reviewdog/action-markdownlint@v0
with:
reporter: github-pr-review
- name: lint acceptance
uses: reviewdog/action-golangci-lint@v2
with:
workdir: src/acceptance
go_version: ${{ steps.get-golang-version.outputs.version }}
golangci_lint_version: ${{ steps.get-golangci-lint-version.outputs.version }}
reporter: github-pr-review
filter_mode: nofilter
fail_on_error: true
- name: lint go test app
uses: reviewdog/action-golangci-lint@v2
with:
workdir: src/acceptance/assets/app/go_app
go_version: ${{ steps.get-golang-version.outputs.version }}
golangci_lint_version: ${{ steps.get-golangci-lint-version.outputs.version }}
reporter: github-pr-review
filter_mode: nofilter
fail_on_error: true
- name: lint autoscaler
uses: reviewdog/action-golangci-lint@v2
with:
workdir: src/autoscaler
go_version: ${{ steps.get-golang-version.outputs.version }}
golangci_lint_version: ${{ steps.get-golangci-lint-version.outputs.version }}
reporter: github-pr-review
filter_mode: nofilter
fail_on_error: true
- name: lint changelog
uses: reviewdog/action-golangci-lint@v2
with:
workdir: src/changelog
go_version: ${{ steps.get-golang-version.outputs.version }}
golangci_lint_version: ${{ steps.get-golangci-lint-version.outputs.version }}
reporter: github-pr-review
filter_mode: nofilter
fail_on_error: true
- name: lint changeloglockcleaner
uses: reviewdog/action-golangci-lint@v2
with:
workdir: src/changeloglockcleaner
go_version: ${{ steps.get-golang-version.outputs.version }}
golangci_lint_version: ${{ steps.get-golangci-lint-version.outputs.version }}
reporter: github-pr-review
filter_mode: nofilter
fail_on_error: true