Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the project’s golangci-lint tool to v2.1.6 and applies related formatting changes across the codebase.
- Bumps linter version in CI (
.semaphore/semaphore.yml) - Migrates
.golangci.ymlto the v2 schema and adjusts linters/formatters - Applies automated style fixes (grouped
type/varblocks, import reordering,ReplaceAll, flattened fields, etc.) - Adapts resolver code to use promoted fields and simplified references
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .semaphore/semaphore.yml | Install golangci-lint v2.1.6 in CI |
| .golangci.yml | Switch to version 2 config; restructure linters/formatters |
| trace/tracer/tracer.go | Grouped type aliases into a single type block |
| internal/schema/schema.go | Use promoted fields (s.Present, s.Loc, s.Desc) |
Comments suppressed due to low confidence (2)
.golangci.yml:17
- Verify that "default: none" is valid for disabling all linters in golangci-lint v2; if not, use "disable-all: true" for clarity and consistency.
default: none
internal/exec/resolvable/resolvable.go:315
- [nitpick] This function signature is very long and exceeds typical line length conventions; consider breaking parameters onto multiple lines for improved readability.
func (b *execBuilder) makeObjectExec(typeName string, fields ast.FieldsDefinition, possibleTypes []*ast.ObjectTypeDefinition, interfaces []*ast.InterfaceTypeDefinition, nonNull bool, resolverType reflect.Type) (*Object, error) {
| - fieldalignment | ||
| - deepequalerrors # remove later | ||
| formatters: | ||
| enable: |
There was a problem hiding this comment.
[nitpick] Consider enabling the gofumpt linter under "linters.enable" to enforce stricter formatting rules alongside the formatters configuration.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Update golangci-lint to latest version