Skip to content

what do you think about golangci-lint? #789

@gen2thomas

Description

@gen2thomas

At least all drivers without the machine package import could be checked. I have tested this with the default settings of linter for the ds18b20 folder as an fast example and got 3 important issues regarding a missing check of error return value:

ds18b20.go:47:15: Error return value of `d.owd.Select` is not checked (errcheck)
		d.owd.Select(romid)
		            ^
ds18b20.go:57:14: Error return value of `d.owd.Select` is not checked (errcheck)
	d.owd.Select(romid)
	            ^
ds18b20.go:67:14: Error return value of `d.owd.Select` is not checked (errcheck)
	d.owd.Select(romid)
	            ^
ds18b20.go:32:23: ST1005: error strings should not end with punctuation or newlines (staticcheck)
	errReadTemperature = errors.New("Error: DS18B20. Read temperature error: CRC mismatch.")
	                     ^
4 issues:
* errcheck: 3
* staticcheck: 1

Currently gofmt is used in the Makefile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions