diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 700707c..ec3b005 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,3 +5,6 @@ updates: directory: "/" # Location of package manifests schedule: interval: "weekly" + ignore: + - dependency-name: "crate-ci/typos" + update-types: ["version-update:semver-patch", "version-update:semver-minor"] diff --git a/Project.toml b/Project.toml index e7f3b82..04d00de 100644 --- a/Project.toml +++ b/Project.toml @@ -10,14 +10,16 @@ DiffRules = "b552c78f-8df3-52c6-915a-8e097449b14b" [compat] Cassette = "0.3.6" DiffRules = "1.15" +ExplicitImports = "1.9" julia = "1.10" [extras] ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66" +ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" Lux = "b2108857-7c20-44ae-9111-449ecde12c47" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Test", "SafeTestsets", "ComponentArrays", "Lux", "Random"] +test = ["Test", "SafeTestsets", "ComponentArrays", "Lux", "Random", "ExplicitImports"] diff --git a/src/FunctionProperties.jl b/src/FunctionProperties.jl index 34768ca..1b1c237 100644 --- a/src/FunctionProperties.jl +++ b/src/FunctionProperties.jl @@ -1,7 +1,8 @@ module FunctionProperties -using Cassette, DiffRules -using Core: CodeInfo, SlotNumber, SSAValue, ReturnNode, GotoIfNot +using Cassette: Cassette +using DiffRules: DiffRules +using Core: SSAValue, GotoIfNot const printbranch = false diff --git a/test/explicit_imports.jl b/test/explicit_imports.jl new file mode 100644 index 0000000..0a03fa7 --- /dev/null +++ b/test/explicit_imports.jl @@ -0,0 +1,8 @@ +using ExplicitImports +using FunctionProperties +using Test + +@testset "ExplicitImports" begin + @test check_no_implicit_imports(FunctionProperties) === nothing + @test check_no_stale_explicit_imports(FunctionProperties) === nothing +end diff --git a/test/runtests.jl b/test/runtests.jl index fdea993..af73ce3 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,4 +1,9 @@ -using FunctionProperties, Test +using FunctionProperties +using Test + +@testset "Explicit Imports" begin + include("explicit_imports.jl") +end @test hasbranching(1, 2) do x, y (x < 0 ? -x : x) + exp(y)