dart-lang / web

Lightweight browser API bindings built around JS static interop.
https://pub.dev/packages/web
BSD 3-Clause "New" or "Revised" License
135 stars 24 forks source link

Ignore unintended_html_in_doc_comment #278

Closed srujzs closed 3 months ago

srujzs commented 3 months ago

MDN docs includes some variants of html tags that this rule disallows, like <table class="properties">, <th scope="row">, and <br />. In order to make the CI pass, this is ignored for now. Fixes cases unrelated to the MDN docs.

cc @kallentu for some fun edge cases from the MDN.

kevmoo commented 3 months ago

Re the failure: we shouldn't run analyzer tests against 3.4 - just dev

kevmoo commented 3 months ago

nit: also: could we just add this ignore at the top of all generated files?

srujzs commented 3 months ago

Re the failure: we shouldn't run analyzer tests against 3.4 - just dev

We should still make sure analysis passes with 3.4 so we don't release a package that breaks against an older Dart SDK version. We might need to ignore unrecognized_error_code to make this work however.

nit: also: could we just add this ignore at the top of all generated files?

Yeah, since it looks like we can't exclude files from a lint, I could try that.

srujzs commented 3 months ago

Generated in the files themselves instead, which has the nice side-effect of it not affecting the 3.4 analysis.

devoncarew commented 3 months ago

I'm trying to validate @kallentu's fix for this, but am having trouble getting the false positives from unintended_html_in_doc_comment to fire here (using an sdk before the fix). I'm assuming I have a local config issue but mentioning here as I don't see the false positives.

devoncarew commented 3 months ago

Nevermind - I had to check out an older commit to get this to trigger; I do see these as fixed in head.

srujzs commented 3 months ago

Cool, thanks Kallen! We'll still need the ignores for a little while until we move to a minimum SDK version that contains the fix.