Closed dickermoshe closed 1 month ago
It is expected because lints are only used in dev.
I'm not necessarily against changing it.
Thanks @rrousselGit
I'm not very familiar with this codebase.
Where would the code which insects the pubspec.yaml
file be?
It should be within packages/custom_lint
. You can search for Pubspec.parse
.
We're using https://pub.dev/packages/pubspec_parse for decoding pubspecs, so that should be easy to find and change
You've made this way too easy. Thanks
btw, this package is blowing my mind. Takes like 15 lines of code to write linters. You're the greatest!
This TODO makes it sound like you really DON"T want regular dependencies...
Does this jog your memory for any reason why it would break something?
It doesn't break anything. It was just done on purpose because the approach of splitting a package into a "dependencies" + "dev_dependency" (so making a drift_lint
) can save some bandwidth for users who do not use lints.
Describe the bug Only lint packages installed as a
dev_dependencies
have their linters ranTo Reproduce
riverpod_lint
independencies
. Not indev_dependencies
Expected behavior Lints run on all
dependencies
Over in drift land we want to use this package to create an awesome linters. We already have tons of packages, and while melos does make it easier (thanks guys), we are trying to keep it down. We rather put he linter in our
drift_dev
package rather than make an entire newdrift_lint
package.Our code generator package,
drift_dev
is usually installed as adev_dependencies
, however in rare instances there is some code which some users could find useful and they install it in regulardependencies
.However, much to our dismay, it seems that custom_lint only looks or linters in
dev_dependencies
.PS: If we add
drift_dev
todependencies
ANDdev_dependencies
, we can importdrift_dev
code into the main project and the linter does work. However we don't want our users to be seeing this nasty thing: