Skip to content

Commit 2dcbe44

Browse files
authored
add ExplicitImports pre-commit code check
1 parent 0e123a2 commit 2dcbe44

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.pre-commit-config.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,30 @@ repos:
1515
- id: runic
1616
additional_dependencies:
1717
- '[email protected]' # Keep version in sync with .github/workflows/Check.yml
18+
19+
explicit-imports:
20+
runs-on: ubuntu-latest
21+
name: "ExplicitImports.jl"
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: julia-actions/setup-julia@v2
25+
with:
26+
version: 'nightly'
27+
- uses: julia-actions/cache@v2
28+
- uses: julia-actions/julia-buildpkg@v1
29+
- name: Install dependencies
30+
shell: julia {0}
31+
run: |
32+
# Add ExplicitImports.jl
33+
using Pkg
34+
Pkg.add([
35+
PackageSpec(name = "ExplicitImports", version = "1.12"),
36+
])
37+
- name: ExplicitImports.jl code checks
38+
shell: julia --project {0}
39+
run: |
40+
using Pkg, ExplicitImports
41+
check_no_implicit_imports(Pkg)
42+
# check_no_stale_explicit_imports(Pkg) # artifact_names in PkgArtifacts
43+
check_all_qualified_accesses_via_owners(Pkg)
44+
check_no_self_qualified_accesses(Pkg)

0 commit comments

Comments
 (0)