From a4caa61c47ebfd99cbe1bec1710adbbaa84504fb Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Fri, 12 Aug 2022 23:53:18 +0000 Subject: [PATCH] chore(lint): add `nosnakecase` linter --- .golangci.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 3d161266..4ddca300 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -19,7 +19,6 @@ issues: source: "^.+= os\\.OpenFile\\(.+, .+, 0[0-9]{3}\\)" linters: - gomnd - - text: "^mnd: Magic number: 0[0-9]{3}, in detected$" source: "^.+= os\\.MkdirAll\\(.+, 0[0-9]{3}\\)" linters: @@ -30,6 +29,23 @@ issues: - text: "returns interface \\(github\\.com\\/vishvananda\\/netlink\\.Link\\)" linters: - ireturn + - text: "_main contains underscore\\. You should use mixedCap or MixedCap\\." + path: "cmd\\/gluetun\\/main\\.go" + linters: + - nosnakecase + - text: "O_[A-Z]+ contains underscore\\. You should use mixedCap or MixedCap\\." + linters: + - nosnakecase + - text: "Stat_t contains underscore\\. You should use mixedCap or MixedCap\\." + linters: + - nosnakecase + - text: "S_IFCHR contains underscore\\. You should use mixedCap or MixedCap\\." + linters: + - nosnakecase + - text: "FAMILY_(ALL|V4|V6) contains underscore\\. You should use mixedCap or MixedCap\\." + path: "internal\\/(netlink|routing|wireguard)\\/.+\\.go" + linters: + - nosnakecase linters: enable: @@ -77,6 +93,7 @@ linters: - nilnil - noctx - nolintlint + - nosnakecase - nosprintfhostport - prealloc - predeclared