pub-dev
pub-dev copied to clipboard
Support different line lengths
It would be nice if you could support different line lengths, e.g. -l 120 parameter to pana. While 80 is a recommended dartfmt default, some projects don't want to use that and instead opt for a different number.
Currently, it's reported as a "Health suggestion" on the package analysis tab:
Health suggestions
Format path/to/file.dart.
Run dartfmt to format path/to/file.dart.
I don't think it's a project health issue as long as the whole project is consistent with the formatting, albeit with a different line length than the default 80. While I understand these suggestions have no negative impact on the score I'd still prefer them not to show up on the page at all.
Is there something that can be done about it? Maybe some simple configuration file or a config in the pub.dev admin section?
I don't think we can or should do anything in the short term. But this is solid input for the debate about what lints we should use to score packages.
I don't think we can or should do anything in the short term. But this is solid input for the debate about what lints we should use to score packages.
I think this is not something hard to complete, the simplest way is just ignore length check, I think it should be done as soon as possible. As for rule of score, I agree with it as long term topic. As I know source code of flutter not follow 80 characters per line. And allow for different length will provide great develop experience and code readability.
Allow us to have some max-lines attribute in the pubspec.yaml... fetch that on your score calculator.