Closed synw closed 4 years ago
@synw https://github.com/centrifugal/centrifuge-dart/tree/master/lib/src/proto folder contains autogenerated code, we can't just fix linting in it as it will be removed on next generate. It must be fixed in Dart Protobuf generator.
I see. Then it maybe would be a good idea to remove the offending lints from analysis_options.yaml
: annotate_overrides
and avoid_as
to get clean analysis results
About static analysis I recommend using strong mode's implicit-casts: false
in addition to the existing implicit-dynamic: false
if possible. Also using a standard settings base can be good: pedantic is a broadly used standard now (the pub.dev 's pana analysis uses it now). In addition I couldn't recommend enough extra_pedantic for stronger rules
Yep, feel free to change this and send pr - I think this all makes sense if adopted by Dart community.
Ok I'll check it out with pedantic enabled and maybe with implicit-casts: false
to see what it does (this one is really bothering sometimes but it's my best friend vs runtime errors...)
Running the static analysis throws warnings and lints. I fixed some of them here:
There is also a deprecation warning to fix. And the question of the
avoid_as
setting: there are a lot of those to fix in the code. I suggest to remove this rule in static analysis: it is quite convoluted to fix and theas
keyword is handy (I do not use this rule myself).