dart_custom_lint
dart_custom_lint copied to clipboard
[Documentation] Failed to start plugin error when "custom_lint.dart" file doesn't exist
Error is received in the pubspec.yaml file (of the application depending on a custom lint) when setting up first lint:
Failed to start plugin dart(custom_lint_plugin_error)
Steps to Reproduce:
- Create a new dart package, e.g.
dart create my_lints
. - Create a custom lint and place it in
bin/my_lints.dart
(where file name = anything besides 'custom_lint.dart') - Create a test dart application
my_example_app
and depend oncustom_lint
andmy_lints
- "Failed to start plugin" error appears in
my_example_app
pubspec.yaml file
I'm not sure if the invertase team is at the documentation stage of this project yet, but for what its worth I found the setup and development extremely intuitive (especially with the walkthrough video), besides the lack of documentation / emphasis on this one requirement. Since the error received is also so vague, it took a bit of time for me to track down the root cause of the problem. A simple note in the readme may go a long way to help other early-adopters of this package.
Thanks you all for a great package!
Hello!
I'm not exactly sure. What do you find vague here? The documentation tells you to create a file named custom_lint.dart
yet you purposefully used a different name.
The error also tells you that the file bin/custom_lint.dart
is missing (which it is since you used a different name).
So far all of that is expected.
What else would you like to see? :)
Of course, in hindsight it seems like an obvious oversight - I'm not disagreeing with you there ;)
AFAIK its not common for dart tools to require an exact file name in order for functionality to work, especially a required file name thats [some_dependency].dart... I think the inability to customize a filename (which dart create
generates as my_dart_app.dart
) is an easy thing to overlook.
A more descriptive error than "Failed to start plugin" would be helpful I think (have the message point the user to the log file, ask to check the filename/spelling/etc - whatever you think makes sense) or if not possible for whatever reason, simply more strongly emphasizing this point in the readme would probably help at least somewhat with learning pains.
Closing in favour of https://github.com/invertase/dart_custom_lint/issues/2