Skip to content

Commit

Permalink
Remaining Layout/*Align* rules: fix violations
Browse files Browse the repository at this point in the history
Accepting StandardRB for:
* Layout/BlockAlignment
* Layout/DefEndAlignment
* Layout/ElseAlignment
* Layout/EndAlignment
* Layout/MultilineArrayBraceLayout
* Layout/MultilineHashBraceLayout
  • Loading branch information
solebared committed May 18, 2021
1 parent 97a3177 commit c945cfb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 57 deletions.
49 changes: 0 additions & 49 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,6 @@
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleAlignWith.
# SupportedStylesAlignWith: either, start_of_block, start_of_line
Layout/BlockAlignment:
Exclude:
- 'spec/factories/users.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleAlignWith, Severity.
# SupportedStylesAlignWith: start_of_line, def
Layout/DefEndAlignment:
Exclude:
- 'db/migrate/20200605030804_add_role_to_user.rb'

# Offense count: 1
# Cop supports --auto-correct.
Layout/ElseAlignment:
Exclude:
- 'app/mailers/peer_to_peer_match_mailer.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: AllowBorderComment, AllowMarginComment.
Expand Down Expand Up @@ -113,33 +91,6 @@ Layout/EmptyLinesAroundModuleBody:
Exclude:
- 'app/helpers/communication_log_buttons.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleAlignWith, Severity.
# SupportedStylesAlignWith: keyword, variable, start_of_line
Layout/EndAlignment:
Exclude:
- 'app/mailers/peer_to_peer_match_mailer.rb'
- 'config/initializers/simple_form_bulma.rb'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: symmetrical, new_line, same_line
Layout/MultilineArrayBraceLayout:
Exclude:
- 'app/lib/messenger.rb'
- 'app/models/software_feedback.rb'
- 'db/seeds.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: symmetrical, new_line, same_line
Layout/MultilineHashBraceLayout:
Exclude:
- 'spec/blueprints/contribution_blueprint_spec.rb'

# Offense count: 11
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
Expand Down
3 changes: 2 additions & 1 deletion app/lib/messenger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ class Messenger
attr_reader :email, :identifier

def self.delivery_statuses
%i[sent
%i[
sent
connected
undeliverable
error
Expand Down
15 changes: 8 additions & 7 deletions config/initializers/simple_form_bulma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -584,13 +584,14 @@ def input_type
class DatePickerInput < SimpleForm::Inputs::StringInput
def input
value = @builder.object.send(attribute_name)
input_html_options[:value] = case value
when Date, Time, DateTime
format = options[:format] || :medium
value.to_s(format)
else
value.to_s
end
input_html_options[:value] =
case value
when Date, Time, DateTime
format = options[:format] || :medium
value.to_s(format)
else
value.to_s
end

input_html_options[:class] ||= []
input_html_options[:class] << 'date_picker_input'
Expand Down

0 comments on commit c945cfb

Please sign in to comment.