erblint: use parentheses for nested function calls

This commit is contained in:
Tom Hughes 2019-03-27 18:55:48 +00:00
parent 40141993f7
commit ecd81eadbe
10 changed files with 10 additions and 12 deletions

View file

@ -31,8 +31,6 @@ linters:
Enabled: false # TODO
Layout/LeadingBlankLines:
Enabled: false # TODO
Style/NestedParenthesizedCalls:
Enabled: false # TODO
Rails/LinkToBlank:
Enabled: false # TODO
Style/ConditionalAssignment:

View file

@ -1,4 +1,4 @@
<% set_title(t "browse.note.new_note") %>
<% set_title(t("browse.note.new_note")) %>
<h2>
<a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>

View file

@ -1,4 +1,4 @@
<% set_title(t ".title") %>
<% set_title(t(".title")) %>
<h2>
<a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>

View file

@ -7,7 +7,7 @@
<h2><%= link_to h(diary_entry.title), diary_entry_path(diary_entry.user, diary_entry) %></h2>
<small class='deemphasize'>
<%= raw(t ".posted_by", :link_user => (link_to h(diary_entry.user.display_name), user_path(diary_entry.user)), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to h(diary_entry.language.name), :controller => "diary_entries", :action => "index", :display_name => nil, :language => diary_entry.language_code)) %>
<%= raw(t(".posted_by", :link_user => (link_to h(diary_entry.user.display_name), user_path(diary_entry.user)), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to h(diary_entry.language.name), :controller => "diary_entries", :action => "index", :display_name => nil, :language => diary_entry.language_code))) %>
</small>
</div>

View file

@ -3,7 +3,7 @@
<%= t("site.sidebar.search_results") %>
</h2>
<% @sources.each do |source| %>
<h4 class="inner12"><%= raw(t ".title.#{source}") %></h4>
<h4 class="inner12"><%= raw(t(".title.#{source}")) %></h4>
<div class="search_results_entry" data-href="<%= url_for @params.merge(:action => "search_#{source}") %>">
<%= image_tag "searching.gif", :class => "loader" %>
</div>

View file

@ -24,5 +24,5 @@
</tbody>
</table>
<% else %>
<div><%= raw(t ".no_messages_yet", :people_mapping_nearby_link => link_to(t(".people_mapping_nearby"), user_path(current_user))) %></div>
<div><%= raw(t(".no_messages_yet", :people_mapping_nearby_link => link_to(t(".people_mapping_nearby"), user_path(current_user)))) %></div>
<% end %>

View file

@ -1,5 +1,5 @@
<% content_for :heading do %>
<h2><%= raw(t ".send_message_to", :name => link_to(h(@message.recipient.display_name), user_path(@message.recipient))) %></h2>
<h2><%= raw(t(".send_message_to", :name => link_to(h(@message.recipient.display_name), user_path(@message.recipient)))) %></h2>
<% end %>
<%= error_messages_for "message" %>

View file

@ -3,7 +3,7 @@
<% end %>
<% content_for :heading do %>
<h2><%= raw(t ".my_inbox", :inbox_link => link_to(t(".inbox"), inbox_messages_path)) %>/<%= t ".outbox" %></h2>
<h2><%= raw(t(".my_inbox", :inbox_link => link_to(t(".inbox"), inbox_messages_path))) %>/<%= t ".outbox" %></h2>
<% end %>
<h4><%= t ".messages", :count => current_user.sent_messages.size %></h4>
@ -23,5 +23,5 @@
</tbody>
</table>
<% else %>
<div class="messages"><%= raw(t ".no_sent_messages", :people_mapping_nearby_link => link_to(t(".people_mapping_nearby"), user_path(current_user))) %></div>
<div class="messages"><%= raw(t(".no_sent_messages", :people_mapping_nearby_link => link_to(t(".people_mapping_nearby"), user_path(current_user)))) %></div>
<% end %>

View file

@ -26,7 +26,7 @@
<%= f.email_field(:email_confirmation, :tabindex => 2) %>
<%= f.error_message_on(:email_confirmation) %>
</div>
<span class="form-help deemphasize"><%= raw(t ".not displayed publicly") %></span>
<span class="form-help deemphasize"><%= raw(t(".not displayed publicly")) %></span>
</fieldset>
<fieldset>

View file

@ -179,7 +179,7 @@
<% if current_user and @user.id == current_user.id %>
<% if @user.home_lat.nil? or @user.home_lon.nil? %>
<div id="map" class="content_map">
<p id="no_home_location"><%= raw(t ".if set location", :settings_link => (link_to t(".settings_link_text"), :controller => "users", :action => "account", :display_name => current_user.display_name)) %></p>
<p id="no_home_location"><%= raw(t(".if set location", :settings_link => (link_to t(".settings_link_text"), :controller => "users", :action => "account", :display_name => current_user.display_name))) %></p>
</div>
<% else %>
<% content_for :head do %>