-
Notifications
You must be signed in to change notification settings - Fork 145
57 lines (45 loc) · 1.63 KB
/
lint-source.yml
File metadata and controls
57 lines (45 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Lint Source
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
jobs:
file-changes:
name: Detect File Changes
runs-on: 'ubuntu-latest'
outputs:
checkall: ${{ steps.changes.outputs.checkall }}
steps:
- name: Clone
uses: actions/checkout@v4
- name: Detect Changes
uses: dorny/paths-filter@v3
id: changes
with:
filters: ".github/file-filter.yml"
lint-source:
name: Lint Source
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
- name: Initialize MFC
run: ./mfc.sh init
- name: Looking for raw directives
run: |
! 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/*
- name: No double precision intrinsics
run: |
! 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/*
- name: Looking for junk code
run: |
! grep -iR -e '\.\.\.' -e '\-\-\-' -e '===' ./src/*
- name: Looking for false integers
run: |
! grep -onRP '(?<![0-9.eE\-])\b[0-9]*_wp\b' src/
- name: Looking for junk comments in examples
run: |
! grep -R '# ===' ./benchmarks **/*.py
! grep -R '# ===' ./examples/**/*.py
! grep -R '===' ./benchmarks/**/*.py
! grep -R '===' ./examples/**/*.py