Skip to content

Remove redundant nil check - #2206

Merged
SuperQ merged 1 commit into
prometheus:masterfrom
computerphilosopher:bspark/lint
Nov 15, 2021
Merged

SuperQ merged 1 commit into
prometheus:masterfrom
computerphilosopher:bspark/lint

Conversation

@computerphilosopher

Copy link
Copy Markdown
Contributor

'make' command fails because of 'golangci-lint'

collector/cpu_linux.go:145:2: if-return: redundant if ...; err != nil check, just return error instead. (revive)
        if err := c.updateThermalThrottle(ch); err != nil {
                return err
        }
collector/drm_linux.go:102:2: if-return: redundant if ...; err != nil check, just return error instead. (revive)
        if err := c.updateAMDCards(ch); err != nil {
                return err
        }

@discordianfish discordianfish left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks!

@discordianfish

Copy link
Copy Markdown
Member

You need to sign-off your commits though (git commit --amend -s). See DCO check.

Signed-off-by: computerphilosopher <bspark@jam2in.com>
@computerphilosopher

Copy link
Copy Markdown
Contributor Author

@discordianfish

I signed-off my commits. Thanks for the review.

Comment thread collector/drm_linux.go
@SuperQ
SuperQ merged commit c861ba9 into prometheus:master Nov 15, 2021
oblitorum pushed a commit to shatteredsilicon/node_exporter that referenced this pull request Apr 9, 2024
Signed-off-by: computerphilosopher <bspark@jam2in.com>
oblitorum pushed a commit to shatteredsilicon/node_exporter that referenced this pull request Apr 9, 2024
Signed-off-by: computerphilosopher <bspark@jam2in.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants