class Object

Public Instance Methods

check() click to toggle source

rubocop:disable Style/Next

# File lib/puppet-lint/plugins/check_racism_terminology.rb, line 3
def check
  manifest_lines.each_with_index do |line, idx|
    if line =~ /\b(master|slave)\b/
      notify(
        :warning,
        message: 'master/slave terminology, perhaps leader/follower?',
        line: idx + 1,
        column: line.length
      )
    end

    if line =~ /\b(blacklist|whitelist)\b/
      notify(
        :warning,
        message: 'blacklist/whitelist terminology, perhaps blocklist/approvelist?',
        line: idx + 1,
        column: line.length
      )
    end
  end
end