You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use something like pedantic in your flutter/dart project you can receive linter warnings and errors to help improve productivity.
I think it is possible to hide linter warnings from generated files, but I think it would be better for the generator to ignore them itself. I know built value already does this.
Built value currently adds this line to the bottom of the generator
@VictorUvarov: Hey, thanks for reporting this issue! I was seeing the linter hints coming from built_value, though until you added this issue I never realized why they were there. I agree that it will be very useful to add those hints.
I see things on two levels:
It is very likely that built_union's code generator can be improved a bit to emit better code, and this will eliminate some of the linter warnings.
Some linter warnings can not be fixed at the code generation phase. One example is unused_element (as you pointed out). This happens because during generation time we have no way to know which code parts will be used.
The way I see it, the general plan of action should be to first attempt to fix anything that can be fixed in section (1), and only the rest of the linter warnings should be solved using a linter ignore hint (2).
I am super busy for the following next weeks, I was wondering if you would like to take a stab at solving some of the lints you mentioned? I know it might be a lot to ask, so please don't feel obliged to take on this task.
If you are interested, please make sure to check the short hacking-guide.
First of all great package!
If you use something like pedantic in your flutter/dart project you can receive linter warnings and errors to help improve productivity.
unnecessary_const
This can be...
changed to this...
unused_element
If i don't use a serializer i get this warning for my HomeViewState union
unnecessary_new
which comes from the serializer
The text was updated successfully, but these errors were encountered: