From 178d3b14c965df5a1e6df667a368ce3cb748b717 Mon Sep 17 00:00:00 2001 From: Kevin Joiner <10265309+KevinJoiner@users.noreply.github.com> Date: Thu, 30 May 2024 10:46:06 -0400 Subject: [PATCH] linter fixes --- .golangci.yml | 7 +++++++ go.mod | 1 - go.sum | 2 -- pkg/schema/validation.go | 1 + 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 9c9a803..8ec8aa0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -56,3 +56,10 @@ issues: - path: convert-funcs_test\.go linters: - dupl + # Exclude some linters from running on tests files. + - path: _test\.go + linters: + - funlen + - errcheck + - dupl + - gosec diff --git a/go.mod b/go.mod index f1d64fd..59ff67c 100644 --- a/go.mod +++ b/go.mod @@ -42,7 +42,6 @@ require ( github.com/google/uuid v1.6.0 // indirect github.com/klauspost/compress v1.17.7 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/madflojo/testcerts v1.1.1 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mfridman/interpolate v0.0.2 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect diff --git a/go.sum b/go.sum index b6029cc..cc56c5c 100644 --- a/go.sum +++ b/go.sum @@ -81,8 +81,6 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/madflojo/testcerts v1.1.1 h1:YsSHWV79nMNZK0mJtwXjKoYHjJEbLPFefR8TxmmWupY= -github.com/madflojo/testcerts v1.1.1/go.mod h1:MW8sh39gLnkKh4K0Nc55AyHEDl9l/FBLDUsQhpmkuo0= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= diff --git a/pkg/schema/validation.go b/pkg/schema/validation.go index 2e7708f..09b06a0 100644 --- a/pkg/schema/validation.go +++ b/pkg/schema/validation.go @@ -12,6 +12,7 @@ var ( privileges = []string{"VEHICLE_NON_LOCATION_DATA", "VEHICLE_COMMANDS", "VEHICLE_CURRENT_LOCATION", "VEHICLE_ALL_TIME_LOCATION", "VEHICLE_VIN_CREDENTIAL"} ) +// ErrInvalid is an error for invalid definitions. type ErrInvalid struct { Property string Name string