Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第4回 #4

Open
tenntenn opened this issue Feb 3, 2020 · 3 comments
Open

第4回 #4

tenntenn opened this issue Feb 3, 2020 · 3 comments

Comments

@tenntenn
Copy link
Member

tenntenn commented Feb 3, 2020

静的解析のライブコーディングするぞ!

Hangout, Hangout Meets, Discordの画面共有を試すぞ!

@tenntenn
Copy link
Member Author

tenntenn commented Feb 3, 2020

  • こういうやつを検出するやつ
Hoge string `json:"hoge"`  // OK
Fuga string `json:"hoge"` // NG
  • import が一つにまとまっているかチェック

  • コピペだったり、IDEの一括Renameだったり、リファクタで、コメントが別の関数のこと書いてるような時があるので、それを検知するやつ

@tenntenn
Copy link
Member Author

tenntenn commented Feb 3, 2020

if 文で同じ条件を2回チェックしてるものを検出。

if A() && B() C() && A() { // A()が2回出てきた
}

@tenntenn
Copy link
Member Author

tenntenn commented Feb 4, 2020

スライスや配列で予めサイズがわかっている場合にnilで初期化したら指摘するやつ

var ms []int
for _, n := range ns {
    ms = append(ms, n)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant