Skip to content
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

More lint #276

Merged
merged 3 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ version: 2
jobs:
build:
docker:
- image: golang:1.16
- image: golang:1.19
working_directory: /gqlparser
steps:
- checkout
- run: >
go get -u github.com/mattn/goveralls
- run: go test -race ./...
- run: go test -coverprofile=/tmp/coverage.out -coverpkg=./... ./...
- run: goveralls -coverprofile=/tmp/coverage.out -service=circle-ci -repotoken=$COVERALLS_TOKEN
- run: go test -count 25 ./... # check for flakey test ordering
- run: go run github.com/mattn/goveralls@latest -coverprofile=/tmp/coverage.out -service=circle-ci -repotoken=$COVERALLS_TOKEN
- run: go test -count 25 ./... # check for flaky test ordering
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/vektah/gqlparser/v2

go 1.18
go 1.19

require (
github.com/agnivade/levenshtein v1.1.1
Expand Down
4 changes: 2 additions & 2 deletions parser/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (p *parser) parseOptionalSelectionSet() SelectionSet {
selections = append(selections, p.parseSelection())
})

return SelectionSet(selections)
return selections
}

func (p *parser) parseRequiredSelectionSet() SelectionSet {
Expand All @@ -134,7 +134,7 @@ func (p *parser) parseRequiredSelectionSet() SelectionSet {
selections = append(selections, p.parseSelection())
})

return SelectionSet(selections)
return selections
}

func (p *parser) parseSelection() Selection {
Expand Down
2 changes: 1 addition & 1 deletion validator/walk.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func (w *Walker) walkSelection(parentDef *ast.Definition, it ast.Selection) {
w.walkDirectives(nextParentDef, it.Directives, ast.LocationFragmentSpread)

if def != nil && !w.validatedFragmentSpreads[def.Name] {
// prevent inifinite recursion
// prevent infinite recursion
w.validatedFragmentSpreads[def.Name] = true
w.walkSelectionSet(nextParentDef, def.SelectionSet)
}
Expand Down
Loading