Skip to content

Commit d81b9a6

Browse files
committed
Add script to lint Julia files
1 parent c8bcf29 commit d81b9a6

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

tools/lint/julia/REQUIRE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
julia 0.5
2+
Lint 0.5.2

tools/lint/julia/linter.jl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env julia
2+
#
3+
# Lints a list of Julia files.
4+
#
5+
# The script is called with one or more arguments, where each argument is a
6+
# filepath. Note that each provided filepath is resolved relative to the current
7+
# working directory of the calling process.
8+
#
9+
10+
import Base.Test
11+
import Lint
12+
13+
# Lint each file separately...
14+
@Base.Test.testset "Lint tests" begin
15+
for i in 1:length( ARGS )
16+
@Base.Test.test isempty( Lint.lintfile( ARGS[ i ] ) );
17+
end
18+
end
19+
20+
quit();

0 commit comments

Comments
 (0)