Sha256: c13d078a40f878deb2ababd61f7dbf3d1d7d24551abc417a68d34d830f1ebf0e

Contents?: true

Size: 571 Bytes

Versions: 1

Compression:

Stored size: 571 Bytes

Contents

# Check for Class references
PuppetLint.new_check(:resource_reference_chain_without_whitespace) do
  def check
    tokens.select do |token|
      [:TYPE].include? token.type
    end.each do |param_token|
      check = param_token
      case check.type
      when :TYPE

        if check.next_token.type == :WHITESPACE and check.next_code_token.type == :LBRACK
          notify :error, {
            message: 'whitespce between reference type and title',
            line: check.line,
            column: check.column,
          }
        end

      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
puppet-lint-resource_reference_syntax-2.0.0 lib/puppet-lint/plugins/resource_reference_chain_without_whitespace.rb