Skip to content

Commit 06ec049

Browse files
authored
Merge branch 'master' into MovingBubblesFresh-clean
2 parents 394e7c3 + febffab commit 06ec049

2 files changed

Lines changed: 12 additions & 15 deletions

File tree

.github/workflows/test.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff 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'

toolchain/mfc/lint_param_docs.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
"""Check parameter documentation completeness.
22
33
Tier 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

78
from __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("&"):

0 commit comments

Comments
 (0)