Skip to content

Commit

Permalink
More lint (#276)
Browse files Browse the repository at this point in the history
* More lint

Signed-off-by: Steve Coffman <steve@khanacademy.org>

* Update versions

Signed-off-by: Steve Coffman <steve@khanacademy.org>

---------

Signed-off-by: Steve Coffman <steve@khanacademy.org>
  • Loading branch information
StevenACoffman authored Sep 7, 2023
1 parent 450a0ee commit 77ba251
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
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

0 comments on commit 77ba251

Please sign in to comment.