From 8611c9f6f77311463f85fbe8e84cf8260f1e563f Mon Sep 17 00:00:00 2001 From: albertony <12441419+albertony@users.noreply.github.com> Date: Sat, 20 Aug 2022 13:35:58 +0200 Subject: [PATCH] build: add staticcheck, gosimple and stylecheck linting to the build pipeline - fixes #6273 These combined should correspond to the checks performed by the stand-alone staticcheck tool, which is by default used for linting in Visual Studio Code with the Go extension. One exception is the unused checks, which staticcheck tool performs, but chose to not enabled here in rclone due to many reported occurrences. See #6387 for more information. --- .golangci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 40c6e76d2..d53026863 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -11,6 +11,10 @@ linters: - varcheck - govet - unconvert + - staticcheck + - gosimple + - stylecheck + #- unused #- prealloc #- maligned disable-all: true @@ -42,3 +46,7 @@ linters-settings: disabled: true - name: superfluous-else disabled: true + stylecheck: + # Only enable the checks performed by the staticcheck stand-alone tool, + # as documented here: https://staticcheck.io/docs/configuration/options/#checks + checks: ["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022", "-ST1023"]