mirror of
https://github.com/prometheus/node_exporter.git
synced 2026-02-05 15:45:10 +01:00
Enable stylecheck linter
Add stylecheck linter to golangci-lint. * Fix style issues. Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
@@ -2,6 +2,7 @@ linters:
|
||||
enable:
|
||||
- misspell
|
||||
- revive
|
||||
- stylecheck
|
||||
disable:
|
||||
# Disable soon to deprecated[1] linters that lead to false
|
||||
# positives when build tags disable certain files[2]
|
||||
|
||||
@@ -84,7 +84,7 @@ func NewCPUCollector(logger log.Logger) (Collector, error) {
|
||||
isolcpus, err := sysfs.IsolatedCPUs()
|
||||
if err != nil {
|
||||
if !os.IsNotExist(err) {
|
||||
return nil, fmt.Errorf("Unable to get isolated cpus: %w", err)
|
||||
return nil, fmt.Errorf("unable to get isolated cpus: %w", err)
|
||||
}
|
||||
level.Debug(logger).Log("msg", "Could not open isolated file", "error", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user