-
Notifications
You must be signed in to change notification settings - Fork 10
align go repository #174
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
Open
Open
align go repository #174
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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 |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| .git | ||
| .gitignore | ||
| *.md | ||
| .github/ | ||
| /charts/ | ||
| deploy/ | ||
| examples/ | ||
| helpers/ | ||
| scripts/ | ||
| test/ | ||
| go.mod | ||
| go.sum | ||
| Dockerfile | ||
| Makefile | ||
| VERSION | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| name: Govulncheck | ||
|
|
||
| permissions: {} | ||
|
|
||
| on: | ||
| push: | ||
| branches: [master] | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| govulncheck: | ||
| permissions: | ||
| contents: read | ||
| name: Run on Ubuntu | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Clone the code | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup Go | ||
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
|
|
||
| - name: Run govulncheck | ||
| run: make govulncheck |
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 |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| name: Lint | ||
|
|
||
| permissions: {} | ||
|
|
||
| on: | ||
| push: | ||
| branches: [master] | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| lint: | ||
| permissions: | ||
| contents: read | ||
| name: Run on Ubuntu | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Clone the code | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup Go | ||
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
|
|
||
| - name: Run linter | ||
| run: make lint |
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 was deleted.
Oops, something went wrong.
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 |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name: Tests | ||
|
|
||
| permissions: {} | ||
|
|
||
| on: | ||
| push: | ||
| branches: [master] | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| test: | ||
| permissions: | ||
| contents: read | ||
| name: Run on Ubuntu | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Clone the code | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup Go | ||
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
|
|
||
| - name: Check Go modules | ||
| run: go mod tidy | ||
|
alakae marked this conversation as resolved.
Outdated
|
||
| - name: Running Tests | ||
| run: make test TESTARGS='-race' | ||
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 |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| name: Workflow Security Lint | ||
|
|
||
| permissions: {} | ||
|
|
||
| on: | ||
| push: | ||
| branches: [master] | ||
| paths: ['.github/**'] | ||
| pull_request: | ||
| paths: ['.github/**'] | ||
|
|
||
| jobs: | ||
| zizmor: | ||
| permissions: | ||
| actions: read | ||
| contents: read | ||
| security-events: write | ||
| name: zizmor | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Run zizmor | ||
| uses: zizmorcore/zizmor-action@3dc1ecc9bcb9e94e9b2c709687979e1298497054 # v0.6.2 |
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 |
|---|---|---|
|
|
@@ -6,3 +6,4 @@ charts/csi-cloudscale/charts | |
|
|
||
| cmd/cloudscale-csi-plugin/cloudscale-csi-plugin | ||
| k8test/ | ||
| bin/ | ||
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 |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| version: "2" | ||
| run: | ||
| allow-parallel-runners: true | ||
| linters: | ||
| default: none | ||
| enable: | ||
| - asasalint # warns about passing []any to func(...any) without expanding it | ||
| - asciicheck # non ascii symbols | ||
| - copyloopvar # copying loop variables | ||
| - errcheck # unchecked errors | ||
| - exhaustive # exhaustiveness of enum switch statements | ||
| - gocritic # bugs, performance, style | ||
| - gocyclo # cyclomatic complexity of functions | ||
| - godoclint # go documentation linting against best practices | ||
| - gosec # potential security problems | ||
| - govet # basically 'go vet' | ||
| - importas # enforces consistent import aliases. | ||
| - ineffassign # ineffectual assignments | ||
| - loggercheck # check for even key/value pairs in logger calls | ||
| - modernize # suggest simplifications to Go code, using modern language and library features | ||
| - misspell # spelling checks | ||
| - nakedret # naked returns (named return parameters and an empty return) | ||
| - noctx # http requests without context.Context | ||
| - predeclared # shadowing predeclared identifiers | ||
| - revive # better version of golint | ||
| - staticcheck # many static checks | ||
| - unconvert # unnecessary type conversions | ||
| - unparam # unused function parameters | ||
| - unused # unused constants, variables,functions, types | ||
| - usestdlibvars # using variables/constants from the standard library | ||
| - usetesting # reports uses of functions with replacement inside the testing package | ||
| - whitespace # unnecessary newlines | ||
| settings: | ||
| loggercheck: | ||
| kitlog: false | ||
| slog: false | ||
| zap: false | ||
| require-string-key: true | ||
| no-printf-like: true | ||
| modernize: | ||
| disable: | ||
| - omitzero | ||
| gocritic: | ||
| disabled-checks: | ||
| - ifElseChain # disabled ifElseChain because this is purely stylistic | ||
| revive: | ||
| rules: | ||
| # The following rules are recommended https://github.com/mgechev/revive#recommended-configuration | ||
| - name: blank-imports | ||
| - name: context-as-argument | ||
| - name: context-keys-type | ||
| - name: error-return | ||
| - name: error-strings | ||
| - name: error-naming | ||
| - name: if-return | ||
| - name: increment-decrement | ||
| - name: var-naming | ||
| - name: var-declaration | ||
| - name: range | ||
| - name: receiver-naming | ||
| - name: time-naming | ||
| - name: unexported-return | ||
| - name: indent-error-flow | ||
| - name: errorf | ||
| - name: empty-block | ||
| - name: superfluous-else | ||
| - name: unreachable-code | ||
| - name: redefines-builtin-id | ||
| staticcheck: | ||
| dot-import-whitelist: | ||
| - fmt | ||
| exclusions: | ||
| generated: lax | ||
| warn-unused: true | ||
| formatters: | ||
| enable: | ||
| - goimports # ensures imports are organized | ||
| - gofmt # Check if the code is formatted according to 'gofmt' command. | ||
| settings: | ||
| goimports: | ||
| # A list of prefixes, which, if set, checks import paths | ||
| # with the given prefixes are grouped after 3rd-party packages. | ||
| # Default: [] | ||
| local-prefixes: | ||
| - github.com/cloudscale-ch/csi-cloudscale | ||
| exclusions: | ||
| generated: lax | ||
| warn-unused: true |
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.