Super-linter: Dart support

Created on 18 Jun 2020  Â·  10Comments  Â·  Source: github/super-linter

Dart support would be useful.

The official (and only I believe) linter is https://github.com/dart-lang/linter
Rules: https://dart-lang.github.io/linter/lints/

enhancement

All 10 comments

Hi @cvega are you working on this? If so, I'm on the Dart team, and I'm happy to help with any questions you might have.

Hello @shyndman & @mit-mit

I appreciate the suggestion and the offer to provide feedback. I have the basis for adding dart or more specifically dartanalyzer to super-linter. The only big concern I had was the size of the SDK in relation to the container (not a huge deal, but less is more). I was wondering if you could provide any feedback on the dart binary? Ideally I'd like to move the dart binary and dartanalyzer into /usr/bin and call it day but I'm not certain that would suffice. I'm in the process of testing that as time permits, but if you have the details I'm all ears. I will also tag you both in the PR which I plan on getting out later this evening. Thanks in advance.

@devoncarew WDYT about embedding just a few binaries from the SDK; is that likely to cause issues longer-term? And if we go that route, would we rather rely on the files we need for dart analyze?

Hi @cvega - exciting to get dart support here! Some thoughts:

  • for longevity of the integration, I think we should prefer using dart analyze to lint rather than dartanalyzer. dart analyze has some (important) bug fixes that dartanalyzer likely won't ever get, and in the medium term we'll remove dartanalyzer completely (in preference to dart analyze)
  • I'd be a little leery of just grabbing a few binaries from the SDK - I'm not sure how well that would work, and it seems likely to break as we evolve the SDK. I'd be a lot less concerned about removing files from the sdk - that seems a lot less fragile. Deleting files like bin/model/lexeme/model.tflite, bin/snapshots/dart2js.dart.snapshot, ... will cut the size of the sdk in half.

@mit-mit @devoncarew

This is very helpful.

  • I like longevity too. Done.
  • I've discussed sizing of the SDK. Not a huge deal. For whats it worth, It seems to work fine with just the binary (very limited testing) but I rather not copy pieces of the SDK or give Dart users/developers a subpar experience because something they expect is missing. I am grabbing the entire SDK. For the time being, I'll add the entire package and we can trim it down once I produce the PR.

Again, thank you both for your feedback. Much appreciated.

Testing this just now, I get this anomaly:

Screen Shot 2020-07-21 at 16 20 28

@artob Thanks for the report. I'll take a look at this and get back to you shortly.

@cvega With 3.4.0, Dart analysis now runs, kudos for that. At the moment, though, it's not very usable without setting DISABLE_ERRORS: true, given that --fatal-infos turns pedantic nitpicks--copious, voluminous amounts of pedantic nitpicks--into workflow failures. That could hopefully be addressed in the Super Linter.

@devoncarew The larger practical hurdle in actually using this in Dart projects are the uri_does_not_exist errors (error • Target of URI doesn't exist: 'package:...') for any and all package imports. (That's been a common problem for Dart analysis outside of the Super Linter as well.) Would you perchance have any pointers on how to fix that? (Examples of the errors)

@cvega would you be willing to open a new issue(s) to track this new work instead of of continuing to discuss in a closed issue for the original feature delivery?

@cvega would you be willing to open a new issue(s) to track this new work instead of of continuing to discuss in a closed issue for the original feature delivery?

I've gone ahead and created https://github.com/github/super-linter/issues/507 for my follow-up concerns.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DawidJanczak picture DawidJanczak  Â·  5Comments

zkoppert picture zkoppert  Â·  3Comments

MuhaddiMu picture MuhaddiMu  Â·  3Comments

IlanCosman picture IlanCosman  Â·  4Comments

thehesiod picture thehesiod  Â·  4Comments