Flang-Tidy Cleaning/Correcting Fortran Code In "Sort Of Opinionated Fashion"
- Reference: 0001567348
- News link: https://www.phoronix.com/news/Flang-Tidy
- Source link:
A request for comments was issued last week around Flang-Tidy that is being developed out of Bavaria for improving Fortran code as a framework of checks that apply to many existing Fortran codebases. The developers hope Flang-Tidy will be eventually accepted into upstream LLVM for helping to bolster its Fortran language support for scientific computing.
Flang-Tidy is self described as:
"Just like clang-tidy, the checks that we implement in flang-tidy go beyond regular compiler warnings, in that they flag formally correct code in a sort of opinionated fashion. Right now, flang-tidy implements over 20 checks, dealing with various aspects of Fortran programming, such as flagging of deprecated constructs, consistency checks of declarations, and hardening for C/Fortran interoperability.
Currently, flang-tidy is developed in-tree and we are very interested in upstreaming this effort so that others can also easily use flang-tidy on their codebases and in the hope of attracting more experts to contribute checks for all the various Fortran gotchas that we frequently run into."
There is [1]this LLVM pull request with the initial Flang-Tidy code.
Fortran developers wanting to learn more about the proposed Flang-Tidy can do so via [2]this RFC thread via LLVM Discourse.
[1] https://github.com/llvm/llvm-project/pull/143883
[2] https://discourse.llvm.org/t/rfc-flang-flang-tidy-a-new-tool-for-fortran-static-analysis/87579
phoronix