Skip to content

Commit 9f624c6

Browse files
committed
do not require LC in front of checks
1 parent 308fe92 commit 9f624c6

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

.codeclimate.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ engines:
4646
enabled: true
4747
LC631:
4848
enabled: false
49-
LC632:
49+
632:
50+
enabled: true
51+
".*_":
5052
enabled: true
5153
rubocop:
5254
enabled: true

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ engines:
2929
luacheck:
3030
enabled: true
3131
checks:
32-
LC631: # disable check 631
32+
631: # disable check 631
3333
enabled: false
34-
LC4.2: # disable shadowing declarations of arguments or redefining them
34+
4.2: # disable shadowing declarations of arguments or redefining them
3535
enabled: false
3636
```
3737

bin/engine-luacheck

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ ignore = options['ignore'] ||= []
5151
enable = options['enable'] ||= []
5252

5353
checks.each do |name, value|
54-
STDERR.puts "check: #{name} => #{value}"
54+
warn "check: #{name} => #{value}"
5555
case name
56-
when /\ALC(?<pattern>.+)\z/
56+
when /\A(?:LC)?(?<pattern>.+)\z/
5757
enabled = value.fetch('enabled', true)
5858
(enabled ? enable : ignore) << $LAST_MATCH_INFO[:pattern]
5959
else
60-
STDERR.puts "unknown check: #{name}"
60+
warn "unknown check: #{name}"
6161
end
6262
end
6363

@@ -103,12 +103,12 @@ Find.find(*existing_paths) do |path|
103103
files << path
104104
end
105105
rescue ArgumentError => error
106-
STDERR.puts "#{error} when detecting language of: #{path}"
106+
warn "#{error} when detecting language of: #{path}"
107107
end
108108
end
109109

110110
cmd = ['luacheck', *check_options.compact, *boolean_options.compact, *array_options.compact.flatten, '--formatter', 'codeclimate', *files ]
111-
STDERR.puts Shellwords.join(cmd)
111+
warn Shellwords.join(cmd)
112112

113113
IO.popen(cmd) do |io|
114114
while (line = io.gets)

0 commit comments

Comments
 (0)