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

Avoid multiple statements on the same line #64

Open
ZedThree opened this issue Oct 4, 2024 · 2 comments · May be fixed by #246
Open

Avoid multiple statements on the same line #64

ZedThree opened this issue Oct 4, 2024 · 2 comments · May be fixed by #246
Assignees
Labels
good first issue Good for newcomers rule A new rule for the linter

Comments

@ZedThree
Copy link
Member

ZedThree commented Oct 4, 2024

This hurts readability. Might be easiest with a text rule, just find ';'

@ZedThree ZedThree added good first issue Good for newcomers rule A new rule for the linter labels Oct 4, 2024
@LiamPattinson
Copy link
Collaborator

Do you think it would be worth also catching multiple variable declarations on the same line? There are times when I think it doesn't hurt readability:

integer :: i, j, k

And others where it's just confusing:

real :: pi, some_array(:, :) time

@ZedThree
Copy link
Member Author

ZedThree commented Oct 4, 2024

There's probably some useful variations like that that could be done as separate rules:

  • Avoid mixing array and scalar variable declarations on the same line
  • Avoid declaring multiple dummy arguments on the same line (maybe)

Potentially also "avoid declaring dummy arguments and local variables on the same line", but that would/should actually be fixed by "missing intent"

@LiamPattinson LiamPattinson self-assigned this Dec 12, 2024
@LiamPattinson LiamPattinson linked a pull request Dec 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers rule A new rule for the linter
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants