Showing 189 of 197 total issues
Class AtomProperties
has 73 methods (exceeds 20 allowed). Consider refactoring. Open
class AtomProperties
include Modules::ListsComparer
include Modules::OrderProvider
include Lattices::BasicRelations
File atom_properties.rb
has 571 lines of code (exceeds 250 allowed). Consider refactoring. Open
module VersatileDiamond
using Patches::RichArray
using Patches::RichString
module Organizers
Class BaseContextProvider
has 57 methods (exceeds 20 allowed). Consider refactoring. Open
class BaseContextProvider
include Modules::ListsComparer
# @param [Units::Expressions::VarsDictionary] dict
# @param [Hash] nodes_graph
Class ContextBaseUnit
has 53 methods (exceeds 20 allowed). Consider refactoring. Open
class ContextBaseUnit < GenerableUnit
include Modules::ProcsReducer
include Modules::ListsComparer
extend Forwardable
Class DependentWrappedSpec
has 53 methods (exceeds 20 allowed). Consider refactoring. Open
class DependentWrappedSpec < DependentSpec
include MinuendSpec
# TODO: own there objects that described below are not used
collector_methods :there, :child
Class Specie
has 52 methods (exceeds 20 allowed). Consider refactoring. Open
class Specie < BaseSpecie
include Modules::SpecNameConverter
include SpeciesUser
include ReactionsUser
extend Forwardable
Method convert_rate
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
def convert_rate(value, gases_num, dimension = nil)
return 0 if value == 0
dimension ||= @rate
syntax_error('.is_not_set') unless dimension
- Read upRead up
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
Class AtomClassifier
has 43 methods (exceeds 20 allowed). Consider refactoring. Open
class AtomClassifier
# Initialize a classifier by empty sets of properties
# @param [Array] danglings the list of termination species
def initialize(danglings = [])
Class EngineCode
has 40 methods (exceeds 20 allowed). Consider refactoring. Open
class EngineCode < Base
MAIN_CODE_INST_NAMES =
%w(atom_builder config env finder handbook names rates_reader).freeze
Class BasePureUnit
has 39 methods (exceeds 20 allowed). Consider refactoring. Open
class BasePureUnit < GenerableUnit
include Modules::OrderProvider
include Modules::ProcsReducer
attr_reader :nodes
Method initialize
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
def initialize(g1, g2, comparer: nil, bonds_checker: nil, &block)
@g1, @g2 = g1, g2
comparer ||= -> _, _, v, w { v.same?(w) }
- Read upRead up
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 context_base_unit.rb
has 363 lines of code (exceeds 250 allowed). Consider refactoring. Open
module VersatileDiamond
using Patches::RichArray
module Generators
module Code
Class ContextSpecieUnit
has 35 methods (exceeds 20 allowed). Consider refactoring. Open
class ContextSpecieUnit < ContextBaseUnit
# @param [Array] _
def initialize(*)
super
Class ChunksCombiner
has 33 methods (exceeds 20 allowed). Consider refactoring. Open
class ChunksCombiner
include Mcs::SpecsAtomsComparator
include Modules::ExtendedCombinator
include Modules::ListsComparer
Class BaseGroupedNodes
has 31 methods (exceeds 20 allowed). Consider refactoring. Open
class BaseGroupedNodes
include Modules::ExtendedCombinator
include Modules::GraphDupper
include Modules::ListsComparer
extend Forwardable
Class SpecificSpec
has 31 methods (exceeds 20 allowed). Consider refactoring. Open
class SpecificSpec
include Modules::RelationBetweenChecker
include Modules::GraphDupper
include BondsCounter
extend Forwardable
Class Reaction
has 31 methods (exceeds 20 allowed). Consider refactoring. Open
class Reaction < UbiquitousReaction
include Modules::GraphDupper
include Modules::SpecAtomSwapper
include Linker
include SurfaceLinker
File chunks_combiner.rb
has 326 lines of code (exceeds 250 allowed). Consider refactoring. Open
module VersatileDiamond
using Patches::RichArray
module Organizers
Method to_s
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def to_s
return @_to_s if @_to_s
name = atom_name.to_s
- Read upRead up
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
Class Spec
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
class Spec < Named
include Modules::RelationBetweenChecker
include AtomsSwapper
include BondsCounter
include Linker