Skip to content

Commit

Permalink
standardrb --only Layout/LeadingCommentSpace --fix
Browse files Browse the repository at this point in the history
  • Loading branch information
halostatue committed Jul 5, 2022
1 parent 5da1929 commit 396a82c
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ Hoe.plugin :gemspec2
Hoe.plugin :git

if RUBY_VERSION < "1.9"
class Array #:nodoc:
class Array # :nodoc:
def to_h
Hash[*flatten(1)]
end
end

class Gem::Specification #:nodoc:
class Gem::Specification # :nodoc:
def metadata=(*); end

def default_value(*); end
end

class Object #:nodoc:
class Object # :nodoc:
def caller_locations(*)
[]
end
Expand Down
10 changes: 5 additions & 5 deletions lib/diff/lcs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ module Diff::LCS # rubocop:disable Style/Documentation
# identically for key purposes. That is:
#
# O.new('a').eql?(O.new('a')) == true
def lcs(other, &block) #:yields: self[i] if there are matched subsequences
def lcs(other, &block) # :yields: self[i] if there are matched subsequences
Diff::LCS.lcs(self, other, &block)
end

Expand Down Expand Up @@ -141,7 +141,7 @@ def unpatch_me(patchset)
end

class << Diff::LCS
def lcs(seq1, seq2, &block) #:yields: seq1[i] for each matched
def lcs(seq1, seq2, &block) # :yields: seq1[i] for each matched
matches = Diff::LCS::Internals.lcs(seq1, seq2)
ret = []
string = seq1.kind_of? String
Expand Down Expand Up @@ -197,7 +197,7 @@ def diff(seq1, seq2, callbacks = nil, &block) # :yields: diff changes
# # insert
# end
# end
def sdiff(seq1, seq2, callbacks = nil, &block) #:yields: diff changes
def sdiff(seq1, seq2, callbacks = nil, &block) # :yields: diff changes
diff_traversal(:sdiff, seq1, seq2, callbacks || Diff::LCS::SDiffCallbacks, &block)
end

Expand Down Expand Up @@ -282,7 +282,7 @@ def sdiff(seq1, seq2, callbacks = nil, &block) #:yields: diff changes
# <tt>callbacks#discard_b</tt> will be called after the end of the sequence
# is reached, if +a+ has not yet reached the end of +A+ or +b+ has not yet
# reached the end of +B+.
def traverse_sequences(seq1, seq2, callbacks = Diff::LCS::SequenceCallbacks) #:yields: change events
def traverse_sequences(seq1, seq2, callbacks = Diff::LCS::SequenceCallbacks) # :yields: change events
callbacks ||= Diff::LCS::SequenceCallbacks
matches = Diff::LCS::Internals.lcs(seq1, seq2)

Expand Down Expand Up @@ -576,7 +576,7 @@ def traverse_balanced(seq1, seq2, callbacks = Diff::LCS::BalancedCallbacks)
end
end

PATCH_MAP = { #:nodoc:
PATCH_MAP = { # :nodoc:
:patch => { "+" => "+", "-" => "-", "!" => "!", "=" => "=" }.freeze,
:unpatch => { "+" => "-", "-" => "+", "!" => "!", "=" => "=" }.freeze
}.freeze
Expand Down
2 changes: 1 addition & 1 deletion lib/diff/lcs/callbacks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ class Diff::LCS::SDiffCallbacks
# Returns the difference set collected during the diff process.
attr_reader :diffs

def initialize #:yields: self
def initialize # :yields: self
@diffs = []
yield self if block_given?
end
Expand Down
4 changes: 2 additions & 2 deletions lib/diff/lcs/htmldiff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
# Produce a simple HTML diff view.
class Diff::LCS::HTMLDiff
class << self
attr_accessor :can_expand_tabs #:nodoc:
attr_accessor :can_expand_tabs # :nodoc:
end
self.can_expand_tabs = true

class Callbacks #:nodoc:
class Callbacks # :nodoc:
attr_accessor :output
attr_accessor :match_class
attr_accessor :only_a_class
Expand Down
6 changes: 3 additions & 3 deletions lib/diff/lcs/hunk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# each block. (So if we're not using context, every hunk will contain one
# block.) Used in the diff program (bin/ldiff).
class Diff::LCS::Hunk
OLD_DIFF_OP_ACTION = { "+" => "a", "-" => "d", "!" => "c" }.freeze #:nodoc:
ED_DIFF_OP_ACTION = { "+" => "a", "-" => "d", "!" => "c" }.freeze #:nodoc:
OLD_DIFF_OP_ACTION = { "+" => "a", "-" => "d", "!" => "c" }.freeze # :nodoc:
ED_DIFF_OP_ACTION = { "+" => "a", "-" => "d", "!" => "c" }.freeze # :nodoc:

private_constant :OLD_DIFF_OP_ACTION, :ED_DIFF_OP_ACTION if respond_to?(:private_constant)

Expand Down Expand Up @@ -69,7 +69,7 @@ def initialize(data_old, data_new, piece, flag_context, file_length_difference)
# to this hunk.
attr_accessor :flag_context # rubocop:disable Layout/EmptyLinesAroundAttributeAccessor
undef :flag_context=
def flag_context=(context) #:nodoc: # rubocop:disable Lint/DuplicateMethods
def flag_context=(context) # :nodoc: # rubocop:disable Lint/DuplicateMethods
return if context.nil? || context.zero?

add_start = context > @start_old ? @start_old : context
Expand Down
10 changes: 5 additions & 5 deletions lib/diff/lcs/ldiff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require "ostruct"
require "diff/lcs/hunk"

module Diff::LCS::Ldiff #:nodoc:
module Diff::LCS::Ldiff # :nodoc:
# standard:disable Layout/HeredocIndentation
BANNER = <<-COPYRIGHT
ldiff #{Diff::LCS::VERSION}
Expand All @@ -21,11 +21,11 @@ module Diff::LCS::Ldiff #:nodoc:
end

class << Diff::LCS::Ldiff
attr_reader :format, :lines #:nodoc:
attr_reader :file_old, :file_new #:nodoc:
attr_reader :data_old, :data_new #:nodoc:
attr_reader :format, :lines # :nodoc:
attr_reader :file_old, :file_new # :nodoc:
attr_reader :data_old, :data_new # :nodoc:

def run(args, _input = $stdin, output = $stdout, error = $stderr) #:nodoc:
def run(args, _input = $stdin, output = $stdout, error = $stderr) # :nodoc:
@binary = nil

args.options do |o|
Expand Down

0 comments on commit 396a82c

Please sign in to comment.