Skip to content

Commit 6c6568b

Browse files
authored
chore: enable context-as-argument from revive linter (#2946)
Signed-off-by: Matthieu MOREL <[email protected]>
1 parent 4f0bcf8 commit 6c6568b

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

.golangci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ linters-settings:
3737
rules:
3838
- name: blank-imports
3939
- name: context-as-argument
40-
disabled: true
4140
arguments:
4241
- allowTypesBefore: "*testing.T"
4342
- name: context-keys-type

modulegen/main_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ func TestGenerate(t *testing.T) {
296296
assertModuleContent(t, module, filepath.Join(generatedTemplatesDir, moduleNameLower+".go"))
297297
assertGoModContent(t, module, originalConfig.Extra.LatestVersion, filepath.Join(generatedTemplatesDir, "go.mod"))
298298
assertMakefileContent(t, module, filepath.Join(generatedTemplatesDir, "Makefile"))
299-
assertMkdocsNavItems(t, module, originalConfig, tmpCtx)
299+
assertMkdocsNavItems(t, tmpCtx, module, originalConfig)
300300
}
301301

302302
func TestGenerateModule(t *testing.T) {
@@ -352,7 +352,7 @@ func TestGenerateModule(t *testing.T) {
352352
assertModuleContent(t, module, filepath.Join(generatedTemplatesDir, moduleNameLower+".go"))
353353
assertGoModContent(t, module, originalConfig.Extra.LatestVersion, filepath.Join(generatedTemplatesDir, "go.mod"))
354354
assertMakefileContent(t, module, filepath.Join(generatedTemplatesDir, "Makefile"))
355-
assertMkdocsNavItems(t, module, originalConfig, tmpCtx)
355+
assertMkdocsNavItems(t, tmpCtx, module, originalConfig)
356356
}
357357

358358
// assert content module file in the docs
@@ -480,9 +480,9 @@ func assertMakefileContent(t *testing.T, module context.TestcontainersModule, ma
480480
}
481481

482482
// assert content in the nav items from mkdocs.yml
483-
func assertMkdocsNavItems(t *testing.T, module context.TestcontainersModule, originalConfig *mkdocs.Config, tmpCtx context.Context) {
483+
func assertMkdocsNavItems(t *testing.T, ctx context.Context, module context.TestcontainersModule, originalConfig *mkdocs.Config) {
484484
t.Helper()
485-
config, err := mkdocs.ReadConfig(tmpCtx.MkdocsConfigFile())
485+
config, err := mkdocs.ReadConfig(ctx.MkdocsConfigFile())
486486
require.NoError(t, err)
487487

488488
parentDir := module.ParentDir()

0 commit comments

Comments
 (0)