Closed getBoolean closed 5 months ago
Sure, we can take a look. Do you have any example or code available? Curious to know your real-world use case as well.
I've currently got it implemented in boolean_lints. I had to custom roll the configuration options when I started on it, which I plan to refactor.
For example, you can "deprecate" external code when you have a better option available:
banned_code:
# Default severity
severity: info
entries:
- class_name: Future
id: wait
source: dart:async
reason: "Future.wait should be avoided because it loses type safety for the results. Use a Record's `wait` method instead."
# Override severity for this entry
severity: warning
Result:
void main() async {
await Future.wait([...]); // LINT
await (...,).wait; // OK
}
Wow - looks really nice! If you are up for a contribution - I think we would definitely be happy having it!
Awesome, I'll start working on it and open a pull request when its ready
After much hard work and some additional improvements to the lint, I have created PR #89
I've been working on a custom lint rule for banning external code by the identifier. Is this something you would want PR'd to this project?
I started working on it before custom_lint exposed the lint options, so I have some refactoring to do. I would rather add contribute it here since it is already setup for it.