-
Notifications
You must be signed in to change notification settings - Fork 377
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
Linter for drift #3281
base: develop
Are you sure you want to change the base?
Linter for drift #3281
Conversation
tests: add tests
See how I setup the tests. Lmk if you have a better way of setting them up. Also, Some of the async code is copied from the dart sdk, I don't know how this affects licensing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments on the test infrastructure
Right now warnings in manager generation are not reported in the resolver, so the linter can't use them The warning I'm focusing on are duplicate reverse names e.g. class User extends Table {
late final group = integer().references(Group, #id)
late final supergroup = integer().references(Group, #id)
}
class Group extends Table {
// `userRefs` has 2 relations!!!
} How would I go about this? |
I add a warning level to |
Ideally, these warnings should be discovered in the analysis step instead of during code generation. I know that some of them are easier to report during codegen, is it a lot of work to port them over to something that could run in |
Yeah, could you please do that? |
@simolus3 Any update on this. |
In FileAnalyzer I don't have access to the base element to report the error |
Ping |
Dunno what happened to the old PR. I think the VScode Github Plugin must've closed it. Anyway, here's it as a new PR
createReturning
with ignore mode