blob: 59bdcf3f2ea9e28b890dcb8eb0e2ccf38af3c6aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/usr/bin/env ruby
require 'pathname'
LINTERS = [
:cargo_workspace_dependencies,
:contiguous_use_block,
# TODO: re-enable this linter
# :no_decorative_section_comment,
:no_mod_rs,
# TODO: re-enable this linter
# :no_std_collections_maps,
:no_use_as_alias,
:sorted_dependencies,
]
root_dir = Pathname.new(__dir__).join('..').expand_path
results = LINTERS.map do |linter|
require_relative "linters/#{linter}"
puts "===== #{linter} ====="
ok = send(linter, root_dir)
puts "Passed." if ok
puts
ok
end
exit(results.all? ? 0 : 1)
|