-
Notifications
You must be signed in to change notification settings - Fork 1
Migrating to dis-design-system-go #170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0e99ed8
Switch to vulncheck
aqdas0307 65a2008
Bumped go version
aqdas0307 306db2a
Migrated linter config to v2
aqdas0307 3e9f49f
Adjusting renderer path
aqdas0307 0e1fcba
Updated README
aqdas0307 a81f6e6
Replacing dp-renderer
aqdas0307 52c15ef
Apply specified go version to go.mod
aqdas0307 6b3fe04
reset go.mod version to 0 patch on project gen
jessjenkins File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -21,7 +21,7 @@ test: | |
| go test -race -cover ./... | ||
|
|
||
| audit: | ||
| go list -m all | nancy sleuth | ||
| dis-vulncheck | ||
|
|
||
| lint: | ||
| exit | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
152 changes: 65 additions & 87 deletions
152
project_generation/content/templates/controller/.golangci.yml.tmpl
This file contains hidden or 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 |
|---|---|---|
| @@ -1,107 +1,85 @@ | ||
| # This file was inspired by the golangci-lint one: | ||
| # https://github.com/golangci/golangci-lint/blob/master/.golangci.yml | ||
| version: "2" | ||
| run: | ||
| # number of operating system threads that can execute golangci-lint simultaneously | ||
| concurrency: 4 | ||
|
|
||
| # timeout for analysis, e.g. 30s, 5m, default is 1m | ||
| timeout: 5m | ||
| linters-settings: | ||
| govet: | ||
| shadow: true | ||
| golint: | ||
| min-confidence: 0 | ||
| gocyclo: | ||
| min-complexity: 20 | ||
| gocognit: | ||
| min-complexity: 40 | ||
| maligned: | ||
| suggest-new: true | ||
| dupl: | ||
| threshold: 100 | ||
| goconst: | ||
| min-len: 2 | ||
| min-occurrences: 2 | ||
| misspell: | ||
| locale: UK | ||
| lll: | ||
| line-length: 140 | ||
| gofmt: | ||
| simplify: false | ||
| gocritic: | ||
| enabled-tags: | ||
| - diagnostic | ||
| - experimental | ||
| - opinionated | ||
| - performance | ||
| - style | ||
| disabled-checks: | ||
| - wrapperFunc | ||
| - dupImport # https://github.com/go-critic/go-critic/issues/845 | ||
| - ifElseChain | ||
| - octalLiteral | ||
| - hugeParam | ||
| revive: | ||
| rules: | ||
| # disabled as parameter names are useful for context even when unused, especially in interface implementations | ||
| - name: unused-parameter | ||
| severity: warning | ||
| disabled: true | ||
| include: | ||
| - "**/*_test.go" # Specify test files to include | ||
| funlen: | ||
| # lines: 100 | ||
| # statements: 100 | ||
|
|
||
| linters: | ||
| # please, do not use `enable-all`: it's deprecated and will be removed soon. | ||
| # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint | ||
| disable-all: true | ||
| default: none | ||
| enable: | ||
| - dogsled | ||
| - errcheck | ||
| - gochecknoinits | ||
| - gocognit | ||
| - goconst | ||
| - gocritic | ||
| - gocyclo | ||
| - gofmt | ||
| - goimports | ||
| - revive | ||
| - gosec | ||
| - gosimple | ||
| - govet | ||
| - ineffassign | ||
| - nakedret | ||
| - prealloc | ||
| - revive | ||
| - staticcheck | ||
| - stylecheck | ||
| - typecheck | ||
| - unconvert | ||
| - unused | ||
| - whitespace | ||
| - gocognit | ||
| - prealloc | ||
|
|
||
| settings: | ||
| dupl: | ||
| threshold: 100 | ||
| gocognit: | ||
| min-complexity: 40 | ||
| goconst: | ||
| min-len: 2 | ||
| min-occurrences: 2 | ||
| gocritic: | ||
| disabled-checks: | ||
| - wrapperFunc | ||
| - dupImport | ||
| - ifElseChain | ||
| - octalLiteral | ||
| - hugeParam | ||
| enabled-tags: | ||
| - diagnostic | ||
| - experimental | ||
| - opinionated | ||
| - performance | ||
| - style | ||
| gocyclo: | ||
| min-complexity: 20 | ||
| lll: | ||
| line-length: 140 | ||
| misspell: | ||
| locale: UK | ||
| revive: | ||
| rules: | ||
| - name: unused-parameter | ||
| severity: warning | ||
| disabled: true | ||
| exclusions: | ||
| generated: lax | ||
| presets: | ||
| - comments | ||
| - common-false-positives | ||
| - legacy | ||
| - std-error-handling | ||
| rules: | ||
| - linters: | ||
| - dupl | ||
| - errcheck | ||
| - gocyclo | ||
| - gosec | ||
| path: _test\.go | ||
| - linters: | ||
| - revive | ||
| path: _test.go | ||
| text: dot-imports | ||
| source: github.com/smartystreets/goconvey/convey | ||
| issues: | ||
| exclude-rules: | ||
| - path: _test\.go | ||
| linters: | ||
| - gocyclo | ||
| - errcheck | ||
| - dupl | ||
| - gosec | ||
| - path: main.go | ||
| linters: | ||
| - typecheck # assets may not exist as they are auto generated | ||
| - path: utils/service.go | ||
| linters: | ||
| - typecheck # assets may not exist as they are auto generated | ||
| - path: features/steps/example_component.go | ||
| linters: | ||
| - typecheck # assets may not exist as they are auto generated | ||
| # Allow dot import in test files for goconvey | ||
| - path: _test.go | ||
| text: "dot-imports" | ||
| linters: | ||
| - revive | ||
| source: "github.com/smartystreets/goconvey/convey" | ||
| new: false | ||
| formatters: | ||
| enable: | ||
| - gofmt | ||
| - goimports | ||
| settings: | ||
| gofmt: | ||
| simplify: false | ||
| exclusions: | ||
| generated: lax |
This file contains hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.