Skip to content

Commit

Permalink
Add (broken) tests for ExplicitImports
Browse files Browse the repository at this point in the history
  • Loading branch information
Sbozzolo committed Jul 23, 2024
1 parent b9a37f3 commit 3609d93
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ ClimaComms = "0.5.6, 0.6"
ClimaCore = "0.12, 0.13, 0.14"
ClimaCoreTempestRemap = "0.3.13"
Dates = "1"
ExplicitImports = "1"
Interpolations = "0.15"
NCDatasets = "0.13.1, 0.14"
julia = "1.9"
1 change: 1 addition & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ClimaCore = "d414da3d-4745-48bb-8d80-42e94e092884"
ClimaCoreTempestRemap = "d934ef94-cdd4-4710-83d6-720549644b70"
ClimaUtilities = "b3f4f4ca-9299-4f7f-bd9b-81e1242a7513"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
LazyArtifacts = "4af54fe1-eca0-43a8-85a7-787d91b784e3"
Expand Down
16 changes: 16 additions & 0 deletions test/aqua.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
using Test
using ClimaUtilities
using Aqua
import ExplicitImports
import NCDatasets
import ClimaComms
import Interpolations
import ClimaCoreTempestRemap

@testset "Aqua tests (performance)" begin
# This tests that we don't accidentally run into
Expand Down Expand Up @@ -30,4 +35,15 @@ end
Aqua.test_piracies(ClimaUtilities)
end

@testset "Explicit Imports" begin
@test isnothing(ExplicitImports.check_no_implicit_imports(ClimaUtilities)) broken =
true
@test isnothing(
ExplicitImports.check_no_stale_explicit_imports(ClimaUtilities),
) broken = true
@test isnothing(
ExplicitImports.check_all_qualified_accesses_via_owners(ClimaUtilities),
) broken = true
end

nothing

0 comments on commit 3609d93

Please sign in to comment.