@@ -23,13 +23,28 @@ Every Fortran module follows this pattern:
2323
2424## Forbidden Patterns
2525
26- Caught by ` ./mfc.sh precheck ` (source lint step 4/5):
26+ All checks below are enforced by ` python3 toolchain/mfc/lint_source.py `
27+ (runs via ` ./mfc.sh precheck ` and CI). See that file for the full list.
28+
29+ Fortran/Fypp source (` src/ ` ):
2730- ` dsqrt ` , ` dexp ` , ` dlog ` , ` dble ` , ` dabs ` , ` dcos ` , ` dsin ` , ` dtan ` , etc. → use generic intrinsics
2831- ` 1.0d0 ` , ` 2.5d-3 ` (Fortran ` d ` exponent literals) → use ` 1.0_wp ` , ` 2.5e-3_wp `
2932- ` double precision ` → use ` real(wp) ` or ` real(stp) `
3033- ` real(8) ` , ` real(4) ` → use ` wp ` or ` stp ` kind parameters
3134- Raw ` !$acc ` or ` !$omp ` directives → use Fypp GPU_ * macros from ` parallel_macros.fpp `
32- - Full list of forbidden patterns: ` toolchain/bootstrap/precheck.sh `
35+ - ` int(8._wp, ...) ` hardcoded byte size → use ` storage_size(0._stp)/8 `
36+ - Bare integer kind like ` 2_wp ` → use ` 2.0_wp `
37+ - Junk patterns (` ... ` , ` --- ` , ` === ` ) in code or comments (no separator comments)
38+ - Duplicate entries in Fypp ` #:for ... in [...] ` lists
39+ - Identical adjacent non-trivial lines (copy-paste bugs)
40+
41+ Python (` examples/ ` , ` benchmarks/ ` , ` toolchain/ ` ):
42+ - ` === ` separator comments → remove
43+ - ` ---- ` or longer separator comments → remove (3 dashes ` --- ` is allowed for markdown)
44+
45+ Shell (` .github/ ` , ` toolchain/ ` ):
46+ - ` === ` or ` ---- ` separator comments → remove
47+ - Echo separators longer than 20 characters → shorten
3348
3449Enforced by convention/code review (not automated):
3550- ` goto ` , ` COMMON ` blocks, global ` save ` variables
0 commit comments