-
Notifications
You must be signed in to change notification settings - Fork 3
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
rearrangment/reformat of the source code #5
Conversation
To ease a consistent representation of the code, a style sheet for fprettify was added. Signed-off-by: Norwid Behrnd <[email protected]>
Signed-off-by: Norwid Behrnd <[email protected]>
Signed-off-by: Norwid Behrnd <[email protected]>
Signed-off-by: Norwid Behrnd <[email protected]>
The implmentation of the style requires a couple of manual edits fprettify can not provide. This commit saves an intermediate. Signed-off-by: Norwid Behrnd <[email protected]>
Signed-off-by: Norwid Behrnd <[email protected]>
By application of the fprettify style, fences of procedures now are dedented. Simultaneously, they stay within the 80 character/line limit. Signed-off-by: Norwid Behrnd <[email protected]>
Manually, lines the fprettify style considered overly long are split with `&`. Eventually, all suggestions are considered, and `fpm build` still successfully works without report of an error. Signed-off-by: Norwid Behrnd <[email protected]>
The type definition now lists the procedures in an alphabetic sort. If ford's documentation is not accessed, then this place is the users' entry to get familiar with the procedures provided. Signed-off-by: Norwid Behrnd <[email protected]>
To match the listing in the type block, the procedures equally are sort alphabetically. This work has started, still is incomplete. Signed-off-by: Norwid Behrnd <[email protected]>
The alphabetic sort of the procedures is complete. Their sequence matches the listing in the type block. Signed-off-by: Norwid Behrnd <[email protected]>
Correction of a minor typo, passing again fprettify checker. Signed-off-by: Norwid Behrnd <[email protected]>
A brief note to use snake_case and the fprettify style for a consistent code format was added. Signed-off-by: Norwid Behrnd <[email protected]>
There are separate subroutines What do you think about this? |
Thanks @nbehrnd Personally, I use VSCode as my code editor with the Modern Fortran Extension. Modern Fortran, by default, uses Sorting all procedures alphabetically can be a bit difficult in the future. If the name of a subroutine changes, then the position of the subroutine will also change. Regarding the elemental pure subroutine set_dimension(this, height, width)
class(format_pnm), intent(inout) :: this
integer, intent(in), optional :: height
integer, intent(in), optional :: width
if (present(height)) this%height = height
if (present(width)) this%width = width
end subroutine set_dimension To discuss all topics separately, please open an issue for each topic. This way, we can discuss each topic individually before sending a PR and merging it into the main branch. |
@gha3mi My suggestion of The alphabetic sort of the procedures was a brief I now understand the separate management of |
To ease contributions to the project, a style which can be checked by fprettify
(see equally style file
fprettify.rc
) is proposed.