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

New option --reset-indent to reset indentation to 0 at the begining o… #53

Merged
merged 3 commits into from
Nov 9, 2020

Conversation

meteokid
Copy link
Contributor

New option --reset-indent to reset indentation to 0 at the beginning of a file if it matches program/module/sub/func

$ cat test.F90
     subroutine a()
     do i=1,4
     print *,i
     enddo
     end subroutine

$ fprettify.py -s --strict-indent -- test.F90
     subroutine a()
        do i = 1, 4
           print *, i
        enddo
     end subroutine

$ fprettify.py -s --strict-indent --reset-indent -- test.F90
subroutine a()
   do i = 1, 4
      print *, i
   enddo
end subroutine

@pseewald
Copy link
Collaborator

Do you think there is a use case for matching subroutine and function? If we can remove these, the behaviour for module and program can be made default and we don't even need the --strict-indent option.

…f a file if it matches program/module/sub/func
reset indentation to 0 at the begining of a file if it matches program/module
but not subroutine or function
@pseewald pseewald merged commit 4506aa8 into fortran-lang:master Nov 9, 2020
@pseewald pseewald mentioned this pull request Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants