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];