I have an IntelliJ project with 4 Dart packages as content root
In one package I have a directory tmp with some invalid code and and analysis_options.yaml file with
exclude:
- 'tmp/**'
Since updating to
Dart VM version: 1.24.0-edge.3dbe0099a249247c14f38301ccf3dfaeee97fe3c (Fri Apr 21 01:54:41 2017) on "linux_x64"
I get errors reported from this tmp directory.
Is this with the command-line analyzer, or with analysis server?
IDEA integrated analysis server
@zoechi, if you close all the files, and re-analyze (re-start the analysis server), do you still see these issues? I'm wondering if these only show up once you've opened files in tmp/.
Can't reproduce anymore. Thanks for having a look.
I again had this.
Not sure yet when this is happening. I'll keep observing and update when I know more.
exclude seems to be completely non-operational in 1.25.0-dev.4.0.
Minimal repro:
foo/bar.dart
main() {}
analysis_options.yaml
analyzer:
strong-mode:
implicit-casts: false
implicit-dynamic: false
exclude:
- foo/bar.dart
linter:
rules:
- always_declare_return_types
CLI
λ dartanalyzer .
Analyzing test...
error • Missing return type for 'main' at foo/bar.dart:1:1 • strong_mode_implicit_dynamic_return
lint • Declare method return types at foo/bar.dart:1:1 • always_declare_return_types
1 error and 1 lint found.
@rkirsling, excludes doesn't currently work with the command-line analyzer.
Hmm, I did not know that. Regardless, I'd already confirmed that the above happens in VSCode and WebStorm—I just switched to the CLI to try to create a "least common denominator" scenario.
Excludes also don't work for me anymore (imported or not)
[✓] Flutter (Channel master, v0.5.8-pre.215, on Mac OS X 10.13.6 17G65, locale en-AT)
• Flutter version 0.5.8-pre.215 at /Users/zoechi/flutter/flutter
• Framework revision eda03e2586 (22 hours ago), 2018-08-02 12:02:32 +0200
• Engine revision a76054f4b6
• Dart version 2.0.0-dev.69.5.flutter-8bad5c7b29
@rkirsling, thanks again for the repo. I don't see the issue when I create a project as above; I do see it as soon as I open the foo/bar.dart file. The exclusions aren't respected by the priority files set by the IDE - ones open and focused by the user.
@zoechi, does this sound like your issue as well, or something different?
@devoncarew Indeed—in 2.0.0-dev.69.5, I can confirm that exclude seems to work with my steps above from the CLI, but not in the VSCode integration.
@rkirsling still facing the issue
I used this command dartanalyzer --options analysis_options.yaml .
version: dartanalyzer version 2.5.0-edge.b5aeaa67960c03e528b76c5cfa55059a058de34
related issues
https://github.com/dart-lang/sdk/issues/28463
https://github.com/dart-lang/linter/issues/1650
FWIW @stereotype441 et al., there's another related report in https://github.com/dart-lang/linter/issues/320#issuecomment-628241212.
Most helpful comment
FWIW @stereotype441 et al., there's another related report in https://github.com/dart-lang/linter/issues/320#issuecomment-628241212.