We at Codee have been working on something we’re excited to share: the Codee Formatter for Fortran, now live and completely free to use!
It has been a collaborative effort with the community from the start, and this launch wouldn’t have been possible without feedback, ideas, and testing from many of you here. Thank you for your participation!
With the Codee Formatter, you can easily clean up your code to keep it consistent, improving readability and speeding up code reviews:
As mentioned in the blog post, feel free to also check out our Codee Analyzer, which allows you to dive into static code analysis to further improve your code.
The feedback and acceptance of suggestions from Codee during the development of their formatter was great! I will probably start using it as my default formatter now
I like an option to make all the elements of a character array the same length most of the time, which I do not think any of the formatters do, as in changing
text=[character(len=80) :: &
'and a one and a',&
'two ',&
'and a three!'])
into
text=[character(len=80) :: &
'and a one and a ',&
'two ',&
'and a three '])
I not aware of any formatter being able to do that.
Right now, we’re working on alignment features that could make your example look like:
text=[character(len=80) :: &
'and a one and a', &
'two ', &
'and a three!'])
Would that cover your needs, or do you require the inclusion of spaces inside the character array? Doing so would change the actual meaning of the code, which is beyond the typical scope of a formatter. Let us know what would work best for you!
That would work as well, and would work for user-defined types where the string length is significant. Adding the spaces would not change the meaning of standard strings however. I prefer aligning :: in declarations as well, but not always when there are long outliers that cause an excessive amount of white space (where I have
never consciously defined “excessive”) so it will be interesting to follow what features you come up with.
Adding the spaces would not change the meaning of standard strings however.
Sorry about the confusion! I didn’t realize that len=80 would have that effect here.
That would work as well
Great! We will also keep the :: alignment idea in mind; several users have asked for it, so it would be a great addition.
so it will be interesting to follow what features you come up with.
We’ll be sure to keep this community and our other channels updated with any Codee news
We usually make public announcements every three months, but push minor releases once or twice a month, so that Codee is constantly getting new features. For the latest updates, we always have the changelog available on our website.