Skip to content

Commit 97db159

Browse files
committed
toml and lint in CI
1 parent c87bbe9 commit 97db159

File tree

4 files changed

+18
-20
lines changed

4 files changed

+18
-20
lines changed

.fortitude.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[check]
2+
# Ignored Rules and justification:
3+
ignore = ["E001","S001","S101","M011","F001","S041","T001","S101","S102","T002","T011","T042","M001"]
4+
file-extensions = ["f90","fpp","fypp"]
5+
line-length = 5000

.github/workflows/lint-source.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,17 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@v4
2727

28-
- name: Install Fortitude
29-
run: pip install fortitude-lint ansi2txt
28+
- name: Initialize MFC
29+
run: ./mfc.sh init
3030

31-
- name: Lint the source code
32-
run: fortitude check --file-extensions=f90,fpp,fypp --ignore=E001,S001,S101,M011,F001,S041,T001,S101,S102,T002,T011 ./src/** || true
31+
# - name: Lint the source code
32+
# run: fortitude check --file-extensions=f90,fpp,fypp --ignore=E001,S001,S101,M011,F001,S041,T001,S101,S102,T002,T011 ./src/** || true
33+
34+
- name: Lint the full source
35+
run: |
36+
alias lintsource='find ./src -type f -not -name '*nvtx*' -exec command fortitude check {} \;' |
37+
lintsource |
38+
lintsource | wc -l | xargs -I{} sh -c '[ {} -gt 0 ] && exit 1 || exit 0'
3339
3440
- name: Ensure kind is specified
3541
run: fortitude check --file-extensions=f90,fpp,fypp --select=P001 ./src/**

src/post_process/m_data_output.fpp

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ module m_data_output
5050
real(wp), allocatable, dimension(:, :, :), public :: q_sf
5151
real(wp), allocatable, dimension(:, :, :) :: q_root_sf
5252
real(wp), allocatable, dimension(:, :, :) :: cyl_q_sf
53+
5354
! Single precision storage for flow variables
5455
real(sp), allocatable, dimension(:, :, :), public :: q_sf_s
5556
real(sp), allocatable, dimension(:, :, :) :: q_root_sf_s
@@ -219,10 +220,6 @@ contains
219220
220221
file_loc = trim(proc_rank_dir)//'/.'
221222
222-
!INQUIRE( DIRECTORY = TRIM(file_loc), & ! Intel compiler
223-
!EXIST = dir_check )
224-
! INQUIRE( FILE = TRIM(file_loc), & ! NAG/PGI/GCC compiler
225-
! EXIST = dir_check )
226223
call my_inquire(file_loc, dir_check)
227224
if (dir_check .neqv. .true.) then
228225
call s_create_directory(trim(proc_rank_dir))
@@ -235,10 +232,6 @@ contains
235232
236233
file_loc = trim(rootdir)//'/.'
237234
238-
!INQUIRE( DIRECTORY = TRIM(file_loc), & ! Intel compiler
239-
! EXIST = dir_check )
240-
! INQUIRE( FILE = TRIM(file_loc), & ! NAG/PGI/GCC compiler
241-
! EXIST = dir_check )
242235
call my_inquire(file_loc, dir_check)
243236
if (dir_check .neqv. .true.) then
244237
call s_create_directory(trim(rootdir))
@@ -259,10 +252,6 @@ contains
259252
260253
file_loc = trim(proc_rank_dir)//'/.'
261254
262-
!INQUIRE( DIRECTORY = TRIM(file_loc), & ! Intel compiler
263-
! EXIST = dir_check )
264-
! INQUIRE( FILE = TRIM(file_loc), & ! NAG/PGI/GCC compiler
265-
! EXIST = dir_check )
266255
call my_inquire(file_loc, dir_check)
267256
268257
if (dir_check .neqv. .true.) then
@@ -276,10 +265,6 @@ contains
276265
277266
file_loc = trim(rootdir)//'/.'
278267
279-
!INQUIRE( DIRECTORY = TRIM(file_loc), & ! Intel compiler
280-
! EXIST = dir_check )
281-
! INQUIRE( FILE = TRIM(file_loc), & ! NAG/PGI/GCC compiler
282-
! EXIST = dir_check )
283268
call my_inquire(file_loc, dir_check)
284269
285270
if (dir_check .neqv. .true.) then

toolchain/pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ dependencies = [
2626
"pylint",
2727
"fprettify",
2828
"black",
29+
"fortitude-lint",
30+
"ansi2txt",
2931

3032
# Profiling
3133
"numpy",

0 commit comments

Comments
 (0)