From d0e60ea38f432106d3834c70dad30aae9a90a7d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20L=C3=BCdtke?= Date: Thu, 3 Oct 2024 12:12:30 +0200 Subject: [PATCH] Add make staticcheck + config and some ignores --- Makefile | 3 +++ colorfinder/colorfinder.go | 1 + ico/ico.go | 2 +- staticcheck.conf | 4 ++++ 4 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 staticcheck.conf diff --git a/Makefile b/Makefile index e0784de0..a9350b36 100644 --- a/Makefile +++ b/Makefile @@ -51,6 +51,9 @@ minify_css: gotags: gotags -tag-relative=true -R=true -sort=true -f="tags" -fields=+l . +staticcheck: + staticcheck ./... + # ## Building ## # diff --git a/colorfinder/colorfinder.go b/colorfinder/colorfinder.go index e4d8c39d..5b8232b8 100644 --- a/colorfinder/colorfinder.go +++ b/colorfinder/colorfinder.go @@ -24,6 +24,7 @@ import ( _ "github.com/mat/besticon/v3/ico" ) +//lint:ignore U1000 unused main function func main() { arg := os.Args[1] diff --git a/ico/ico.go b/ico/ico.go index 230735f3..1866a959 100644 --- a/ico/ico.go +++ b/ico/ico.go @@ -142,7 +142,7 @@ type bitmapHeaderRead struct { type bitmapHeaderWrite struct { sigBM [2]byte fileSize uint32 - resverved [2]uint16 + resverved [2]uint16 //lint:ignore U1000 unused pixOffset uint32 Size uint32 Width uint32 diff --git a/staticcheck.conf b/staticcheck.conf new file mode 100644 index 00000000..33e3288d --- /dev/null +++ b/staticcheck.conf @@ -0,0 +1,4 @@ +# staticcheck.conf + +# Based on the default from https://staticcheck.dev/docs/configuration/#example-configuration +checks = ["all", "-SA9003", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022", "-ST1023", "-ST1013"]