Linting stage in CI pipeline - which to use and how?

I would suggest to use JuliaFormatter.jl and JET.jl.

In the following comment there’s a snippet for JuliaFormatter on GitLab CI (note the workaround for JULIA_DEPOT_PATH): Add option to ignore files matching patterns · Issue #574 · domluna/JuliaFormatter.jl · GitHub

And here is an example of running JET.jl from the command line for a project (running in the project dir.):

julia --project --eval 'using Pkg; Pkg.activate(); Pkg.add("JET"); Pkg.activate("."); using JET; @show report_package(Pkg.project().name)'

The @show is there as otherwise the output will be silenced (opposite to running in the REPL).

I am about to add JuliaFormatter and JET job templates and jobs to IHP Systems / Julia / Julia GitLab CI templates · GitLab

1 Like