Showing 310 of 310 total issues
Method parse
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def parse(user_agent_string) obj = user_agent_parser.parse(user_agent_string) a_browser = obj.to_s a_os = obj.os.to_s a_browser = "#{obj.name} #{obj.version && obj.version.major}".strip
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
def to_onboarding respond_to do |format| format.html { redirect_to '/onboarding' } format.json do data = { 'message' => 'Access Denied, visit /onboarding and complete your registration.' }
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
def to_root respond_to do |format| format.html { redirect_to '/' } format.json do data = { 'message' => 'Access Denied.' }
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
def create business = Business::Management::AddEmail.new(@credential) if @credential.save redirect_to hello.emails_path, notice: business.success_message else
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
def destroy business = Business::Management::RemoveEmail.new(@credential) if @credential.destroy redirect_to hello.emails_path, notice: business.success_message else
- Read upRead up
- Create a ticketCreate a ticket
Extra blank line detected. Open
dont_kick :user, only: [:cancel, :destroy]
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Missing magic comment # frozen_string_literal: true
. Open
module Hello
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Missing magic comment # frozen_string_literal: true
. Open
module Hello
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
@sign_up.errors[:base] << "Email Registration is temporarily disabled"
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Missing magic comment # frozen_string_literal: true
. Open
class CreateUsers < ActiveRecord::Migration
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Missing magic comment # frozen_string_literal: true
. Open
module User::Authorization
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Missing magic comment # frozen_string_literal: true
. Open
module Hello
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Extra empty line detected at module body end. Open
end
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Use %i
or %I
for an array of symbols. Open
before_action(only: [:show, :update]) do
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Missing magic comment # frozen_string_literal: true
. Open
module Hello
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Always use raise
to signal exceptions. Open
format.json { fail Hello::Errors::JsonNotSupported }
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Missing magic comment # frozen_string_literal: true
. Open
module Hello
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Missing magic comment # frozen_string_literal: true
. Open
require 'hello'
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
puts "Usage:".light_yellow
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Extra empty line detected at block body end. Open
end
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks