Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style/BlockDelimiters-20240123233317 #21

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 2 additions & 28 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config --exclude-limit 180`
# on 2024-01-16 23:33:30 UTC using RuboCop version 1.60.0.
# on 2024-01-23 23:33:29 UTC using RuboCop version 1.60.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand Down Expand Up @@ -148,14 +148,13 @@ Layout/SpaceBeforeBlockBraces:
- 'spec/excel_abstraction/cell_spec.rb'
- 'spec/excel_abstraction/row_spec.rb'

# Offense count: 2
# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
# SupportedStyles: space, no_space
# SupportedStylesForEmptyBraces: space, no_space
Layout/SpaceInsideBlockBraces:
Exclude:
- 'lib/excel_templating/document/data_source_registry.rb'
- 'spec/excel_abstraction/cell_reference_spec.rb'

# Offense count: 38
Expand Down Expand Up @@ -291,31 +290,6 @@ Style/Alias:
- 'lib/excel_templating/excel_abstraction/cell_range.rb'
- 'lib/excel_templating/excel_abstraction/row.rb'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowOnlyRestArgument, UseAnonymousForwarding, RedundantRestArgumentNames, RedundantKeywordRestArgumentNames, RedundantBlockArgumentNames.
# RedundantRestArgumentNames: args, arguments
# RedundantKeywordRestArgumentNames: kwargs, options, opts
# RedundantBlockArgumentNames: blk, block, proc
Style/ArgumentsForwarding:
Exclude:
- 'lib/excel_templating/document.rb'

# Offense count: 7
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
# FunctionalMethods: let, let!, subject, watch
# AllowedMethods: lambda, proc, it
Style/BlockDelimiters:
Exclude:
- 'lib/excel_templating/document/data_source_registry.rb'
- 'spec/cell_validation_spec.rb'
- 'spec/column_validation_spec.rb'
- 'spec/excel_abstraction/spread_sheet_spec.rb'
- 'spec/excel_templating_spec.rb'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowOnConstant, AllowOnSelfClass.
Expand Down
4 changes: 2 additions & 2 deletions lib/excel_templating/document/data_source_registry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ def has_registry?(source_symbol)

# @return [TrueClass|FalseClass]
def any_data_sheet_symbols?
select {|info|
select do |info|
info.data_sheet?
}.any?
end.any?
end

# @return [Array<Symbol>]
Expand Down
12 changes: 6 additions & 6 deletions spec/cell_validation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ class SimpleCellValidatedDocument < ExcelTemplating::Document

subject { SimpleCellValidatedDocument.new(data) }

let(:data) {
let(:data) do
{
all_sheets:
{
valid_value: "foo",
}
}
}
end

describe "#render" do
it do
Expand Down Expand Up @@ -59,15 +59,15 @@ class SimpleFromDataValidatedDocument < ExcelTemplating::Document

subject { SimpleFromDataValidatedDocument.new(data) }

let(:data) {
let(:data) do
{
all_sheets:
{
valid_foos: ["foo", "bar"],
valid_value: "foo",
}
}
}
end

describe "#render" do
it do
Expand All @@ -92,14 +92,14 @@ class InlineCellValidatedDocument < ExcelTemplating::Document

subject { InlineCellValidatedDocument.new(data) }

let(:data) {
let(:data) do
{
all_sheets:
{
valid_value: "foo",
}
}
}
end

describe "#render" do
it do
Expand Down
4 changes: 2 additions & 2 deletions spec/column_validation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class SimpleColumnValidatedDocument < ExcelTemplating::Document

subject { SimpleColumnValidatedDocument.new(data) }

let(:data) {
let(:data) do
{
all_sheets: {},
1 => {
Expand All @@ -32,7 +32,7 @@ class SimpleColumnValidatedDocument < ExcelTemplating::Document
]
}
}
}
end

describe "#render" do
it do
Expand Down
4 changes: 2 additions & 2 deletions spec/excel_abstraction/spread_sheet_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
file.write subject.to_s
file.close

expect {
expect do
Roo::Excel.new(file.path, packed: nil, file_warning: :ignore)
}.to_not raise_exception
end.to_not raise_exception

File.unlink(file.path)
expect(subject).to be_closed
Expand Down
4 changes: 2 additions & 2 deletions spec/excel_templating_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class AlphalistClass < ExcelTemplating::Document
let(:organization_name) { "The Coffee Bean and Tea Leaf" }
let(:year) { 1971 }

let(:data) {
let(:data) do
{
all_sheets:
{
Expand Down Expand Up @@ -126,7 +126,7 @@ class AlphalistClass < ExcelTemplating::Document

}
}
}
end

describe "#render" do
it do
Expand Down