summaryrefslogtreecommitdiffstats
path: root/.golangci.yml
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2023-09-30 19:23:52 +1000
committerJesse Duffield <jessedduffield@gmail.com>2023-09-30 19:24:59 +1000
commit3e2ef84d566678ffaa6afa120c6881b558eb2227 (patch)
tree2869846e1751f2c2a6b214556b8a737fafe19254 /.golangci.yml
parentb2eccd6fe872efb65c080649a821e6dfc542221b (diff)
Ignore deprecation checks in linter
This is pretty funny: the staticcheck linter gets mad if we use a field which is marked in a comment as being deprecated. But it tripped on my own comment saying that a field is deprecated in terms of the user config! Obviously we have to make use of this field, otherwise we would just remove it entirely rather than mark it as deprecated, so I'm silencing this lint. I doubt this lint would actually come in handy in other cases (like when using a third party package) and worst case scenario we just end up fixing the problem when we try to upgrade the package and the deprecated field is now gone).
Diffstat (limited to '.golangci.yml')
-rw-r--r--.golangci.yml6
1 files changed, 5 insertions, 1 deletions
diff --git a/.golangci.yml b/.golangci.yml
index d9c67792e..258660b62 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -20,7 +20,11 @@ linters:
linters-settings:
exhaustive:
default-signifies-exhaustive: true
-
+ staticcheck:
+ # SA1019 is for checking that we're not using fields marked as deprecated
+ # in a comment. It decides this in a loose way so I'm silencing it. Also because
+ # it's tripping on our own structs.
+ checks: ["all", "-SA1019"]
nakedret:
# the gods will judge me but I just don't like naked returns at all
max-func-lines: 0