created: 2020-12-31T13:31:54.000Z

vscodeでgolintの警告を抑制する

vscodeでgolangをgolintしながら書いていると、以下のようなwarningが出る。

exported type Expression should have comment or be unexportedgo-lint

publicなコードには説明が必要。というルールだが小さな関数とかだといちいちやってられないので、このwarningを抑制したい。

こんな設定で警告が消える。

    "go.lintTool": "golint",
    "go.lintFlags": [
      "--exclude=\"\bexported \\w+ (\\S*['.]*)([a-zA-Z'.*]*) should have comment or be unexported\b\""
    ],

参考

アイリスオーヤマ ワイヤレス テレビ チューナー 地デジ/BS/CS 録画予約可能 LUCAステーション IST-BAUL201
[ad] アイリスオーヤマ ワイヤレス テレビ チューナー 地デジ/BS/CS 録画予約可能 LUCAステーション IST-BAUL201
アイリスオーヤマ(IRIS OHYAMA) (エレクトロニクス)