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.3.0 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.2.9 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.2.8 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.2.7 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.2.6 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.2.5 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.2.4 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.2.3 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.2.2 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.2.1 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.2.0 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.1.17 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.1.16 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.1.15 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.1.14 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.1.13 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.1.12 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.1.11 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.1.10 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb
puppet-lint-manifest_whitespace-check-0.1.9 lib/puppet-lint/plugins/check_manifest_whitespace_newline_beginning_of_file.rb