From 547f9438511a32d24da1b331f5cf8c82479841f8 Mon Sep 17 00:00:00 2001 From: albertony <12441419+albertony@users.noreply.github.com> Date: Sat, 20 Aug 2022 20:54:18 +0200 Subject: [PATCH] build: exclude known issues from the staticcheck linting in ci --- .golangci.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index d53026863..666fc3db3 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -29,6 +29,45 @@ issues: # Maximum count of issues with the same text. Set to 0 to disable. Default is 3. max-same-issues: 0 + exclude-rules: + + - linters: + - staticcheck + text: 'SA1019: "github.com/rclone/rclone/cmd/serve/httplib" is deprecated' + + # TODO: Remove if/when this is fixed by merging PR #6277. + - linters: + - staticcheck + text: 'SA1019: "golang.org/x/oauth2/jws" is deprecated' + + # TODO: Investigate if this is a real issue. If not, i.e. it is a false + # positive, consider instead excluding this check using a code comment! + - path: ^backend[\\/]crypt[\\/]cipher\.go$ + linters: + - staticcheck + text: 'SA6002: argument should be pointer-like to avoid allocations' + + # TODO: Investigate if this is a real issue. If not, i.e. it is a false + # positive, consider instead excluding this check using a code comment! + - path: ^backend[\\/]onedrive[\\/]onedrive\.go$ + linters: + - staticcheck + text: 'SA4009: argument err is overwritten before first use' + + # TODO: Investigate if this is a real issue. If not, i.e. it is a false + # positive, consider instead excluding this check using a code comment! + - path: ^backend[\\/]onedrive[\\/]onedrive\.go$ + linters: + - staticcheck + text: 'SA4009\(related information\): assignment to err' + + # TODO: Investigate if this is a real issue. If not, i.e. it is a false + # positive, consider instead excluding this check using a code comment! + - path: ^fs[\\/]pacer\.go$ + linters: + - staticcheck + text: 'SA5007: infinite recursive call' + run: # timeout for analysis, e.g. 30s, 5m, default is 1m timeout: 10m