From 3db0c5783fc4072b55ceb71b7d9ec49f617f8fb3 Mon Sep 17 00:00:00 2001 From: Ricky Wong <141156427+mo-rickywong@users.noreply.github.com> Date: Wed, 4 Feb 2026 11:52:02 +0000 Subject: [PATCH] Add fixes thatjedi falls foul of --- .../build/tools/configurator/templates/config_type.f90.jinja | 2 +- .../configurator/templates/namelist_iterator_type.f90.jinja | 2 +- .../build/tools/configurator/tests/app_config/content_mod.f90 | 4 ++-- .../configurator/tests/app_config/pot_nml_iterator_mod.f90 | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/infrastructure/build/tools/configurator/templates/config_type.f90.jinja b/infrastructure/build/tools/configurator/templates/config_type.f90.jinja index d79fc8a48..a69748150 100644 --- a/infrastructure/build/tools/configurator/templates/config_type.f90.jinja +++ b/infrastructure/build/tools/configurator/templates/config_type.f90.jinja @@ -383,7 +383,7 @@ subroutine clear(self) ! Namlists which may have multiple instances per configuration {%- for i in range(namelists|length) %} {%- if duplicates[i] %} - call self%{{namelists[i]}}%clear() + if (allocated(self%{{namelists[i]}})) call self%{{namelists[i]}}%clear() {%- endif %} {%- endfor %} {% for i in range(namelists|length) %} diff --git a/infrastructure/build/tools/configurator/templates/namelist_iterator_type.f90.jinja b/infrastructure/build/tools/configurator/templates/namelist_iterator_type.f90.jinja index 7d1d9a512..d0a882bf1 100644 --- a/infrastructure/build/tools/configurator/templates/namelist_iterator_type.f90.jinja +++ b/infrastructure/build/tools/configurator/templates/namelist_iterator_type.f90.jinja @@ -14,7 +14,7 @@ !> @details Provides functionality for iteratively returning every member !> of the defined namelist ({{listname}}) collection. The order of !> the namelists returned is not defined and can change if the -!> implementation of the namelist collection is changes. +!> implementation of the namelist collection is changed. ! module {{listname}}_nml_iterator_mod diff --git a/infrastructure/build/tools/configurator/tests/app_config/content_mod.f90 b/infrastructure/build/tools/configurator/tests/app_config/content_mod.f90 index c84d6c534..cad68a8b5 100644 --- a/infrastructure/build/tools/configurator/tests/app_config/content_mod.f90 +++ b/infrastructure/build/tools/configurator/tests/app_config/content_mod.f90 @@ -434,8 +434,8 @@ subroutine clear(self) class(config_type), intent(inout) :: self ! Namlists which may have multiple instances per configuration - call self%bar%clear() - call self%pot%clear() + if (allocated(self%bar)) call self%bar%clear() + if (allocated(self%pot)) call self%pot%clear() if (allocated(self%foo)) deallocate(self%foo) if (allocated(self%bar)) deallocate(self%bar) diff --git a/infrastructure/build/tools/configurator/tests/app_config/pot_nml_iterator_mod.f90 b/infrastructure/build/tools/configurator/tests/app_config/pot_nml_iterator_mod.f90 index 6e7a61dd0..9d598b07c 100644 --- a/infrastructure/build/tools/configurator/tests/app_config/pot_nml_iterator_mod.f90 +++ b/infrastructure/build/tools/configurator/tests/app_config/pot_nml_iterator_mod.f90 @@ -10,7 +10,7 @@ !> @details Provides functionality for iteratively returning every member !> of the defined namelist (pot) collection. The order of !> the namelists returned is not defined and can change if the -!> implementation of the namelist collection is changes. +!> implementation of the namelist collection is changed. ! module pot_nml_iterator_mod