chore(deps): update pre-commit hook golangci/golangci-lint to v2
This commit is contained in:
+20
-1
@@ -1,3 +1,22 @@
|
|||||||
|
version: "2"
|
||||||
run:
|
run:
|
||||||
allow-parallel-runners: true
|
allow-parallel-runners: true
|
||||||
timeout: 5m
|
linters:
|
||||||
|
exclusions:
|
||||||
|
generated: lax
|
||||||
|
presets:
|
||||||
|
- comments
|
||||||
|
- common-false-positives
|
||||||
|
- legacy
|
||||||
|
- std-error-handling
|
||||||
|
paths:
|
||||||
|
- third_party$
|
||||||
|
- builtin$
|
||||||
|
- examples$
|
||||||
|
formatters:
|
||||||
|
exclusions:
|
||||||
|
generated: lax
|
||||||
|
paths:
|
||||||
|
- third_party$
|
||||||
|
- builtin$
|
||||||
|
- examples$
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ repos:
|
|||||||
- id: go-test
|
- id: go-test
|
||||||
- id: gofumpt
|
- id: gofumpt
|
||||||
- repo: https://github.com/golangci/golangci-lint
|
- repo: https://github.com/golangci/golangci-lint
|
||||||
rev: v1.64.8
|
rev: v2.0.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: golangci-lint-full
|
- id: golangci-lint-full
|
||||||
- repo: https://github.com/gitleaks/gitleaks
|
- repo: https://github.com/gitleaks/gitleaks
|
||||||
|
|||||||
@@ -41,15 +41,15 @@ func (m *mergeDuplicatedFieldsVisitor) LeaveObjectTypeDefinition(ref int) {
|
|||||||
}
|
}
|
||||||
oldFieldTypeNameBytes, err := m.document.PrintTypeBytes(oldTypeRef, nil)
|
oldFieldTypeNameBytes, err := m.document.PrintTypeBytes(oldTypeRef, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
m.Walker.StopWithInternalErr(err)
|
m.StopWithInternalErr(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
newFieldTypeNameBytes, err := m.document.PrintTypeBytes(newTypeRef, nil)
|
newFieldTypeNameBytes, err := m.document.PrintTypeBytes(newTypeRef, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
m.Walker.StopWithInternalErr(err)
|
m.StopWithInternalErr(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
m.Walker.StopWithExternalErr(operationreport.ErrDuplicateFieldsMustBeIdentical(
|
m.StopWithExternalErr(operationreport.ErrDuplicateFieldsMustBeIdentical(
|
||||||
fieldName, m.document.ObjectTypeDefinitionNameString(ref), string(oldFieldTypeNameBytes), string(newFieldTypeNameBytes),
|
fieldName, m.document.ObjectTypeDefinitionNameString(ref), string(oldFieldTypeNameBytes), string(newFieldTypeNameBytes),
|
||||||
))
|
))
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -154,14 +154,14 @@ func (u unionSharedType) valueName(ref int) string {
|
|||||||
|
|
||||||
type scalarSharedType struct{}
|
type scalarSharedType struct{}
|
||||||
|
|
||||||
func (_ scalarSharedType) areValuesIdentical(_ []int) bool {
|
func (scalarSharedType) areValuesIdentical(_ []int) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (_ scalarSharedType) valueRefs() []int {
|
func (scalarSharedType) valueRefs() []int {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (_ scalarSharedType) valueName(_ int) string {
|
func (scalarSharedType) valueName(_ int) string {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user