'Flutter - Ignore lint for tests breaks compiler and auto-import

Using an analysis option definition like below helps to disable lint warnings for tests files, but then i also don't get any compiler errors anymore nor the auto-import suggestions.

analyzer:
  exclude:
    - test/**

I tried also different variations but non of them worked. Any ideas how to solve this?

Android Studio Bumblebee | 2021.1.1 Patch 1 Flutter 2.10.1 flutter_lints: ^1.0.4



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source