From 0893689c6a4ef196466c408a2a59c34948a66403 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 2 Mar 2023 14:06:56 +0300 Subject: [PATCH] [#83] pre-commit: Add golangci-lint hook Skip deprecated warning for now, adopting new neo-go API will be done in another task. Signed-off-by: Evgenii Stratonikov --- .golangci.yml | 2 ++ .pre-commit-config.yaml | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 3adfd0f1e..4c4fccc9b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -24,6 +24,8 @@ linters-settings: govet: # report about shadowed variables check-shadowing: false + staticcheck: + checks: ["all", "-SA1019"] # TODO Enable SA1019 after deprecated warning are fixed. linters: enable: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9c6f60481..e7edc6cb7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,3 +17,8 @@ repos: args: [--markdown-linebreak-ext=md] - id: end-of-file-fixer exclude: ".key$" + + - repo: https://github.com/golangci/golangci-lint + rev: v1.51.2 + hooks: + - id: golangci-lint