Skip to content

Commit

Permalink
[ci][frontend] Apply Layout/SpaceAroundOperators cop
Browse files Browse the repository at this point in the history
Updated via rubocop's --auto-correct
  • Loading branch information
bgeuken committed Oct 12, 2017
1 parent a50b4ed commit 9237238
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 20 deletions.
13 changes: 0 additions & 13 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -286,19 +286,6 @@ Layout/SpaceAroundKeyword:
Exclude:
- 'src/api/app/views/person/userinfo.xml.builder'

# Offense count: 8
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment.
Layout/SpaceAroundOperators:
Exclude:
- 'src/api/app/views/attribute/attribute_definition.xml.builder'
- 'src/api/app/views/attribute/namespace_definition.xml.builder'
- 'src/api/app/views/models/_project.xml.builder'
- 'src/api/app/views/person/tokenlist.xml.builder'
- 'src/api/app/views/search/missing_owner.xml.builder'
- 'src/api/app/views/search/owner.xml.builder'
- 'src/api/app/views/webui/feeds/commits.atom.builder'

# Offense count: 68
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ xml.definition(p) do |attr|
abies = @at.attrib_type_modifiable_bies.includes(:user, :group, :role)
if abies.length > 0
abies.each do |mod_rule|
p={}
p = {}
p[:user] = mod_rule.user.login if mod_rule.user
p[:group] = mod_rule.group.title if mod_rule.group
p[:role] = mod_rule.role.title if mod_rule.role
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ abies = @an.attrib_namespace_modifiable_bies.includes([:user, :group])
if abies.length > 0
xml.namespace(:name => @an.name) do |an|
abies.each do |mod_rule|
p={}
p = {}
p[:user] = mod_rule.user.login if mod_rule.user
p[:group] = mod_rule.group.title if mod_rule.group
an.modifiable_by(p)
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/views/models/_project.xml.builder
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ xml.project(project_attributes) do
end
repo.path_elements.includes(:link).each do |pe|
if pe.link.remote_project_name.present?
project_name = pe.link.project.name+":"+pe.link.remote_project_name
project_name = pe.link.project.name + ":" + pe.link.remote_project_name
else
project_name = pe.link.project.name
end
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/views/person/tokenlist.xml.builder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
xml.directory(count: @list.length) do |dir|
@list.each do |token|
p={ :id => token.id, :string => token.string }
p = { :id => token.id, :string => token.string }
if token.package
p[:project] = token.package.project.name
p[:package] = token.package.name
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/views/search/missing_owner.xml.builder
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
xml.collection do
@owners.each do |o|

attribs={}
attribs = {}
attribs[:rootproject] = o[:rootproject]
attribs[:project] = o[:project]
attribs[:package] = o[:package] if o[:package]
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/views/search/owner.xml.builder
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
xml.collection do
@owners.each do |o|

attribs={}
attribs = {}
attribs[:rootproject] = o[:rootproject]
attribs[:project] = o[:project]
attribs[:package] = o[:package] if o[:package]
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/views/webui/feeds/commits.atom.builder
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ xml.feed(feed_opts) do |feed|
div.dl do |dl|
dl.dt "Package"
dl.dd do |dd|
url = url_for(:only_path => false, :controller => 'package', :action => 'rdiff', :project => @project.name,
url = url_for(:only_path => false, :controller => 'package', :action => 'rdiff', :project => @project.name,
:package => package, :rev => commit.additional_info['rev'], :linkrev => 'base')
dd.a package, href: url
end
Expand Down

0 comments on commit 9237238

Please sign in to comment.