dart-pad icon indicating copy to clipboard operation
dart-pad copied to clipboard

Allow lints to be customized

Open johnpryan opened this issue 3 years ago • 2 comments

Certain lints like prefer_const_constructors might not be desirable for codelabs aimed at beginners. See this discussion for more context.

It would be great if authors could include an analysis_options.yaml file in their Gist or workshop, rather than using // ignore_for_file: syntax.

johnpryan avatar Feb 01 '22 17:02 johnpryan

Given that customised lints would require stopping and re-starting the analysis server, this change would balloon the required number of servers by the number of seconds the restart takes (we usually serve most requests in under a second).

I suspect this will fall into the DartPad isn't an IDE bucket.

domesticmouse avatar Feb 01 '22 21:02 domesticmouse

I was thinking about this and another solution for some of the issues would be to allow for pad creators to somehow specify and hide a header to the file(s). For workshops this could be applied to all steps. This way they could optionally ignore specific rules or all lint rules.

parlough avatar Feb 27 '22 17:02 parlough