KarrLab/datanator

View on GitHub

Showing 791 of 791 total issues

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        if i==14:
            entity["identifiers"].append({"namespace": "gene_symbol",
                                          "value":"K-"+"\u03B1"+"-1"})
        else:
            entity["identifiers"].append({"namespace": "gene_symbol",
datanator/data_source/protein_half_lives/victoria_parse_proteome_half_lives.py on lines 46..51
datanator/data_source/protein_half_lives/victoria_parse_proteome_half_lives.py on lines 83..88

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        if i==39:
            entity["identifiers"].append({"namespace": "gene_symbol",
                                          "value":"K-"+"\u03B1"+"-1"})
        else:
            entity["identifiers"].append({"namespace": "gene_symbol",
datanator/data_source/protein_half_lives/victoria_parse_proteome_half_lives.py on lines 83..88
datanator/data_source/protein_half_lives/victoria_parse_proteome_half_lives.py on lines 217..222

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

File victoria_parse_proteome_half_lives.py has 354 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import pandas as pd
from pymongo import MongoClient
from datanator_query_python.util import mongo_util
from datanator_query_python.config import config

    Function create_kinetic_law_from_sbml has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
    Open

        def create_kinetic_law_from_sbml(self, id, sbml, specie_properties, functions, units):
            """ Add a kinetic law to the local sqlite database
    
            Args:
                id (:obj:`int`): identifier
    Severity: Minor
    Found in datanator/data_source/sabio_rk.py - About 4 hrs to fix

    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

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

                if field_name == '#name':
                    entry['species_name'] = species_name
                else:
                    print('Error found, see reports.txt')
                    self.report.write(
    Severity: Major
    Found in datanator/data_source/pax_nosql.py and 5 other locations - About 4 hrs to fix
    datanator/data_source/pax_nosql.py on lines 129..136
    datanator/data_source/pax_nosql.py on lines 146..153
    datanator/data_source/pax_nosql.py on lines 161..168
    datanator/data_source/pax_nosql.py on lines 176..183
    datanator/data_source/pax_nosql.py on lines 191..198

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 78.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

                if field_name == '#description':
                    entry['publication'] = publication
                else:
                    print('Error found, see reports.txt')
                    self.report.write('Warning: invalid #description field, excluding file form DB (file_id=' +
    Severity: Major
    Found in datanator/data_source/pax_nosql.py and 5 other locations - About 4 hrs to fix
    datanator/data_source/pax_nosql.py on lines 115..122
    datanator/data_source/pax_nosql.py on lines 129..136
    datanator/data_source/pax_nosql.py on lines 146..153
    datanator/data_source/pax_nosql.py on lines 176..183
    datanator/data_source/pax_nosql.py on lines 191..198

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 78.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

                if field_name == '#weight':
                    entry['weight'] = weight
                else:
                    print('Error found, see reports.txt')
                    self.report.write('Warning: invalid #weight field, excluding file form DB (file_id=' +
    Severity: Major
    Found in datanator/data_source/pax_nosql.py and 5 other locations - About 4 hrs to fix
    datanator/data_source/pax_nosql.py on lines 115..122
    datanator/data_source/pax_nosql.py on lines 129..136
    datanator/data_source/pax_nosql.py on lines 161..168
    datanator/data_source/pax_nosql.py on lines 176..183
    datanator/data_source/pax_nosql.py on lines 191..198

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 78.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

                if field_name == '#coverage':
                    entry['coverage'] = coverage
                else:
                    print('Error found, see reports.txt')
                    self.report.write('Warning: invalid #coverage field, excluding file form DB (file_id=' +
    Severity: Major
    Found in datanator/data_source/pax_nosql.py and 5 other locations - About 4 hrs to fix
    datanator/data_source/pax_nosql.py on lines 115..122
    datanator/data_source/pax_nosql.py on lines 129..136
    datanator/data_source/pax_nosql.py on lines 146..153
    datanator/data_source/pax_nosql.py on lines 161..168
    datanator/data_source/pax_nosql.py on lines 176..183

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 78.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

                if field_name == '#organ':
                    entry['organ'] = organ
                else:
                    print('Error found, see reports.txt')
                    self.report.write(
    Severity: Major
    Found in datanator/data_source/pax_nosql.py and 5 other locations - About 4 hrs to fix
    datanator/data_source/pax_nosql.py on lines 115..122
    datanator/data_source/pax_nosql.py on lines 129..136
    datanator/data_source/pax_nosql.py on lines 146..153
    datanator/data_source/pax_nosql.py on lines 161..168
    datanator/data_source/pax_nosql.py on lines 191..198

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 78.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

                if field_name == '#score':
                    entry['score'] = score
                else:
                    print('Error found, see reports.txt')
                    self.report.write(
    Severity: Major
    Found in datanator/data_source/pax_nosql.py and 5 other locations - About 4 hrs to fix
    datanator/data_source/pax_nosql.py on lines 115..122
    datanator/data_source/pax_nosql.py on lines 146..153
    datanator/data_source/pax_nosql.py on lines 161..168
    datanator/data_source/pax_nosql.py on lines 176..183
    datanator/data_source/pax_nosql.py on lines 191..198

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 78.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

                        for protein in proteins:
                            self.uniprot_nosql_manager.load_uniprot(query=True, msg=protein.split('.')[0], species=[ncbi_id])
                            doc = self.uniprot_manager.get_info_by_entrez_id(org_gene_str.split(':')[1])
                            if doc is not None:
                                uniprot_id.append(doc)
    Severity: Major
    Found in datanator/data_source/gene_ortholog.py and 1 other location - About 4 hrs to fix
    datanator/data_source/gene_ortholog.py on lines 83..87

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 78.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

                    if isinstance(proteins, str):
                        self.uniprot_nosql_manager.load_uniprot(query=True, msg=proteins.split('.')[0], species=[ncbi_id])
                        doc = self.uniprot_manager.get_info_by_entrez_id(org_gene_str.split(':')[1])
                        if doc is not None:
                            uniprot_id.append(doc)                    
    Severity: Major
    Found in datanator/data_source/gene_ortholog.py and 1 other location - About 4 hrs to fix
    datanator/data_source/gene_ortholog.py on lines 89..93

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 78.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    File doi_10_1038_nchembio_2077.py has 347 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import pandas as pd
    import datetime
    from datanator_query_python.query import query_metabolites_meta
    from collections import deque
    import datanator.config.core

      Function infer_compound_structures_from_names has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
      Open

          def infer_compound_structures_from_names(self, compounds):
              """ Try to use PubChem to infer the structure of compounds from their names
      
              Notes: we don't try look up structures from their cross references because SABIO has already gathered
              all structures from their cross references to ChEBI, KEGG, and PubChem
      Severity: Minor
      Found in datanator/data_source/sabio_rk.py - About 4 hrs to fix

      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 add_inchi_hash has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
      Open

          def add_inchi_hash(self, ids=None):
              '''
                  Add inchi key values of _value_inchi in sabio_rk collection
              '''
              
      Severity: Minor
      Found in datanator/data_source/sabio_rk_json_mongo.py - About 4 hrs to fix

      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 build_obs has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
      Open

          def build_obs(self, obj):
              """Build observation objects from obj.
              Go into observations collection.
      
              Args:
      Severity: Minor
      Found in datanator/schema_2/transform_metabolites_meta.py - About 4 hrs to fix

      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

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

                  if data.iloc[i,7] != None:
                          d["entity"]["synonyms"]=str(data.iloc[i,7]).split(",")
                  else:
                      d["entity"]["synonyms"]=[]
      datanator/data_source/protein_localization/parse_psortdb_experimental.py on lines 66..69
      datanator/data_source/protein_localization/parse_psortdb_experimental.py on lines 70..73

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 77.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

                  if data.iloc[i,3] != None:
                      d["value"]["experimental_localization"] = str(data.iloc[i,3]).split(",")
                  else:
                      d["value"]["experimental_localization"] = []
      datanator/data_source/protein_localization/parse_psortdb_experimental.py on lines 45..48
      datanator/data_source/protein_localization/parse_psortdb_experimental.py on lines 70..73

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 77.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

                  if data.iloc[i,4] != None:
                      d["value"]["secondary_localizaton"] = str(data.iloc[i,4]).split(",")
                  else:
                      d["value"]["secondary_localizaton"] = []
      datanator/data_source/protein_localization/parse_psortdb_experimental.py on lines 45..48
      datanator/data_source/protein_localization/parse_psortdb_experimental.py on lines 66..69

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 77.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Function _run_trna has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
      Open

          def _run_trna(self, session, modomics_short_code_to_monomer, monomer_codes, out_filename):
              response = session.get(self.ENDPOINT, params={
                  'RNA_type': 'tRNA',
                  'RNA_subtype': 'all',
                  'organism': 'all species',
      Severity: Minor
      Found in datanator/data_source/modomics.py - About 4 hrs to fix

      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

      Severity
      Category
      Status
      Source
      Language