LoginSignup
0
0

More than 5 years have passed since last update.

golintのワーニングを雑にフィルタリングする

Posted at

direnvでワークスペース固有のgolintを使うようにして、その中でgrep -vしてメッセージを握りつぶす。ガチじゃないコードでexported const ...とかそのへんだけ消してみたかった。

.envrc
export PATH="$(pwd)/bin:$PATH"
bin/golint
$GOPATH/bin/golint $@ | grep -v exported

VSCodeはgolintのパスをキャッシュしてしまうようなので、そこだけ気に留めておく。

goPath.ts
export function getBinPathWithPreferredGopath(toolName: string, preferredGopaths: string[], alternateTools?: { [key: string]: string; }) {
    if (binPathCache[toolName]) return binPathCache[toolName];

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0