Skip to content

Commit

Permalink
accommodate preprocessor directives
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Feb 27, 2024
1 parent 634605f commit 963f040
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/common/update_fortran_style.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ def cleanup_comments(path, check, diff):
nspaces = len(lines[0]) - len(lines[0].lstrip())
indent = "".join(repeat(" ", nspaces))

if not any(line):
if comment.startswith("#"):
# preprocessor directives
flines.extend(lines)
elif not any(line):
if any(pattern in comment for pattern in ["!!", "!<", "!>"]):
flines.extend(lines)
elif "SPECIFICATIONS" in comment:
Expand Down

0 comments on commit 963f040

Please sign in to comment.