ximex/ris-bka

View on GitHub

Showing 230 of 230 total issues

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

      }, {
        localName: 'Nutzdaten',
        typeName: null,
        propertyInfos: [{
            name: 'fnen',
Severity: Major
Found in mappings/RISDok.js and 2 other locations - About 1 hr to fix
mappings/OGD_DocumentResponse.js on lines 3560..3577
mappings/RISJudikaturNutzdaten.js on lines 7535..7552

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 69.

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 9 locations. Consider refactoring.
Open

      }, {
        localName: 'Betraglistetgue',
        typeName: null,
        propertyInfos: [{
            name: 'listelem',
Severity: Major
Found in mappings/RISJudikaturNutzdaten.js and 8 other locations - About 1 hr to fix
mappings/OGD_DocumentResponse.js on lines 3782..3799
mappings/OGD_DocumentResponse.js on lines 6254..6271
mappings/OGD_DocumentResponse.js on lines 6296..6313
mappings/RISDok.js on lines 2539..2556
mappings/RISDok.js on lines 6505..6522
mappings/RISDok.js on lines 7742..7759
mappings/RISJudikaturNutzdaten.js on lines 369..386
mappings/RISJudikaturNutzdaten.js on lines 7267..7284

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 69.

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

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

      }, {
        localName: 'Nutzdaten',
        typeName: null,
        propertyInfos: [{
            name: 'fnen',
Severity: Major
Found in mappings/RISJudikaturNutzdaten.js and 2 other locations - About 1 hr to fix
mappings/OGD_DocumentResponse.js on lines 3560..3577
mappings/RISDok.js on lines 3639..3656

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 69.

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 9 locations. Consider refactoring.
Open

      }, {
        localName: 'Fnen',
        typeName: null,
        propertyInfos: [{
            name: 'fntext',
Severity: Major
Found in mappings/OGD_DocumentResponse.js and 8 other locations - About 1 hr to fix
mappings/OGD_DocumentResponse.js on lines 3782..3799
mappings/OGD_DocumentResponse.js on lines 6296..6313
mappings/RISDok.js on lines 2539..2556
mappings/RISDok.js on lines 6505..6522
mappings/RISDok.js on lines 7742..7759
mappings/RISJudikaturNutzdaten.js on lines 136..153
mappings/RISJudikaturNutzdaten.js on lines 369..386
mappings/RISJudikaturNutzdaten.js on lines 7267..7284

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 69.

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 9 locations. Consider refactoring.
Open

      }, {
        localName: 'Betraglistetgue',
        typeName: null,
        propertyInfos: [{
            name: 'listelem',
Severity: Major
Found in mappings/RISDok.js and 8 other locations - About 1 hr to fix
mappings/OGD_DocumentResponse.js on lines 3782..3799
mappings/OGD_DocumentResponse.js on lines 6254..6271
mappings/OGD_DocumentResponse.js on lines 6296..6313
mappings/RISDok.js on lines 2539..2556
mappings/RISDok.js on lines 7742..7759
mappings/RISJudikaturNutzdaten.js on lines 136..153
mappings/RISJudikaturNutzdaten.js on lines 369..386
mappings/RISJudikaturNutzdaten.js on lines 7267..7284

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 69.

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 9 locations. Consider refactoring.
Open

      }, {
        localName: 'Betragliste',
        typeName: null,
        propertyInfos: [{
            name: 'listelem',
Severity: Major
Found in mappings/RISDok.js and 8 other locations - About 1 hr to fix
mappings/OGD_DocumentResponse.js on lines 3782..3799
mappings/OGD_DocumentResponse.js on lines 6254..6271
mappings/OGD_DocumentResponse.js on lines 6296..6313
mappings/RISDok.js on lines 2539..2556
mappings/RISDok.js on lines 6505..6522
mappings/RISJudikaturNutzdaten.js on lines 136..153
mappings/RISJudikaturNutzdaten.js on lines 369..386
mappings/RISJudikaturNutzdaten.js on lines 7267..7284

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 69.

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 9 locations. Consider refactoring.
Open

      }, {
        localName: 'Betragliste',
        typeName: null,
        propertyInfos: [{
            name: 'listelem',
Severity: Major
Found in mappings/OGD_DocumentResponse.js and 8 other locations - About 1 hr to fix
mappings/OGD_DocumentResponse.js on lines 3782..3799
mappings/OGD_DocumentResponse.js on lines 6254..6271
mappings/RISDok.js on lines 2539..2556
mappings/RISDok.js on lines 6505..6522
mappings/RISDok.js on lines 7742..7759
mappings/RISJudikaturNutzdaten.js on lines 136..153
mappings/RISJudikaturNutzdaten.js on lines 369..386
mappings/RISJudikaturNutzdaten.js on lines 7267..7284

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 69.

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 exports has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function (query, cbOk, cbFail) {

  SOAPRequest(function (PARAMS) {
    let jsonQuery = mapQuery(query);

Severity: Minor
Found in lib/searchDocuments.js - About 1 hr to fix

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

          }, {
            localName: 'Br',
            typeName: null,
            propertyInfos: [{
                name: 'clazz',
    Severity: Major
    Found in mappings/OGD_DocumentResponse.js and 2 other locations - About 1 hr to fix
    mappings/RISDok.js on lines 6762..6778
    mappings/RISJudikaturNutzdaten.js on lines 1795..1811

    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 64.

    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

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

          }, {
            localName: 'Br',
            typeName: null,
            propertyInfos: [{
                name: 'clazz',
    Severity: Major
    Found in mappings/RISDok.js and 2 other locations - About 1 hr to fix
    mappings/OGD_DocumentResponse.js on lines 6554..6570
    mappings/RISJudikaturNutzdaten.js on lines 1795..1811

    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 64.

    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

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

          }, {
            localName: 'Br',
            typeName: null,
            propertyInfos: [{
                name: 'clazz',
    Severity: Major
    Found in mappings/RISJudikaturNutzdaten.js and 2 other locations - About 1 hr to fix
    mappings/OGD_DocumentResponse.js on lines 6554..6570
    mappings/RISDok.js on lines 6762..6778

    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 64.

    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 exports has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    module.exports = function (error, response, body, callback) {
      let err = null;
      let soapBody = null;
      let raw = {
        error: error,
    Severity: Minor
    Found in lib/SOAPResponse.js - About 1 hr to fix

      Function exports has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      module.exports = function (docId, cbOk, cbFail) {
      
        SOAPRequest(function (PARAMS) {
          let action = '<getDocument xmlns="http://ogd.bka.gv.at/"><application>' + PARAMS.APPLICATION + '</application>' +
            '<docId>' + docId + '</docId></getDocument>';
      Severity: Minor
      Found in lib/getDocument.js - About 1 hr to fix

        Function exports has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
        Open

        module.exports = function (error, response, body, callback) {
          let err = null;
          let soapBody = null;
          let raw = {
            error: error,
        Severity: Minor
        Found in lib/SOAPResponse.js - About 55 mins 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 2 locations. Consider refactoring.
        Open

            typeInfos: [{
                localName: 'Subcode',
                typeName: 'subcode',
                propertyInfos: [{
                    name: 'value',
        Severity: Minor
        Found in mappings/SOAP_Envelope.js and 1 other location - About 50 mins to fix
        mappings/SOAP_Envelope.js on lines 102..114

        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 52.

        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

              }, {
                localName: 'Faultcode',
                typeName: 'faultcode',
                propertyInfos: [{
                    name: 'value',
        Severity: Minor
        Found in mappings/SOAP_Envelope.js and 1 other location - About 50 mins to fix
        mappings/SOAP_Envelope.js on lines 5..17

        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 52.

        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 4 locations. Consider refactoring.
        Open

            if (query.section.number.start) {
              jsonQuery.value.abschnitt.nummerVon = query.section.number.start;
            }
        Severity: Major
        Found in lib/searchDocuments.js and 3 other locations - About 45 mins to fix
        lib/searchDocuments.js on lines 107..109
        lib/searchDocuments.js on lines 110..112
        lib/searchDocuments.js on lines 113..115

        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 50.

        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 4 locations. Consider refactoring.
        Open

            if (query.section.character.end) {
              jsonQuery.value.abschnitt.buchstabeBis = query.section.character.end;
            }
        Severity: Major
        Found in lib/searchDocuments.js and 3 other locations - About 45 mins to fix
        lib/searchDocuments.js on lines 104..106
        lib/searchDocuments.js on lines 107..109
        lib/searchDocuments.js on lines 110..112

        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 50.

        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 4 locations. Consider refactoring.
        Open

            if (query.section.number.end) {
              jsonQuery.value.abschnitt.nummerBis = query.section.number.end;
            }
        Severity: Major
        Found in lib/searchDocuments.js and 3 other locations - About 45 mins to fix
        lib/searchDocuments.js on lines 104..106
        lib/searchDocuments.js on lines 110..112
        lib/searchDocuments.js on lines 113..115

        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 50.

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

        function parseSearchExpression (searchObject) {
          if (typeof(searchObject) === 'string') {
            return {
              TYPE_NAME: 'OGD_Request.TermSearchExpression',
              value: searchObject
        Severity: Minor
        Found in lib/searchDocuments.js - About 45 mins 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