what do you think about golangci-lint?
维护者通常 3 天内回复
还没有人认领这个 Issue。
评估
调研方向
The issue demonstrates golangci-lint findings in the ds18b20 driver and mentions the Makefile's existing gofmt target. Start by reading that Makefile target and checking how the ds18b20 driver is handled by the default linter settings. Determine which drivers can be linted without the machine package, then document or configure a repeatable lint check and address its reported findings.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Go
- 星标
- 756
- 派生
- 251
- 平均合并
- 7 天 12 小时
- 30 天内合并 PR
- 8
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
tinygo-org/drivers 的其他 Issue
-
难度 5/5 一周以上 新手友好度 20/100
tinygo-org/drivers#946 ·
维护者通常 3 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
tinygo-org/drivers#927 ·
维护者通常 3 天内回复
-
难度 5/5 一周以上 新手友好度 22/100
tinygo-org/drivers#901 ·
维护者通常 3 天内回复
-
难度 4/5 3-5 天 新手友好度 32/100
tinygo-org/drivers#886 · 1 条评论 ·
维护者通常 3 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
tinygo-org/drivers#877 ·
维护者通常 3 天内回复
查看 tinygo-org/drivers 的全部 Issue
相似的 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 78/100
sresarehumantoo/cc-artex#456 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
factory:subtask
难度 1/5 1 小时以内 新手友好度 75/100
维护者通常 1 天内回复
-
release
难度 1/5 1 小时以内 新手友好度 75/100
github/gh-aw-mcpg#17603 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
tinygo-org/tinygo#6727 ·
维护者通常 1 天内回复