File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,21 +41,15 @@ jobs:
4141 - name : Lint Toolchain
4242 run : ./mfc.sh lint
4343
44- - name : Lint Source - No Raw Directives
45- run : |
46- ! grep -iR '!\$acc\|!\$omp' --exclude="parallel_macros.fpp" --exclude="acc_macros.fpp" --exclude="omp_macros.fpp" --exclude="shared_parallel_macros.fpp" --exclude="syscheck.fpp" ./src/*
47-
48- - name : Lint Source - No Double Precision Intrinsics
49- run : |
50- ! grep -iR 'double_precision\|dsqrt\|dexp\|dlog\|dble\|dabs\|double\ precision\|real(8)\|real(4)\|dprod\|dmin\|dmax\|dfloat\|dreal\|dcos\|dsin\|dtan\|dsign\|dtanh\|dsinh\|dcosh\|d0' --exclude-dir=syscheck --exclude="*nvtx*" --exclude="*precision_select*" ./src/*
51-
52- - name : Lint Source - No Junk Code
53- run : |
54- ! grep -iR -e '\.\.\.' -e '\-\-\-' -e '===' ./src/*
44+ - name : Lint Source
45+ run : python3 toolchain/mfc/lint_source.py
5546
5647 - name : Lint Docs
5748 run : python3 toolchain/mfc/lint_docs.py
5849
50+ - name : Lint Parameter Docs
51+ run : python3 toolchain/mfc/lint_param_docs.py
52+
5953 file-changes :
6054 name : Detect File Changes
6155 runs-on : ' ubuntu-latest'
Original file line number Diff line number Diff line change 11"""Check parameter documentation completeness.
22
33Tier 1 (blocking): Parameters with DESCRIPTIONS entries must appear in case.md.
4- Tier 2 (warnings): Fortran namelist / REGISTRY sync checks.
4+ Tier 2 (blocking): Fortran namelist params must be in REGISTRY.
5+ Tier 3 (blocking): Scalar REGISTRY params must have descriptions.
56"""
67
78from __future__ import annotations
@@ -90,9 +91,11 @@ def _parse_namelist_params(fpp_path: Path) -> set[str]:
9091 stripped = line .strip ()
9192 if stripped .startswith ("!" ) or stripped .startswith ("#:" ) or stripped .startswith ("#" ):
9293 continue
93- if "namelist /user_inputs/" in stripped .lower ():
94- in_namelist = True
95- accum = stripped .split ("/user_inputs/" , 1 )[1 ] if "/user_inputs/" in stripped else ""
94+ lower = stripped .lower ()
95+ if "namelist /user_inputs/" in lower :
96+ idx = lower .index ("/user_inputs/" ) + len ("/user_inputs/" )
97+ accum += " " + stripped [idx :]
98+ in_namelist = accum .rstrip ().endswith ("&" )
9699 continue
97100 if in_namelist :
98101 if stripped .startswith ("&" ):
You can’t perform that action at this time.
0 commit comments