Skip to content

Commit dddcb1a

Browse files
authored
Merge pull request #284 from electrocucaracha/fix_lint
Improve linter checks
2 parents a62dba1 + f005de4 commit dddcb1a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2064
-1604
lines changed

.github/workflows/lint.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
# Copyright 2022 Samsung Corporation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
name: Check Lint issues
17+
# yamllint disable-line rule:truthy
18+
on:
19+
push:
20+
branches:
21+
- master
22+
pull_request:
23+
branches:
24+
- master
25+
26+
jobs:
27+
check-super-linter:
28+
name: Check syntax (super-linter)
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v3
32+
- name: Run super-linter validation
33+
uses: github/super-linter@v4
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
LINTER_RULES_PATH: /
37+
VALIDATE_BASH: false
38+
VALIDATE_CSS: false
39+
VALIDATE_HTML: false
40+
VALIDATE_GO: false
41+
VALIDATE_JSCPD: false
42+
VALIDATE_PROTOBUF: false
43+
VALIDATE_OPENAPI: false
44+
VALIDATE_TYPESCRIPT_STANDARD: false
45+
VALIDATE_DOCKERFILE_HADOLINT: false

.github/workflows/release.yml

+18-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
1+
---
2+
# Copyright 2022
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
116
name: release
217

18+
# yamllint disable-line rule:truthy
319
on:
420
release:
521
types: [published]
@@ -16,7 +32,7 @@ jobs:
1632
outputs:
1733
included: ${{ steps.release_info.outputs.included }}
1834
matrix_os: ${{ steps.release_info.outputs.matrix_os }}
19-
upload_url: ${{ steps.release_info.outputs.upload_url }}
35+
upload_url: ${{ steps.release_info.outputs.upload_url }}
2036

2137
steps:
2238
- uses: actions/checkout@v2
@@ -25,13 +41,8 @@ jobs:
2541
id: current_version
2642
run: |
2743
git fetch --all --tags
28-
2944
tag="$(git describe --tags --exact-match)"
30-
echo "$tag"
31-
version="$(echo "$tag" | sed "s/^v//")"
32-
echo "$version"
33-
34-
echo "::set-output name=version::$version"
45+
echo "::set-output name=version::${tag#v}"
3546
shell: bash
3647

3748
- name: Get release info

.github/workflows/spell.yml

+2-12
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,11 @@ jobs:
2929
name: Run markdown-link-check tool to verify link issues
3030
runs-on: ubuntu-latest
3131
steps:
32-
- uses: actions/checkout@master
33-
- uses: gaurav-nelson/github-action-markdown-link-check@v1
32+
- uses: actions/checkout@master
33+
- uses: gaurav-nelson/github-action-markdown-link-check@v1
3434
check-spellcheck:
3535
name: Run PySpelling tool to verify spelling issues
3636
runs-on: ubuntu-latest
3737
steps:
3838
- uses: actions/checkout@v2
3939
- uses: rojopolis/spellcheck-github-actions@0.22.1
40-
check-super-linter:
41-
name: Run textlint tool to verify natural language issues
42-
runs-on: ubuntu-latest
43-
steps:
44-
- uses: actions/checkout@v2
45-
- uses: github/super-linter@v4
46-
env:
47-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48-
LINTER_RULES_PATH: /
49-
VALIDATE_NATURAL_LANGUAGE: true

.github/workflows/verify.yml

+23-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
1+
---
2+
# Copyright 2022
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
116
name: Go
2-
#name: verify TODO rename (requires repo settings update)
17+
# name: verify TODO rename (requires repo settings update)
318

19+
# yamllint disable-line rule:truthy
420
on:
521
push:
6-
branches: [ master ]
22+
branches: [master]
723
pull_request:
8-
branches: [ master, issue-99-cosmos-upgrade-v0.44 ]
24+
branches: [master, issue-99-cosmos-upgrade-v0.44]
925
workflow_dispatch:
1026

1127
jobs:
@@ -87,19 +103,19 @@ jobs:
87103
steps:
88104

89105
- name: Set up Go 1.x
90-
if: false # TODO issue 99
106+
if: false # TODO issue 99
91107
uses: actions/setup-go@v2
92108
with:
93109
go-version: ^1.16
94110

95111
- name: Get google/addlicense
96-
if: false # TODO issue 99
112+
if: false # TODO issue 99
97113
run: go get -u github.com/google/addlicense
98114

99115
- name: Check out code into the Go module directory
100-
if: false # TODO issue 99
116+
if: false # TODO issue 99
101117
uses: actions/checkout@v2
102118

103119
- name: Check license
104-
if: false # TODO issue 99
120+
if: false # TODO issue 99
105121
run: make license-check

.golangci.yml

+52-37
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,53 @@
1+
---
2+
# Copyright 2022
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
116
linters:
2-
enable-all: true
3-
disable:
4-
- golint
5-
- unparam
6-
- gochecknoinits
7-
- gochecknoglobals
8-
- gomnd
9-
- nolintlint
10-
- dupl
11-
- varnamelen
12-
- tagliatelle
13-
- wrapcheck
14-
- thelper
15-
- testpackage
16-
- paralleltest
17-
- ireturn
18-
- nlreturn
19-
- goerr113
20-
- exhaustivestruct
21-
- wsl
22-
- forcetypeassert
23-
- exhaustive
24-
- scopelint
25-
- revive
26-
- lll
27-
- interfacer
28-
- gosec
29-
- funlen
30-
- stylecheck
31-
- cyclop
32-
- forbidigo
33-
- gocognit
34-
- godox
35-
- gomoddirectives
36-
- maligned
37-
- gci
38-
- whitespace
17+
enable-all: true
18+
disable:
19+
- golint
20+
- unparam
21+
- gochecknoinits
22+
- gochecknoglobals
23+
- gomnd
24+
- nolintlint
25+
- dupl
26+
- varnamelen
27+
- tagliatelle
28+
- wrapcheck
29+
- thelper
30+
- testpackage
31+
- paralleltest
32+
- ireturn
33+
- nlreturn
34+
- goerr113
35+
- exhaustivestruct
36+
- wsl
37+
- forcetypeassert
38+
- exhaustive
39+
- scopelint
40+
- revive
41+
- lll
42+
- interfacer
43+
- gosec
44+
- funlen
45+
- stylecheck
46+
- cyclop
47+
- forbidigo
48+
- gocognit
49+
- godox
50+
- gomoddirectives
51+
- maligned
52+
- gci
53+
- whitespace

.markdown-lint.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
# Copyright 2022 Samsung Corporation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
default: true
17+
18+
# MD013/line-length - Line length
19+
MD013: false

.yaml-lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
extends: default
1717

1818
ignore: |
19-
.tox/
19+
openapi.yml
2020
2121
rules:
2222
line-length: disable

0 commit comments

Comments
 (0)