Apply manual rubocop fixes

This commit is contained in:
Sebastian Serth
2021-05-14 11:07:11 +02:00
parent 6cbecb5b39
commit da0a682ffb
109 changed files with 431 additions and 416 deletions

View File

@ -23,7 +23,7 @@ class FlowrController < ApplicationController
# for each error get all attributes, filter out uninteresting ones, and build a query
insights = errors.map do |error|
attributes = error.structured_error_attributes.select do |attribute|
is_interesting(attribute) and attribute.match
interesting?(attribute) and attribute.match
end
# once the programming language model becomes available, the language name can be added to the query to
# produce more relevant results
@ -35,8 +35,8 @@ class FlowrController < ApplicationController
render json: insights, status: :ok
end
def is_interesting(attribute)
attribute.error_template_attribute.key.index(/error message|error type/i) != nil
def interesting?(attribute)
!attribute.error_template_attribute.key.index(/error message|error type/i).nil?
end
private :is_interesting
private :interesting?
end