Sha256: 83b57cd2f67daee85fd092276fd59ab4d518874acf1b125883ac3371f3075ce2

Contents?: true

Size: 457 Bytes

Versions: 28

Compression:

Stored size: 457 Bytes

Contents

# frozen_string_literal: true

PuppetLint.new_check(:manifest_whitespace_newline_beginning_of_file) do
  def check
    tokens.each do |token|
      return if token.type != :NEWLINE

      notify(
        :error,
        message: 'there should not be a newline at the beginning of a manifest',
        line: token.line,
        column: token.column,
        token: token,
      )
    end
  end

  def fix(problem)
    remove_token(problem[:token])
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
puppet-lint-manifest_whitespace-check-0.1.8 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.1.7 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.1.6 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.1.5 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.1.4 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.1.2 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.1.0 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.0.1 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb