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

Named constants should be declared and set in the same line #292

Open
Beliavsky opened this issue Jan 14, 2025 · 1 comment
Open

Named constants should be declared and set in the same line #292

Beliavsky opened this issue Jan 14, 2025 · 1 comment
Labels
rule A new rule for the linter

Comments

@Beliavsky
Copy link

Fortitude could warn when a named constant in declared in one line and set in another, as is done for i below.

implicit none
integer :: i
parameter (i = 1) ! named constant set on different line than its declaration -- warn about this
integer, parameter :: j = 1 ! preferable
print*,i,j
end
@ZedThree ZedThree added the rule A new rule for the linter label Jan 15, 2025
@ZedThree
Copy link
Member

More generically, warn about variable modifications (allocatable, dimension) set on separate lines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule A new rule for the linter
Projects
None yet
Development

No branches or pull requests

2 participants