将棋プログラミング

(将棋に関する)ソフトウェア開発のノウハウ等。

Android Studio の警告を表示しない

Android Studio を Electric Eel に更新したところ、表示される警告が多くなった。

Commented out code

特に、2行以上のコメントに対して、weak warnings が次のように表示されるので、これを表示しないようにした。

コメントの weak warnings

File - Settings のメニューを実行し、Editor - Inspections で、Java - Code maturity - Commented out code のチェックを外す。

Inspections

これで、コメントに対する weak warnings が表示されなくなった。

インテント

インテントに対して、次の警告が表示される場合がある。

The indentation string here is different ...
インテントの警告

この場合、More actions を実行し、次の Suppress SuspiciousIdentation ... を実行すると、警告しなくなる。

More actions

statement has empty body

次の警告を消したかったが、どこにあるかわからなかった。

'if' statement has empty body
'else' statement has empty body

has empty body で検索し、Probable bugs の Statement with empty body だとわかった。

Statement with empty body