diff --git a/Project.toml b/Project.toml index 4c15a7b..25af0b1 100644 --- a/Project.toml +++ b/Project.toml @@ -12,8 +12,9 @@ RecipesBase = "0.7, 0.8, 1.0" julia = "1.6" [extras] +ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Test", "Plots"] +test = ["ExplicitImports", "Plots", "Test"] diff --git a/src/DimensionalPlotRecipes.jl b/src/DimensionalPlotRecipes.jl index 57df725..679266e 100644 --- a/src/DimensionalPlotRecipes.jl +++ b/src/DimensionalPlotRecipes.jl @@ -1,7 +1,7 @@ module DimensionalPlotRecipes -using RecipesBase -using LinearAlgebra +using RecipesBase: RecipesBase, @recipe +using LinearAlgebra: LinearAlgebra, norm # Splits a complex matrix to its real and complex parts # Reals defaults solid, imaginary defaults dashed diff --git a/test/explicit_imports.jl b/test/explicit_imports.jl new file mode 100644 index 0000000..d2d7400 --- /dev/null +++ b/test/explicit_imports.jl @@ -0,0 +1,8 @@ +using ExplicitImports +using DimensionalPlotRecipes +using Test + +@testset "ExplicitImports" begin + @test check_no_implicit_imports(DimensionalPlotRecipes) === nothing + @test check_no_stale_explicit_imports(DimensionalPlotRecipes) === nothing +end diff --git a/test/runtests.jl b/test/runtests.jl index 2a775d5..c4388bd 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,5 +1,8 @@ using DimensionalPlotRecipes, Test +# Test explicit imports hygiene +include("explicit_imports.jl") + A = rand(5, 2) .+ im .* rand(5, 2) t = range(0, stop = 1, length = 5)