Skip to content

Commit

Permalink
Fix cops for suggestion search
Browse files Browse the repository at this point in the history
  • Loading branch information
beque committed Feb 8, 2023
1 parent ac6694b commit ef72030
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/api/chemotion/suggestion_api.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

# rubocop:disable Metrics/BlockLength, Metrics/ClassLength

module Chemotion
# Input suggestion for free text search
class SuggestionAPI < Grape::API
Expand All @@ -25,7 +27,9 @@ def search_possibilities_to_suggestions(search_possibilities)
suggestions
end

# rubocop:disable Metrics/MethodLength, Metrics/BlockLength, Metrics/AbcSize, Metrics/ClassLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity, Lint/AmbiguousOperatorPrecedence, Style/TrailingCommaInHashLiteral, Layout/LineLength
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity

# rubocop:disable Lint/AmbiguousOperatorPrecedence, Style/TrailingCommaInHashLiteral, Layout/LineLength

def search_possibilities_by_type_user_and_collection(type)
collection_id = @c_id
Expand Down Expand Up @@ -168,7 +172,8 @@ def search_possibilities_by_type_user_and_collection(type)
end
end
end
# rubocop:enable Metrics/MethodLength, Metrics/BlockLength, Metrics/AbcSize, Metrics/ClassLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity, Lint/AmbiguousOperatorPrecedence, Style/TrailingCommaInHashLiteral, Layout/LineLength
# rubocop:enable Lint/AmbiguousOperatorPrecedence, Style/TrailingCommaInHashLiteral, Layout/LineLength
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity

resource :suggestions do
after_validation do
Expand All @@ -189,3 +194,4 @@ def search_possibilities_by_type_user_and_collection(type)
end
end
end
# rubocop:enable Metrics/BlockLength, Metrics/ClassLength

0 comments on commit ef72030

Please sign in to comment.