Open humblerookie opened 1 year ago
Is there a a chance to share a small reproducible example (a minimal project or file)?
Sure PFA.
Running flutter analyze
on this would result in this
I understand that for the below line:
info - Unused import: 'package:flutter/foundation.dart' - lib/main.dart:2:8 - unused_import
it is expected that lib/main.dart:2:8
is clickable and points to the given position. And the link 'package:flutter/foundation.dart'
isn't important, since it is not the user code.
The analyzer emits plain text, so it seems intellij makes anything URI-shaped into a link, like the package:
URI, and not plain paths, even if they are valid relative to the project.
@asashour precisely.
Are you aware that the analyzer output also shows up in the Dart Analysis Tool Window in IntelliJ? I would recommend using that window over the command line output both because the links are clickable, the analysis results update realtime with code changes, and you can right click on lines to trigger quick fixes for issues like unused import that have quick fixes.
@jacob314 Thanks, Yes I'm aware, the issue is I run multiple checks not limited to the analyzer output, so it's easier to run them all at once from a command line script. While I could still probably switch to the dart analysis window once the analyzer command fails, it could be improved upon UX wise.
Dart/Flutter analyzer emits broken links that IntelliJ isn't able to map for eg. here's the output of a sample project
Whereas the import is fully qualified with the
package:
prefix making it clickable and traceable to source in IntelliJ, the actual file that needs change isn't and is misleading always warranting a false click from the user as shown in the image below.Here are my setup details.