Skip to content
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

Allow certain rules to be deactivated #19

Open
cphyc opened this issue Nov 5, 2021 · 1 comment
Open

Allow certain rules to be deactivated #19

cphyc opened this issue Nov 5, 2021 · 1 comment

Comments

@cphyc
Copy link
Owner

cphyc commented Nov 5, 2021

It would be great to be able to deactivate certain rules (similarly to how flake8 rules can be deactivated).

@LecrisUT
Copy link

+1 to this. The usual method is to have a .fortran-format.yaml where you read the rules you want to add/remove. Maybe check cmake-format for some tips.

Some implementation notes:

  • Split the fortran-format from fortran-lint. E.g. comment formatting would be in fortran-format not in the latter
  • Read a .fortran-format.yaml (or json, or etc.) for the default format/lint rules of the project
  • For fortran-format:
    • Add regex syntax to ignore a comment block. (cmake-format reference
    • Toggle off parsing for first comment block. This is usually a copyright header.
  • For fortran-lint:
    • Maybe coordinate with flint to codify the naming
    • Disable linting if a fortran-lint on/off block is defined (like clang-format) or if a specific lint command is specified (like clang-tidy)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants