Lint Check for Raw Directives#930
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new CI lint step to catch any raw OpenACC/OpenMP directives left in the source tree.
- Introduce a GitHub Actions step named “Looking for raw directives” that greps for
!$accor!$ompin./src - Exclude known macro files (
parallel_macros.fpp,syscheck.fpp)
Comments suppressed due to low confidence (2)
.github/workflows/lint-source.yml:39
- [nitpick] Limit the scan to Fortran source extensions to avoid false positives in non-code files. For example, add
--include="*.f90" --include="*.fpp"after the-iRflag.
! grep -iR '!\$acc\|!\$omp' --exclude="parallel_macros.fpp" --exclude="syscheck.fpp" ./src/*
.github/workflows/lint-source.yml:39
- [nitpick] Exclude binary files to prevent grep errors on non-text files by adding
-I(ignore binary) to the command, e.g.,grep -iR -I.
! grep -iR '!\$acc\|!\$omp' --exclude="parallel_macros.fpp" --exclude="syscheck.fpp" ./src/*
PR Code Suggestions ✨No code suggestions found for the PR. |
User description
Description
Concerning(#928),
Quick check for old raw directives.
PR Type
Enhancement
Description
Add CI check for raw
!$accor!$ompdirectivesEnforce macro paradigm usage in source code
Exclude specific macro files from directive check
Changes diagram
Changes walkthrough 📝
lint-source.yml
Add raw directive detection to CI.github/workflows/lint-source.yml
!$accor!$ompdirectivesparallel_macros.fppandsyscheck.fpp