Feature Request
Add a Python-based static analysis linter for Fortran/Fypp source code that catches patterns known to cause silent bugs. Integrate it into the pre-commit hook (`./mfc.sh precheck`) and CI (`lint-source.yml`).
Proposed Checks
| Check |
What it catches |
| Fypp list duplicates |
Duplicate entries in `#:for VAR in [...]` broadcast/loop lists |
| Duplicate consecutive lines |
Identical adjacent non-trivial lines (copy-paste errors) |
| Hardcoded byte size |
`int(8._wp, ...)` patterns that assume 8-byte reals |
These checks are motivated by real bugs found in the codebase. The linter would prevent regressions after the bugs are fixed.