Skip to content

Commit b8ce10c

Browse files
committed
comments added
1 parent cb3fe8d commit b8ce10c

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

lib/arduino_ci/arduino_cmd.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ def self.flag(name, text = nil)
4242
attr_reader :last_msg
4343

4444
# set the command line flags (undefined for now).
45-
# These vary between gui/cli
46-
flag :get_pref
47-
flag :set_pref
48-
flag :save_prefs
49-
flag :use_board
50-
flag :install_boards
51-
flag :install_library
52-
flag :verify
45+
# These vary between gui/cli. Inline comments added for greppability
46+
flag :get_pref # flag_get_pref
47+
flag :set_pref # flag_set_pref
48+
flag :save_prefs # flag_save_prefs
49+
flag :use_board # flag_use_board
50+
flag :install_boards # flag_install_boards
51+
flag :install_library # flag_install_library
52+
flag :verify # flag_verify
5353

5454
def initialize
5555
@prefs_cache = {}

lib/arduino_ci/ci_config.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,12 @@ def allowable_unittest_files(paths)
293293
return paths if @unittest_info[:testfiles].nil?
294294

295295
ret = paths
296+
# Check for array emptiness, otherwise nothing will be selected!
296297
unless @unittest_info[:testfiles][:select].nil? || @unittest_info[:testfiles][:select].empty?
297298
ret.select! { |p| unittest_info[:testfiles][:select].any? { |glob| p.basename.fnmatch(glob) } }
298299
end
300+
301+
# It's OK for the :reject array to be empty, that means nothing will be rejected by default
299302
unless @unittest_info[:testfiles][:reject].nil?
300303
ret.reject! { |p| unittest_info[:testfiles][:reject].any? { |glob| p.basename.fnmatch(glob) } }
301304
end

0 commit comments

Comments
 (0)