-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add golangci-lint configuration Signed-off-by: Waleed Malik <[email protected]> * Add gimps configuration Signed-off-by: Waleed Malik <[email protected]> * Add pipeline to run gimps Signed-off-by: Waleed Malik <[email protected]> * Add .golangci.yml to YAML ignore list Signed-off-by: Waleed Malik <[email protected]> * Update dependencies Signed-off-by: Waleed Malik <[email protected]> * Add target for verify-imports Signed-off-by: Waleed Malik <[email protected]> * Linting and formatting fixes Signed-off-by: Waleed Malik <[email protected]> * Fix incorrect script name Signed-off-by: Waleed Malik <[email protected]> * Organize imports Signed-off-by: Waleed Malik <[email protected]> --------- Signed-off-by: Waleed Malik <[email protected]>
- Loading branch information
1 parent
569ebf9
commit 8eb4100
Showing
23 changed files
with
500 additions
and
690 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright 2023 The KubeLB Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# This is the configuration for https://github.com/xrstf/gimps. | ||
|
||
importOrder: [std, external, kubermatic, envoy, kubernetes] | ||
sets: | ||
- name: kubermatic | ||
patterns: | ||
- "k8c.io/**" | ||
- "github.com/kubermatic/**" | ||
- name: kubernetes | ||
patterns: | ||
- "k8s.io/**" | ||
- "*.k8s.io/**" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Copyright 2023 The KubeLB Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
run: | ||
deadline: 20m | ||
issues-exit-code: 1 | ||
skip-dirs: | ||
- hack | ||
- vendor | ||
skip-files: | ||
- zz_generated.*.go | ||
|
||
linters: | ||
enable: | ||
- asasalint | ||
- asciicheck | ||
- bidichk | ||
- bodyclose | ||
- deadcode | ||
- depguard | ||
- durationcheck | ||
- errcheck | ||
- errname | ||
- errorlint | ||
- exportloopref | ||
- goconst | ||
- gocritic | ||
- gocyclo | ||
- gofmt | ||
- gosimple | ||
- govet | ||
- importas | ||
- ineffassign | ||
- loggercheck | ||
- misspell | ||
- nakedret | ||
- noctx | ||
- nolintlint | ||
- nosprintfhostport | ||
- predeclared | ||
- promlinter | ||
- revive | ||
- staticcheck | ||
- structcheck | ||
- tenv | ||
- typecheck | ||
- unconvert | ||
- unused | ||
- varcheck | ||
- wastedassign | ||
- whitespace | ||
disable-all: true | ||
|
||
linters-settings: | ||
goimports: | ||
local-prefixes: k8c.io/kubelb | ||
tagliatelle: | ||
case: | ||
rules: | ||
json: goCamel | ||
yaml: goCamel | ||
depguard: | ||
rules: | ||
main: | ||
deny: | ||
- { pkg: io/ioutil, desc: https://go.dev/doc/go1.16#ioutil } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,6 +78,18 @@ presubmits: | |
args: | ||
- verify-boilerplate | ||
|
||
- name: pull-kubelb-verify-imports | ||
always_run: true | ||
decorate: true | ||
clone_uri: "ssh://[email protected]/kubermatic/kubelb.git" | ||
spec: | ||
containers: | ||
- image: quay.io/kubermatic/build:go-1.21-node-18-kind-0.20-1 | ||
command: | ||
- make | ||
args: | ||
- verify-imports | ||
|
||
- name: pull-kubelb-build | ||
always_run: true | ||
decorate: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,5 @@ rules: | |
ignore: | | ||
config | ||
dev | ||
vendor | ||
vendor | ||
.golangci.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.