デフォルトの設定では、AutoCloseableのclose忘れを教えてもらえないので、教えてもらえるようにInspectionsの設定を変更してあげましょう
設定手順
下の画像の流れで選択して、 AutoCloseable used without 'try'-with-resources
にチェックを入れてあげましょう。
これで、Files#linesだけではなくAutoCloseableのtry-with-resources外での利用やclose忘れを検知できるようになります。
Inspectionの実行結果
ちゃんと警告出るようになりました!