Skip to content

Commit

Permalink
Add ExplicitImports
Browse files Browse the repository at this point in the history
ExplicitImports helps keeping under control where each function comes
from
  • Loading branch information
Sbozzolo committed Jul 24, 2024
1 parent 192df89 commit a64987c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"]
2 changes: 1 addition & 1 deletion src/ClimaAnalysis.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module ClimaAnalysis
using Reexport
import Reexport: @reexport

include("Utils.jl")
import .Utils
Expand Down
11 changes: 11 additions & 0 deletions test/aqua.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Test
using ClimaAnalysis
using Aqua
import ExplicitImports

@testset "Aqua tests" begin
Aqua.test_undefined_exports(ClimaAnalysis)
Expand All @@ -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

0 comments on commit a64987c

Please sign in to comment.