Skip to content

Commit

Permalink
Layout/EmptyLineAfterMagicComment
Browse files Browse the repository at this point in the history
This commit enables the Rubocop Layout/EmptyLineAfterMagicComment cop
and fixes all offenses.
  • Loading branch information
mhashizume committed Dec 19, 2023
1 parent 66d053b commit e7492be
Show file tree
Hide file tree
Showing 996 changed files with 995 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ I18n/GetText/DecorateStringFormattingUsingPercent:
I18n/RailsI18n/DecorateString:
Enabled: false

# This cop supports safe auto-correction (--auto-correct).
Layout/EmptyLineAfterMagicComment:
Enabled: false

# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: EnforcedStyleAlignWith, Severity.
# SupportedStylesAlignWith: keyword, variable, start_of_line
Expand Down
1 change: 1 addition & 0 deletions lib/hiera/puppet_function.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require 'hiera_puppet'

# Provides the base class for the puppet functions hiera, hiera_array, hiera_hash, and hiera_include.
Expand Down
1 change: 1 addition & 0 deletions lib/hiera/scope.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require 'forwardable'
class Hiera
class Scope
Expand Down
1 change: 1 addition & 0 deletions lib/hiera_puppet.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

Puppet.features.hiera?
require 'hiera/scope'
require_relative 'puppet'
Expand Down
1 change: 1 addition & 0 deletions lib/puppet.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative 'puppet/version'
require_relative 'puppet/concurrent/synchronized'

Expand Down
1 change: 1 addition & 0 deletions lib/puppet/agent.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../puppet/application'
require_relative '../puppet/error'
require_relative '../puppet/util/at_fork'
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/agent/disabler.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/util/json_lockfile'

# This module is responsible for encapsulating the logic for
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/agent/locker.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/util/pidlock'
require_relative '../../puppet/error'

Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require 'optparse'
require_relative '../puppet/util/command_line'
require_relative '../puppet/util/constant_inflector'
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/agent.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application'
require_relative '../../puppet/daemon'
require_relative '../../puppet/util/pidlock'
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/apply.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application'
require_relative '../../puppet/configurer'
require_relative '../../puppet/util/profiler/aggregate'
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/catalog.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application/indirection_base'

class Puppet::Application::Catalog < Puppet::Application::IndirectionBase
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/config.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application/face_base'

class Puppet::Application::Config < Puppet::Application::FaceBase
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/describe.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application'

class Formatter
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/device.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application'
require_relative '../../puppet/configurer'
require_relative '../../puppet/util/network_device'
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/doc.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application'

class Puppet::Application::Doc < Puppet::Application
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/epp.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application/face_base'
require_relative '../../puppet/face'

Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/face_base.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application'
require_relative '../../puppet/face'
require 'optparse'
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/facts.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application/indirection_base'

class Puppet::Application::Facts < Puppet::Application::IndirectionBase
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/filebucket.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application'

class Puppet::Application::Filebucket < Puppet::Application
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/generate.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application/face_base'

# The Generate application.
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/help.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application/face_base'

class Puppet::Application::Help < Puppet::Application::FaceBase
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/indirection_base.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application/face_base'

class Puppet::Application::IndirectionBase < Puppet::Application::FaceBase
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/lookup.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application'
require_relative '../../puppet/pops'
require_relative '../../puppet/node'
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/module.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application/face_base'

class Puppet::Application::Module < Puppet::Application::FaceBase
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/node.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application/indirection_base'

class Puppet::Application::Node < Puppet::Application::IndirectionBase
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/parser.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application/face_base'
require_relative '../../puppet/face'

Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/plugin.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application/face_base'
class Puppet::Application::Plugin < Puppet::Application::FaceBase
environment_mode :not_required
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/report.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application/indirection_base'

class Puppet::Application::Report < Puppet::Application::IndirectionBase
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/resource.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application'

class Puppet::Application::Resource < Puppet::Application
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/script.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application'
require_relative '../../puppet/configurer'
require_relative '../../puppet/util/profiler/aggregate'
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application/ssl.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/application'
require_relative '../../puppet/ssl/oids'

Expand Down
1 change: 1 addition & 0 deletions lib/puppet/application_support.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require 'yaml'

require_relative '../puppet'
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/coercion.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

# Various methods used to coerce values into a canonical form.
#
# @api private
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/compilable_resource_type.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../puppet'
# The CompilableResourceType module should be either included in a class or used as a class extension
# to mark that the instance used as the 'resource type' of a resource instance
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/concurrent.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true

module Puppet::Concurrent
end
1 change: 1 addition & 0 deletions lib/puppet/concurrent/lock.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/concurrent/synchronized'

module Puppet
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/concurrent/synchronized.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

module Puppet
module Concurrent
# Including Puppet::Concurrent::Synchronized into a class when running on JRuby
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/concurrent/thread_local_singleton.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

module Puppet
module Concurrent
module ThreadLocalSingleton
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/configurer.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

# The client for interacting with the puppetmaster config server.
require 'timeout'
require_relative '../puppet/util'
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/configurer/downloader.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/configurer'
require_relative '../../puppet/resource/catalog'

Expand Down
1 change: 1 addition & 0 deletions lib/puppet/configurer/fact_handler.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/indirector/facts/facter'

require_relative '../../puppet/configurer'
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/configurer/plugin_handler.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

# Break out the code related to plugins. This module is
# just included into the agent, but having it here makes it
# easier to test.
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/confine.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

# The class that handles testing whether our providers
# actually work or not.
require_relative '../puppet/util'
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/confine/any.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

class Puppet::Confine::Any < Puppet::Confine
def self.summarize(confines)
confines.inject(0) { |count, confine| count + confine.summary }
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/confine/boolean.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/confine'

# Common module for the Boolean confines. It currently
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/confine/exists.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/confine'

class Puppet::Confine::Exists < Puppet::Confine
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/confine/false.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/confine/boolean'

class Puppet::Confine::False < Puppet::Confine
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/confine/feature.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/confine'

class Puppet::Confine::Feature < Puppet::Confine
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/confine/true.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/confine/boolean'

class Puppet::Confine::True < Puppet::Confine
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/confine/variable.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/confine'

# Require a specific value for a variable, either a Puppet setting
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/confine_collection.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

# Manage a collection of confines, returning a boolean or
# helpful information.
require_relative '../puppet/confine'
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/confiner.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../puppet/confine_collection'

# The Confiner module contains methods for managing a Provider's confinement (suitability under given
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/context.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../puppet/thread_local'

# Puppet::Context is a system for tracking services and contextual information
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/context/trusted_information.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../../puppet/trusted_external'

# @api private
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/daemon.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../puppet/application'
require_relative '../puppet/scheduler'

Expand Down
1 change: 1 addition & 0 deletions lib/puppet/data_binding.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../puppet/indirector'

# A class for managing data lookups
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/datatypes.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

# Data types in the Puppet Language can have implementations written in Ruby
# and distributed in puppet modules. A data type can be declared together with
# its implementation by creating a file in 'lib/puppet/functions/<modulename>'.
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/datatypes/error.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

Puppet::DataTypes.create_type('Error') do
interface <<-PUPPET
type_parameters => {
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/datatypes/impl/error.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

class Puppet::DataTypes::Error
attr_reader :msg, :kind, :issue_code, :details
alias message msg
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/defaults.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../puppet/util/platform'

module Puppet
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/environments.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../puppet/concurrent/synchronized'

# @api private
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/error.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

module Puppet
# The base class for all Puppet errors. It can wrap another exception
class Error < RuntimeError
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/etc.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative '../puppet/util/character_encoding'
# Wrapper around Ruby Etc module allowing us to manage encoding in a single
# place.
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/external/dot.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

# rdot.rb
#
#
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/face.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

# The public name of this feature is 'face', but we have hidden all the
# plumbing over in the 'interfaces' namespace to make clear the distinction
# between the two.
Expand Down
Loading

0 comments on commit e7492be

Please sign in to comment.