-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IntelliJ and Android Studio don't show custom lints #307
Comments
There is a similar bug reported some time ago #191, but the issue still persists. |
@EricSchlichting @rrousselGit Android Studio and IntelliJ still don't work with |
Do you have a reproduction? |
This is what we have in custom_lint.log: The request analysis.setContextRoots failed with the following error:
RequestErrorCode.PLUGIN_ERROR
ProcessException: No such file or directory
Command: flutter pub get
at:
#0 _ProcessImpl._start (dart:io-patch/process_patch.dart:402:33)
#1 Process.start (dart:io-patch/process_patch.dart:38:20)
#2 _runNonInteractiveProcess (dart:io-patch/process_patch.dart:579:18)
#3 Process.run (dart:io-patch/process_patch.dart:49:12)
#4 CustomLintWorkspace.runPubGet (package:custom_lint/src/workspace.dart:755:36)
#5 CustomLintWorkspace.resolvePluginHost (package:custom_lint/src/workspace.dart:748:11)
#6 SocketCustomLintServerToClientChannel._startProcess (package:custom_lint/src/v2/server_to_client_channel.dart:151:24)
#7 SocketCustomLintServerToClientChannel.init (package:custom_lint/src/v2/server_to_client_channel.dart:110:22)
#8 CustomLintServer._maybeSpawnCustomLintPlugin (package:custom_lint/src/v2/custom_lint_analyzer_plugin.dart:394:25)
<asynchronous suspension>
#9 CustomLintServer._handleAnalysisSetContextRoots.<anonymous closure> (package:custom_lint/src/v2/custom_lint_analyzer_plugin.dart:341:9)
<asynchronous suspension>
#10 PendingOperation.run (package:custom_lint/src/async_operation.dart:22:14)
<asynchronous suspension>
#11 CustomLintServer._handleRequest (package:custom_lint/src/v2/custom_lint_analyzer_plugin.dart:173:22)
<asynchronous suspension> |
dart pub deps | grep custom_lint
|
@rrousselGit it almost seems like it is running old code. Platform.resolvedExecutable should be an absolute path according to dart docs. Is there potentially some kind of caching happening of an old package version with the analyzer plugin? |
I don't see any reason why old code would be executed. |
Same issue.
Finally I created a symlink in
|
Please use the following versions to resolve the issue. analyzer: ^6.11.0 |
I am confused. It seems for some people it works at certain setups and for some doesn't. I am currently running: In the linting package: analyzer: ^6.6.0
analyzer_plugin: ^0.11.0
custom_lint_builder: ^0.6.8 In the project where I use it: custom_lint: ^0.6.8 Works in VSCode, but does not work in Android studio. Same symptoms. IDE does not show it, but if I run |
I found the issue is caused by not updating custom_lint version on Workaround until new version is published is updating your pubspec.yaml and pubspeck.lock in pubspec.yaml name: custom_lint_analyzer_plugin_loader
description: This pubspec determines the version of the analyzer plugin to load.
version: 0.7.0
publish_to: none
environment:
sdk: ">=3.0.0 <4.0.0"
dependencies:
custom_lint: 0.7.2 pubspeck.lock
|
Looks like my versioning broke and no-longer bumps the tool folder. I'll investigate, but in the meantime I'll just release a new version by hand |
Should be good now |
Describe the bug
When importing a
- custom_lint
in the analysis_options.yaml file, IntelliJ doesn't show any INFO, WARNING or ERROR message fromcustom_lint
inDart Analysis
tab nor in the file, in which the issue occurs.After running
dart run custom_lint
it shows the ERROR in the terminal, but it's really hard to spot an issue during development.!The same project is being opened in Visual Studio Code and it shows the ERROR in the file. !
flutter: 3.27.2
dart: 3.6.1
custom_lint: ^0.7.1
analyzer: ^7.1.0
analyzer_plugin: ^0.12.0
custom_lint_builder: ^0.7.1
To Reproduce
Open a Flutter project in IntelliJ and check if any
custom_lint
s are detected.Expected behavior
custom_lint
s are shown in the IntelliJDart Analysis
tab and in the file, in which the issue occurs.@rrousselGit @Rexios80 @matthiasn
The text was updated successfully, but these errors were encountered: