]> git.openstreetmap.org Git - rails.git/commitdiff
erblint: remove leading blank lines
authorTom Hughes <tom@compton.nu>
Thu, 28 Mar 2019 00:29:04 +0000 (00:29 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 28 Mar 2019 00:29:04 +0000 (00:29 +0000)
.erb-lint.yml
app/views/browse/_common_details.html.erb
app/views/browse/_containing_relation.html.erb
app/views/browse/_relation_member.html.erb
app/views/browse/changeset.html.erb
app/views/changesets/_changeset.html.erb
app/views/changesets/history.html.erb
app/views/site/index.html.erb
app/views/users/_contact.html.erb
app/views/users/show.html.erb

index 3cca0301cf8317bf42c610eae2aaef6b17390c88..ed5fe48af5dac678e35c66a8070c22f5772b6c5b 100644 (file)
@@ -25,7 +25,5 @@ linters:
         Enabled: false
       Rails/OutputSafety:
         Enabled: false
-      Layout/LeadingBlankLines:
-        Enabled: false # TODO
 exclude:
   - '**/vendor/**'
index 3f235959974cfec95fb86790657626318036459f..44bbe04f8c1ec408e50e24c0092bc8a1892e9ff7 100644 (file)
@@ -7,12 +7,10 @@
 </h4>
 
 <div class="details">
-  <%=
-      t "browse.#{common_details.visible? ? :edited : :deleted}_by_html",
+  <%= t "browse.#{common_details.visible? ? :edited : :deleted}_by_html",
         :time => distance_of_time_in_words_to_now(common_details.timestamp),
         :user => changeset_user_link(common_details.changeset),
-        :title => l(common_details.timestamp)
-  %>
+        :title => l(common_details.timestamp) %>
 </div>
 
 <div class="details">
index 1dca0c26ee3de7ef23efff21238339a60da90a2e..b3cb90cec2aa4a7d05b705c1c2745b6f59237a23 100644 (file)
@@ -1,9 +1,7 @@
-<li><%=
-  linked_name = link_to h(printable_name(containing_relation.relation)), :action => "relation", :id => containing_relation.relation.id.to_s
-  if containing_relation.member_role.blank?
-    raw t ".entry", :relation_name => linked_name
-  else
-    raw t ".entry_role", :relation_name => linked_name, :relation_role => h(containing_relation.member_role)
-  end
-    %>
+<li><%= linked_name = link_to h(printable_name(containing_relation.relation)), :action => "relation", :id => containing_relation.relation.id.to_s
+        if containing_relation.member_role.blank?
+          raw t ".entry", :relation_name => linked_name
+        else
+          raw t ".entry_role", :relation_name => linked_name, :relation_role => h(containing_relation.member_role)
+        end %>
 </li>
index a707c3ba13b86950924358e3a814c05ced1bf8a2..bb37bdf210a5c7ee89ee6c792e9e01a37af474c2 100644 (file)
@@ -1,14 +1,10 @@
-<%
-  member_class = link_class(relation_member.member_type.downcase, relation_member.member)
-  linked_name = link_to printable_name(relation_member.member), { :action => relation_member.member_type.downcase, :id => relation_member.member_id.to_s }, { :title => link_title(relation_member.member), :rel => link_follow(relation_member.member) }
-  type_str = t ".type." + relation_member.member_type.downcase
-%>
+<% member_class = link_class(relation_member.member_type.downcase, relation_member.member)
+   linked_name = link_to printable_name(relation_member.member), { :action => relation_member.member_type.downcase, :id => relation_member.member_id.to_s }, { :title => link_title(relation_member.member), :rel => link_follow(relation_member.member) }
+   type_str = t ".type." + relation_member.member_type.downcase %>
 <li class="<%= member_class %>">
-  <%=
-    if relation_member.member_role.blank?
-      raw t ".entry", :type => type_str, :name => linked_name
-    else
-      raw t ".entry_role", :type => type_str, :name => linked_name, :role => h(relation_member.member_role)
-    end
-  %>
+  <%= if relation_member.member_role.blank?
+        raw t ".entry", :type => type_str, :name => linked_name
+      else
+        raw t ".entry_role", :type => type_str, :name => linked_name, :role => h(relation_member.member_role)
+      end %>
 </li>
index f39d8263ff9cc8a45a0be04db4c4465382fac199..0ec89da9dae330b257c4b1fc15adb81c08bb88df 100644 (file)
       <%= link_to "<< #{@prev_by_user.id}", :id => @prev_by_user.id %>
       &middot;
     <% end %>
-    <%=
-        user = (@prev_by_user || @next_by_user).user.display_name
-        link_to content_tag(:bdi, user), :controller => "changesets", :action => "index", :display_name => user
-    %>
+    <%= user = (@prev_by_user || @next_by_user).user.display_name
+        link_to content_tag(:bdi, user), :controller => "changesets", :action => "index", :display_name => user %>
     <% if @next_by_user %>
       &middot;
       <%= link_to "#{@next_by_user.id} >>", :id => @next_by_user.id %>
index e4d229f9a74c9963de3f671e225903edbbaebf9a..56726e2d9a51eee471f8e503cad51dc43fb762de 100644 (file)
@@ -1,5 +1,4 @@
-<%
-   changeset_data = { :id => changeset.id }
+<% changeset_data = { :id => changeset.id }
 
    if changeset.has_valid_bbox?
      bbox = changeset.bbox.to_unscaled
@@ -9,8 +8,7 @@
        :maxlon => bbox.max_lon,
        :maxlat => bbox.max_lat
      }
-   end
-%>
+   end %>
 
 <%= content_tag "li", :id => "changeset_#{changeset.id}", :data => { :changeset => changeset_data } do %>
   <h4>
index 55a137f5954986e683f994618d28fd66ed9863b6..e3df87490379368f9eb051780c19ad1463d72b20 100644 (file)
@@ -4,14 +4,12 @@
   <% end -%>
 <% end -%>
 
-<%
-   set_title(changeset_index_title(params, current_user))
+<% set_title(changeset_index_title(params, current_user))
    @heading = if params[:display_name]
                 t("changesets.index.title_user", :user => link_to(params[:display_name], user_path(:display_name => params[:display_name]))).html_safe
               else
                 @title
-              end
-%>
+              end %>
 
 <h2>
   <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
index 6e3f69a7dcecd393b7c6d079e3e8a3e39dfc677c..aaf24ac1a48529b350869f62e62848050ef04cab 100644 (file)
@@ -1,4 +1,2 @@
-<%
-   set_title
-   content_for(:content_class) { "overlay-sidebar" }
-%>
+<% set_title
+   content_for(:content_class) { "overlay-sidebar" } %>
index d75e717add7245350857ac63c9109f1fa3daafcb..9950da0f8f7600479590bc325ef1ae914cc00611 100644 (file)
@@ -1,11 +1,9 @@
-<%
-   user_data = {
+<% user_data = {
      :lon => contact.home_lon,
      :lat => contact.home_lat,
      :icon => image_path(type == "friend" ? "marker-blue.png" : "marker-green.png"),
      :description => render(:partial => "popup", :object => contact, :locals => { :type => type })
-   }
-%>
+   } %>
 <%= content_tag :div, :class => "contact-activity clearfix", :data => { :user => user_data } do %>
   <%= user_thumbnail contact %>
   <div class='activity-details'>
index 28dc07e0d2f4366bb50a648a173963ea7c8d0254..5090cbee07a2e90284e033221c94a594f8ba3d4a 100644 (file)
       <% content_for :head do %>
         <%= javascript_include_tag "user" %>
       <% end %>
-      <%
-        user_data = {
-          :lon => current_user.home_lon,
-          :lat => current_user.home_lat,
-          :icon => image_path("marker-red.png"),
-          :description => render(:partial => "popup", :object => current_user, :locals => { :type => "your location" })
-        }
-      %>
+      <% user_data = {
+           :lon => current_user.home_lon,
+           :lat => current_user.home_lat,
+           :icon => image_path("marker-red.png"),
+           :description => render(:partial => "popup", :object => current_user, :locals => { :type => "your location" })
+         } %>
       <%= content_tag "div", "", :id => "map", :class => "content_map", :data => { :user => user_data } %>
     <% end %>