-
Notifications
You must be signed in to change notification settings - Fork 109
Lint Check for Raw Directives #930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
!$acc
or!$omp
in./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-iR
flag.
! 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
!$acc
or!$omp
directivesEnforce 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
!$acc
or!$omp
directivesparallel_macros.fpp
andsyscheck.fpp