mirror of
https://github.com/prometheus-community/smartctl_exporter.git
synced 2024-11-16 01:33:07 +01:00
Merge pull request #144 from prometheus-community/superq/update-linting
Update linting
This commit is contained in:
commit
d5173a5b6e
4 changed files with 29 additions and 8 deletions
4
.github/workflows/golangci-lint.yml
vendored
4
.github/workflows/golangci-lint.yml
vendored
|
@ -1,3 +1,5 @@
|
|||
---
|
||||
# This action is synced from https://github.com/prometheus/prometheus
|
||||
name: golangci-lint
|
||||
on:
|
||||
push:
|
||||
|
@ -27,4 +29,4 @@ jobs:
|
|||
- name: Lint
|
||||
uses: golangci/golangci-lint-action@v3.4.0
|
||||
with:
|
||||
version: v1.51.2
|
||||
version: v1.53.3
|
||||
|
|
|
@ -1,4 +1,17 @@
|
|||
---
|
||||
linters:
|
||||
enable:
|
||||
- misspell
|
||||
- revive
|
||||
disable:
|
||||
# Disable soon to deprecated[1] linters that lead to false
|
||||
# positives when build tags disable certain files[2]
|
||||
# 1: https://github.com/golangci/golangci-lint/issues/1841
|
||||
# 2: https://github.com/prometheus/node_exporter/issues/1545
|
||||
- deadcode
|
||||
- unused
|
||||
- structcheck
|
||||
- varcheck
|
||||
|
||||
issues:
|
||||
exclude-rules:
|
||||
- path: _test.go
|
||||
|
@ -7,4 +20,14 @@ issues:
|
|||
|
||||
linters-settings:
|
||||
errcheck:
|
||||
exclude: scripts/errcheck_excludes.txt
|
||||
exclude-functions:
|
||||
# Used in HTTP handlers, any error is handled by the server itself.
|
||||
- (net/http.ResponseWriter).Write
|
||||
# Never check for logger errors.
|
||||
- (github.com/go-kit/log.Logger).Log
|
||||
revive:
|
||||
rules:
|
||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter
|
||||
- name: unused-parameter
|
||||
severity: warning
|
||||
disabled: true
|
||||
|
|
|
@ -55,7 +55,7 @@ ifneq ($(shell command -v gotestsum > /dev/null),)
|
|||
endif
|
||||
endif
|
||||
|
||||
PROMU_VERSION ?= 0.14.0
|
||||
PROMU_VERSION ?= 0.15.0
|
||||
PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz
|
||||
|
||||
SKIP_GOLANGCI_LINT :=
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
// Used in HTTP handlers, any error is handled by the server itself.
|
||||
(net/http.ResponseWriter).Write
|
||||
// Never check for logger errors.
|
||||
(github.com/go-kit/log.Logger).Log
|
Loading…
Reference in a new issue