diff --git a/.rubocop.yml b/.rubocop.yml index 94b940745..a8f857daf 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -43,11 +43,11 @@ Metrics/ModuleLength: Metrics/PerceivedComplexity: Enabled: false -Naming/AccessorMethodName: +Style/AccessorMethodName: Exclude: - lib/prawn/graphics/color.rb -Layout/AlignParameters: +Style/AlignParameters: EnforcedStyle: with_fixed_indentation # We need to reference non-ascii characters when testing and explaining @@ -67,16 +67,16 @@ Style/Encoding: - lib/prawn/images.rb - spec/png_spec.rb -Layout/FirstArrayElementLineBreak: +Style/FirstArrayElementLineBreak: Enabled: true -Layout/FirstHashElementLineBreak: +Style/FirstHashElementLineBreak: Enabled: true -Layout/FirstMethodArgumentLineBreak: +Style/FirstMethodArgumentLineBreak: Enabled: true -Layout/FirstParameterIndentation: +Style/FirstParameterIndentation: EnforcedStyle: consistent Style/GuardClause: @@ -93,16 +93,16 @@ Lint/HandleExceptions: Style/IfUnlessModifier: Enabled: false -Layout/IndentArray: +Style/IndentArray: EnforcedStyle: consistent -Layout/IndentHash: +Style/IndentHash: EnforcedStyle: consistent -Layout/MultilineMethodCallIndentation: +Style/MultilineMethodCallIndentation: EnforcedStyle: indented -Layout/MultilineOperationIndentation: +Style/MultilineOperationIndentation: EnforcedStyle: indented Exclude: - prawn.gemspec @@ -120,12 +120,12 @@ Style/PercentLiteralDelimiters: '%W': '[]' '%x': '()' -Naming/PredicateName: +Style/PredicateName: Exclude: - lib/prawn/font/ttf.rb - lib/prawn/font/afm.rb -Layout/SpaceAroundOperators: +Style/SpaceAroundOperators: AllowForAlignment: false Style/WhileUntilModifier: diff --git a/lib/prawn/font/ttf.rb b/lib/prawn/font/ttf.rb index 08ba62205..cffc31b43 100644 --- a/lib/prawn/font/ttf.rb +++ b/lib/prawn/font/ttf.rb @@ -112,7 +112,7 @@ def basename end # not sure how to compute this for true-type fonts... - def stemV # rubocop: disable Naming/MethodName + def stemV # rubocop: disable Style/MethodName 0 end diff --git a/lib/prawn/text/formatted/arranger.rb b/lib/prawn/text/formatted/arranger.rb index 7c7b2c630..5f787a59c 100644 --- a/lib/prawn/text/formatted/arranger.rb +++ b/lib/prawn/text/formatted/arranger.rb @@ -7,7 +7,7 @@ # # This is free software. Please see the LICENSE and COPYING files for details. -# rubocop: disable Naming/AccessorMethodName +# rubocop: disable Style/AccessorMethodName module Prawn module Text diff --git a/spec/prawn/text_draw_text_spec.rb b/spec/prawn/text_draw_text_spec.rb index 1268832c6..118fcafcb 100644 --- a/spec/prawn/text_draw_text_spec.rb +++ b/spec/prawn/text_draw_text_spec.rb @@ -44,7 +44,7 @@ expect(text.font_settings[0][:size]).to eq(16) end - # rubocop: disable Naming/AccessorMethodName + # rubocop: disable Style/AccessorMethodName rotated_text_inspector = Class.new(PDF::Inspector) do attr_reader :tm_operator_used @@ -56,7 +56,7 @@ def set_text_matrix_and_text_line_matrix(*_a) @tm_operator_used = true end end - # rubocop: enable Naming/AccessorMethodName + # rubocop: enable Style/AccessorMethodName it 'allows rotation' do pdf.draw_text('Test', at: [100, 100], rotate: 90)