diff --git a/Project.toml b/Project.toml index 4341cfab..7d0b43ce 100644 --- a/Project.toml +++ b/Project.toml @@ -21,6 +21,7 @@ GeoMakieExt = "GeoMakie" Aqua = "0.8" CairoMakie = "0.11.11, 0.12" Documenter = "1" +ExplicitImports = "1.6" GeoMakie = "0.6.5, 0.7" JuliaFormatter = "1" NCDatasets = "0.13.1, 0.14" @@ -35,10 +36,11 @@ julia = "1.9" Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" GeoMakie = "db073c08-6b98-4ee5-b6a4-5efafb3259c6" JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Aqua", "CairoMakie", "Documenter", "GeoMakie", "JuliaFormatter", "SafeTestsets", "Test"] +test = ["Aqua", "CairoMakie", "Documenter", "ExplicitImports", "GeoMakie", "JuliaFormatter", "SafeTestsets", "Test"] diff --git a/src/ClimaAnalysis.jl b/src/ClimaAnalysis.jl index 3f850fad..a640b336 100644 --- a/src/ClimaAnalysis.jl +++ b/src/ClimaAnalysis.jl @@ -1,5 +1,5 @@ module ClimaAnalysis -using Reexport +import Reexport: @reexport include("Utils.jl") import .Utils diff --git a/test/aqua.jl b/test/aqua.jl index c5b155af..3244d23b 100644 --- a/test/aqua.jl +++ b/test/aqua.jl @@ -1,6 +1,7 @@ using Test using ClimaAnalysis using Aqua +import ExplicitImports @testset "Aqua tests" begin Aqua.test_undefined_exports(ClimaAnalysis) @@ -9,3 +10,13 @@ using Aqua Aqua.detect_ambiguities(ClimaAnalysis; recursive = true) Aqua.test_piracies(ClimaAnalysis) end + +@testset "Explicit Imports" begin + @test isnothing(ExplicitImports.check_no_implicit_imports(ClimaAnalysis)) + @test isnothing( + ExplicitImports.check_no_stale_explicit_imports(ClimaAnalysis), + ) + @test isnothing( + ExplicitImports.check_all_qualified_accesses_via_owners(ClimaAnalysis), + ) +end