chore(golangci-lint): upgrade to v2
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Ville Skyttä · committed by Marc Khouzam · parent db3ddb5 · Browse files · 4 files·+13 added−16 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+13 added−16 removed
- other:+13 added−16 removed
Provenance
- Commit
75790e4- Tree
dc013c9- Author
Ville Skyttä <ville.skytta@upcloud.com>- Committer
Marc Khouzam <marc.khouzam@gmail.com>- Parent
db3ddb5
4 files changed+13 added−16 removed
modified:.github/workflows/test.yml+1 added-1 removed
45 unmodified lines4647484950505152535471 unmodified lines45 unmodified lines go-version: '^1.22' check-latest: true cache: true
- uses: golangci/golangci-lint-action@v4.0.0 - uses: golangci/golangci-lint-action@v8.0.0 with: version: latest args: --verbose
71 unmodified linesmodified:.golangci.yml+10 added-13 removed
10 unmodified lines111213141516171618192021222324251926272822293031322 unmodified lines35363738333435394038414243444546474849475049505151525355545710 unmodified lines# 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.
version: "2"
run: deadline: 5m timeout: 5m
formatters: enable: - gofmt - goimports
linters: disable-all: true default: none enable: #- bodyclose # - deadcode ! deprecated since v1.49.0; replaced by 'unused' #- depguard #- dogsled #- dupl - errcheck2 unmodified lines #- gochecknoinits - goconst - gocritic #- gocyclo - gofmt - goimports #- gomnd #- goprintffuncname - gosec - gosimple - govet - ineffassign #- lll - misspell #- mnd #- nakedret #- noctx - nolintlint #- rowserrcheck #- scopelint - staticcheck #- structcheck ! deprecated since v1.49.0; replaced by 'unused' - stylecheck #- typecheck - unconvert #- unparam - unused # - varcheck ! deprecated since v1.49.0; replaced by 'unused' #- whitespace fast: falsemodified:command_test.go+1 added-1 removed
2924 unmodified lines2925 func TestHelpFuncExecuted(t *testing.T) {2926 helpText := "Long description"2927 2928 // Create a context that will be unique, not just the background context2929- //nolint:golint,staticcheck // We can safely use a basic type as key in tests.2929+ //nolint:staticcheck // We can safely use a basic type as key in tests.2930 executionCtx := context.WithValue(context.Background(), "testKey", "123")2931 2932 child := &Command{Use: "child", Run: emptyRun}2933 child.SetHelpFunc(func(cmd *Command, args []string) {21 unmodified linesmodified:completions_test.go+1 added-1 removed
1295 unmodified lines1296 Run: emptyRun,1297 }1298 rootCmd.AddCommand(childCmd)1299 1300- //nolint:golint,staticcheck // We can safely use a basic type as key in tests.1300+ //nolint:staticcheck // We can safely use a basic type as key in tests.1301 ctx := context.WithValue(context.Background(), "testKey", "123")1302 1303 // Test completing an empty string on the childCmd1304 _, output, err := executeCommandWithContextC(ctx, rootCmd, ShellCompNoDescRequestCmd, "childCmd", "")2714 unmodified lines