Skip to content

Commit

Permalink
Enable missing-intent rule
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas committed Dec 12, 2024
1 parent 2c67e77 commit 25917a4
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 17 deletions.
1 change: 0 additions & 1 deletion fortitude.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ ignore = [
"S102", # incorrect-space-before-comment, we should enable this, autofix enable
"M011", # use-all (should use "only:")
"M001", # procedure-not-in-module (need a per-file ignore for init.F90)
"T031", # missing-intent
"T042", # assumed-size-character-intent TODO: We should fix all instances!
]
line-length = 132
Expand Down
2 changes: 1 addition & 1 deletion src/en_restraint.F90
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ subroutine energy_restraint(x, y, z, px, py, pz, eclas)
eclas = eclas ! + quadratic_restraint_energy

!Output to en_restraint.dat
write (UERMD, '(I8,F16.8,E20.10,E20.10,F16.8)') it, excE * AUTOEV, deltaE, 0.0, 0.0
write (UERMD, '(I8,F16.8,E20.10,E20.10,F16.8)') it, excE * AUTOEV, deltaE, 0.0D0, 0.0D0

end if

Expand Down
8 changes: 4 additions & 4 deletions src/fftw_interface.F90
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,16 @@ subroutine fftw_normalmodes_init(nwalk)
end subroutine fftw_normalmodes_init

subroutine dft_normalmode2cart(nm, cart)
complex(C_DOUBLE_COMPLEX), dimension(:) :: nm
real(C_DOUBLE), dimension(:) :: cart
complex(C_DOUBLE_COMPLEX), dimension(:), intent(inout) :: nm
real(C_DOUBLE), dimension(:), intent(inout) :: cart
cart = 0.0D0
nm = (0.0D0, 0.0D0)
call not_compiled_with('FFTW library')
end subroutine dft_normalmode2cart

subroutine dft_cart2normalmode(cart, nm)
complex(C_DOUBLE_COMPLEX), dimension(:) :: nm
real(C_DOUBLE), dimension(:) :: cart
complex(C_DOUBLE_COMPLEX), dimension(:), intent(inout) :: nm
real(C_DOUBLE), dimension(:), intent(inout) :: cart
cart = 0.0D0
nm = (0.0D0, 0.0D0)
call not_compiled_with('FFTW library')
Expand Down
2 changes: 1 addition & 1 deletion src/fortran_interfaces.F90
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ end subroutine omp_set_num_threads
function usleep(useconds) bind(c, name='usleep')
import :: C_INT, C_INT32_T
implicit none
integer(kind=C_INT32_T), value :: useconds
integer(kind=C_INT32_T), intent(in), value :: useconds
integer(kind=C_INT) :: usleep
end function usleep

Expand Down
2 changes: 1 addition & 1 deletion src/modules.F90
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ end subroutine set_natom

subroutine update_simtime(dt)
use mod_const, only: DP
real(DP) :: dt
real(DP), intent(in) :: dt
sim_time = sim_time + dt
end subroutine update_simtime
end module mod_general
Expand Down
14 changes: 7 additions & 7 deletions src/nosehoover.F90
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,10 @@ end function get_nhc_temp
! Suzuki-Yoshida split-operator integrator for global NHC
subroutine shiftNHC_yosh(px, py, pz, amt, dt)
use mod_system, only: dime
real(DP) :: px(:, :), py(:, :), pz(:, :)
real(DP) :: amt(:, :), G(MAXCHAIN)
real(DP) :: dt, ekin2, AA
real(DP), intent(inout) :: px(:, :), py(:, :), pz(:, :)
real(DP), intent(in) :: amt(:, :), dt
real(DP) :: G(MAXCHAIN)
real(DP) :: ekin2, AA
real(DP) :: wdt, wdt2, wdt4, pscale
integer :: iw, iat, inh
integer :: nf, iresp, iyosh
Expand Down Expand Up @@ -528,11 +529,10 @@ end subroutine shiftNHC_yosh
subroutine shiftNHC_yosh_mass(px, py, pz, amt, dt)
use mod_general
use mod_shake, only: nshake
real(DP) :: px(:, :), py(:, :), pz(:, :)
real(DP) :: amt(:, :)
real(DP), intent(inout) :: px(:, :), py(:, :), pz(:, :)
real(DP), intent(in) :: amt(:, :), dt
real(DP) :: Gx(MAXCHAIN), Gy(MAXCHAIN), Gz(MAXCHAIN)
real(DP) :: dt, AA
real(DP) :: wdt, wdt2, wdt4
real(DP) :: AA, wdt, wdt2, wdt4
integer :: iw, iat, inh, istart
integer :: iresp, iyosh

Expand Down
2 changes: 1 addition & 1 deletion src/pbc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module PBC

subroutine wrap(x, y, z)
use mod_general, only: nwalk
real(DP) :: x(:, :), y(:, :), z(:, :)
real(DP), intent(inout) :: x(:, :), y(:, :), z(:, :)
integer :: i, iat, iat2, iw, iww, iwrap

iwrap = 0
Expand Down
2 changes: 1 addition & 1 deletion src/random.F90
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ end subroutine random_ints
! Taken from:
! https://gcc.gnu.org/onlinedocs/gcc-4.9.1/gfortran/RANDOM_005fSEED.html
integer function lcg(s)
integer(INT64) :: s
integer(INT64), intent(inout) :: s

if (s == 0) then
s = 104729
Expand Down

0 comments on commit 25917a4

Please sign in to comment.