what do you think about golangci-lint?

オープン
#789 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
go
領域
tooling

調査の方向性

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時間
マージ済み PR(30日)
8

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

tinygo-org/drivers のほかの issue

tinygo-org/drivers の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。