Showing 211 of 594 total issues
Header
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
export default class Header extends React.Component {
static defaultProps = {
showLogin: true,
openLoginOnLoad: false,
logoLinkPath: DiscoverPath,
- Create a ticketCreate a ticket
Method augment_with_clearbit
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def augment_with_clearbit(founder)
response = Http::Clearbit.new(founder, founder.primary_company).enhance
return unless response&.person.present?
founder.city = response.person.geo.city if founder.city.blank?
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function componentDidMount
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
componentDidMount() {
if (this.props.item.id) {
if (this.history) {
let tab = document.location.hash && parseInt(document.location.hash.substr(1), 10);
if (!this.props.item.partners || tab >= this.props.item.partners.length) {
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File founder.rb
has 286 lines of code (exceeds 250 allowed). Consider refactoring. Open
class Founder < ApplicationRecord
include Concerns::Cacheable
include Concerns::TimeZonable
include Concerns::Eventable
include Concerns::Locationable
- Create a ticketCreate a ticket
Class Pitch
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
class Pitch < ApplicationRecord
include Concerns::Cacheable
SNAPSHOT_DEADLINE = 2.days
- Create a ticketCreate a ticket
Class VCWizController
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
class External::VCWiz::VCWizController < External::FrontendController
include External::Concerns::Filterable
include External::Concerns::Sortable
include External::Concerns::Censorable
- Create a ticketCreate a ticket
Method crawl_posts!
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def crawl_posts!
new_posts = fetch_posts!
existing = Set.new Post.where(url: new_posts.map { |p| p[:url] }).pluck(:url)
new_posts.reject { |p| existing.include? p[:url] }.each do |meta|
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method populate_from_cb!
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def populate_from_cb!
person = crunchbase_person
return unless person.present? && person.found?
self.photo = person.image
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method perform
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def perform
Team.for_each do |team|
pending = team.companies.undecided.where('pitches.when <= ?', Date.today.in_time_zone(team.time_zone)).distinct
pending.each do |company|
next unless company.pitch.votes.present?
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File company.rb
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
class Company < ActiveRecord::Base
include Concerns::Cacheable
include ActionView::Helpers::NumberHelper
include Concerns::AttributeArrayable
include Concerns::Domainable
- Create a ticketCreate a ticket
ImportInvestorsModal
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
@hasModalErrorBoundary
export default class ImportInvestorsModal extends React.Component {
state = {
stage: Stage.START,
id: null,
- Create a ticketCreate a ticket
Class Message
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class Message
INTERESTED_PRHASES = [
'love the opportunity',
'move forward',
'allocation',
- Create a ticketCreate a ticket
Class InvestorsController
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class External::Api::V1::InvestorsController < External::Api::V1::ApiV1Controller
include External::Concerns::Censorable
include External::ApplicationHelper
LIMIT = 10
- Create a ticketCreate a ticket
File header.jsx
has 270 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import {
Badge,
Button,
Colors,
- Create a ticketCreate a ticket
Method _filtered
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def _filtered
competitors = if params[:search].present?
Competitor.joins("INNER JOIN (#{_filtered_by_search_subquery(params[:search])}) AS searched ON competitors.id = searched.id")
else
Competitor.all
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
PartnerTab
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
export default class PartnerTab extends React.Component {
static defaultProps = {
fetch: true,
initiallyExpanded: false,
};
- Create a ticketCreate a ticket
Class Team
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
class Team < ApplicationRecord
include Concerns::Slackable
include Concerns::Cacheable
include ActionView::Helpers::NumberHelper
- Create a ticketCreate a ticket
FixedTable
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
export default class FixedTable extends React.Component {
static defaultProps = {
rowHeight: 80,
headerHeight: 50,
};
- Create a ticketCreate a ticket
Class Base
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
class Base
extend Concerns::Cacheable
include HTTParty
base_uri 'https://api.crunchbase.com/v3.1/'
- Create a ticketCreate a ticket
Method process_outgoing!
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def process_outgoing!(founder, skip_graph)
recipients.each do |addr|
founder.connect_to_addr!(addr, :email) if valid_connection?(addr) && !skip_graph
target = TargetInvestor.from_addr(founder, addr, create: true)
next unless target.present?
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"