fprettify icon indicating copy to clipboard operation
fprettify copied to clipboard

Option to remove trailing semicolons

Open tueda opened this issue 3 years ago • 1 comments

It would be nice if unnecessary semicolons at the ends of lines could be automatically removed. Example:

program test
    implicit none; 
    integer :: n; ! semicolon not mandatory
end program

This will help those who use languages that require semicolons (like C) and languages that do not (that is Fortran). As an example in formatters in other languages, Python's black does this job.

tueda avatar Dec 18 '21 14:12 tueda

Also, it would be better to break the inline statement which separates expressions using semicolon. For example,

from

if( 2> 1) then; a = a + 2; else; a = a + 1; endif

to

if( 2> 1) then
  a = a + 2
else
  a = a + 1
endif

vickysharma0812 avatar Dec 16 '22 16:12 vickysharma0812