Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support different line lengths #3041

Open
vaind opened this issue Nov 18, 2019 · 3 comments
Open

Support different line lengths #3041

vaind opened this issue Nov 18, 2019 · 3 comments

Comments

@vaind
Copy link

vaind commented Nov 18, 2019

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?

@jonasfj
Copy link
Member

jonasfj commented Nov 18, 2019

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.

@techwn
Copy link

techwn commented Jan 7, 2024

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.

@alexmercerind
Copy link

Allow us to have some max-lines attribute in the pubspec.yaml... fetch that on your score calculator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants