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:
Ben Kochie 2024-02-14 14:48:09 +01:00
parent 6d18ce7bca
commit e5b09ec144
No known key found for this signature in database
GPG key ID: C646B23C9E3245F1
2 changed files with 2 additions and 1 deletions

View file

@ -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]

View file

@ -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)
}