Skip to content

Commit

Permalink
More revive lints
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Coffman <[email protected]>
  • Loading branch information
StevenACoffman committed Jun 10, 2024
1 parent d13ca74 commit fb92bd5
Show file tree
Hide file tree
Showing 11 changed files with 96 additions and 99 deletions.
2 changes: 0 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@ linters-settings:
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: error-return
- name: error-naming
- name: exported
disabled: true
- name: if-return
- name: increment-decrement
- name: var-naming
- name: var-declaration
- name: package-comments
disabled: true
Expand Down
24 changes: 12 additions & 12 deletions _examples/starwars/models/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions _examples/todo/models_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions _examples/type-system-extension/models_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions codegen/testserver/followschema/models-gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions codegen/testserver/singlefile/models-gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion graphql/handler/transport/websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func (c *wsConnection) init() bool {
}
}

var initAckPayload *InitPayload = nil
var initAckPayload *InitPayload
if c.InitFunc != nil {
var ctx context.Context
ctx, initAckPayload, err = c.InitFunc(c.ctx, c.initPayload)
Expand Down
8 changes: 4 additions & 4 deletions integration/server/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 26 additions & 26 deletions integration/server/models-go/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions internal/code/imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,21 +102,21 @@ func goModuleRoot(dir string) (string, bool) {
// go.mod is not found in the tree, so the same sentinel value fits all the directories in a tree
goModuleRootCache[d] = result
} else {
if relPath, err := filepath.Rel(result.goModPath, d); err != nil {
relPath, err := filepath.Rel(result.goModPath, d)
if err != nil {
panic(err)
} else {
path := result.moduleName
relPath := filepath.ToSlash(relPath)
if !strings.HasSuffix(relPath, "/") {
path += "/"
}
path += relPath

goModuleRootCache[d] = goModuleSearchResult{
path: path,
goModPath: result.goModPath,
moduleName: result.moduleName,
}
}
path := result.moduleName
relPath = filepath.ToSlash(relPath)
if !strings.HasSuffix(relPath, "/") {
path += "/"
}
path += relPath

goModuleRootCache[d] = goModuleSearchResult{
path: path,
goModPath: result.goModPath,
moduleName: result.moduleName,
}
}
}
Expand Down
Loading

0 comments on commit fb92bd5

Please sign in to comment.