Skip to content

Commit ac90d21

Browse files
committed
Msftidy checks for file loads
1 parent b3e02f1 commit ac90d21

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/msftidy.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,11 @@ def check_lines
208208
end
209209
end
210210

211+
# if ln =~/^[ \t]+load[ \t]+.*?\.rb/
212+
if ln =~/^[ \t]*load[ \t]+[\x22\x27]/
213+
error("Loading (not requiring) a file: #{ln.inspect}", idx)
214+
end
215+
211216
# The rest of these only count if it's not a comment line
212217
next if ln =~ /[[:space:]]*#/
213218

0 commit comments

Comments
 (0)