-
Notifications
You must be signed in to change notification settings - Fork 76
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
white spaces before comments, how to configure #12
Comments
Dear Stefano Unindented comments are not moved intentionally. This feature exists because especially for larger comments or comment boxes it is useful to have comments spanning the whole page. I understand that for proper alignment of documentation, whitespaces between line and comment should not be removed. This is easy to implement, and I'll make this an option. Feel free to report any features you'd like to have. In the future, I'd like to make fprettify as configurable for the user as possible, allowing for different coding conventions. |
Yes, I agree. I guessed it, but I prefer to ask you.
Indeed, I have tons of coding conventions, see this and this other, I am not sure you will be happy to be stalked by me 😄 Cheers |
@szaghi Are there other cases where you would like that fprettify does not override manual alignment? I think it is better if I implement a general solution than a solution that works just for comments. As you noticed, fprettify always removes space characters and thus overrides manual alignment (except for spaces around As a general solution, I'd propose this feature: |
@pseewald Great! Thank you very much for your work!
All sound very very good. Soon I'll try again your linter with my codes, but this day and the next are very busy. Cheers |
@pseewald integer, parameter :: b_halo = 7
integer, parameter :: laser = 8
integer, parameter :: egy = 9 which I think profit from the extra readability (Unless I missed an easier or already available method of not changing those). |
Yes in the current implementation, whitespace is always overridden by the rules. But I'm planning to change that such that n consecutive spaces are always respected. |
blanks are preserved. Can be configured by --keepblank option. Fixes #12.
@dbroemmel and @szaghi I now committed a simpler fix:
|
Dear @pseewald
sorry for the stalking...
I found that the handling spaces before comments is somehow obscure for me, e.g. applying fprettify on a FLAP files I obtain
baseline code
pretty-formatted code
Comparing the two versions the comments have not been touched, but this is not true for procedures contained into the module, e.g.
baseline code
pretty-formatted code
All the comments have been moved.
To me, it seems that only the comments starting at the very first character remain untouched, while the others are moved. This can be fine, but I would like to configure this behavior. In particular, I like that the inline comments after variables remain at the same relative distance they have, thus if you move variables the comment moves accordingly.
Cheers
The text was updated successfully, but these errors were encountered: