Showing 670 of 670 total issues

Function getLink has 91 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  getLink(context: HtmlRR0SsgContext,
          people: People, pseudoPeopleList: People[], allCountries: Set<CountryCode>,
          occupations: Set<Occupation>, filterOccupations: Occupation[] = [], content?: string): HTMLElement {
    const dirName = people.dirName
    const titles = []
Severity: Major
Found in people/PeopleService.ts - About 3 hrs to fix

    Function drawGraph has 90 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    shallowNeuralNetworkGrapher.prototype.drawGraph = function () {
      var grapher = this;
      this.nodeRadius = 15;
      this.weightNodeWidthRatio = 1.7;
      // Let's calculate our coordinates for all the nodes
    Severity: Major
    Found in people/a/AlammarJay/js/shallow_nn_grapher.js - About 3 hrs to fix

      Function draw has 89 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          draw: function (layer, properties, activeRegionSVGGroup, layerInputs, tooltipDiv) {
            console.log("layer", layer)
            var data = layer.nodeRenderingDetails,
              containerElement = properties.containerElement
      
      
      Severity: Major
      Found in people/a/AlammarJay/js/nn_calc.js - About 3 hrs to fix

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

            test("default day of month title with handler", async () => {
              const command = new SsiTitleReplaceCommand([timeDefaultHandler])
              const context = rr0TestUtil.newHtmlContext("time/1/9/5/4/10/01/index.html",
                `This is about <!--#echo var="title" -->!`)
              await command.execute(context)
        Severity: Major
        Found in time/TitleReplaceCommand.test.ts and 2 other locations - About 3 hrs to fix
        time/TitleReplaceCommand.test.ts on lines 28..34
        time/TitleReplaceCommand.test.ts on lines 36..43

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

        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

            test("default title with handler", async () => {
              const command = new SsiTitleReplaceCommand([timeDefaultHandler])
              const context = rr0TestUtil.newHtmlContext("time/1/9/5/4/index.html", `This is about <!--#echo var="title" -->!`)
              await command.execute(context)
              expect(context.file.title).toBe("1954")
        Severity: Major
        Found in time/TitleReplaceCommand.test.ts and 2 other locations - About 3 hrs to fix
        time/TitleReplaceCommand.test.ts on lines 36..43
        time/TitleReplaceCommand.test.ts on lines 45..52

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

        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

            test("default month title with handler", async () => {
              const command = new SsiTitleReplaceCommand([timeDefaultHandler])
              const context = rr0TestUtil.newHtmlContext("time/1/9/5/4/10/index.html",
                `This is about <!--#echo var="title" -->!`)
              await command.execute(context)
        Severity: Major
        Found in time/TitleReplaceCommand.test.ts and 2 other locations - About 3 hrs to fix
        time/TitleReplaceCommand.test.ts on lines 28..34
        time/TitleReplaceCommand.test.ts on lines 45..52

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

        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

        TimeContext has 29 functions (exceeds 20 allowed). Consider refactoring.
        Open

        export class TimeContext {
        
          static readonly dateTimeRegexp = new RegExp(
            "^(~)?(-?\\d{3,})?(?:-?([0-1]\\d)(?!\:))?(?:-?([0-3]\\d{1,2}(?!\:)))?(?:[T ]?(?:([0-2]\\d):([0-5]\\d))?)?(?: ?([A-Z]{3}))?"
          )
        Severity: Minor
        Found in time/TimeContext.ts - About 3 hrs to fix

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

              test("with days, hours, minutes and seconds", async () => {
                const context = rr0TestUtil.newHtmlContext("time/1/9/9/0/08/index.html", "")
                const timeEl = context.file.document.createElement("time")
                timeEl.textContent = "P2D10H23M45S"
                const replacement = await replacer.replacement(context, timeEl)
          Severity: Major
          Found in time/TimeReplacer.test.ts and 2 other locations - About 3 hrs to fix
          time/TimeReplacer.test.ts on lines 197..204
          time/TimeReplacer.test.ts on lines 233..239

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

          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

              protected sortComparator(c1: SceauCaseSummary, c2: SceauCaseSummary): number {
                return !c1.time || c2.time && c1.time.isBefore(
                  c2.time) ? -1 : !c2.time || c1.time.isAfter(c2.time) ? 1 : 0
              }
          Severity: Major
          Found in time/datasource/sceau/SceauDatasource.test.ts and 1 other location - About 3 hrs to fix
          time/datasource/rr0/RR0Datasource.test.ts on lines 51..54

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

          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

            test("avoids linking to current file", async () => {
              const context = rr0TestUtil.newHtmlContext("time/1/9/9/0/08/index.html", "")
              const timeEl = context.file.document.createElement("time")
              timeEl.textContent = "1954-10-01"
              const replacement = await replacer.replacement(context, timeEl)
          Severity: Major
          Found in time/TimeReplacer.test.ts and 2 other locations - About 3 hrs to fix
          time/TimeReplacer.test.ts on lines 208..214
          time/TimeReplacer.test.ts on lines 233..239

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

          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

              protected sortComparator(c1: RR0CaseSummary, c2: RR0CaseSummary): number {
                return !c1.time || c2.time && c1.time.isBefore(
                  c2.time) ? -1 : !c2.time || c1.time.isAfter(c2.time) ? 1 : 0
              }
          Severity: Major
          Found in time/datasource/rr0/RR0Datasource.test.ts and 1 other location - About 3 hrs to fix
          time/datasource/sceau/SceauDatasource.test.ts on lines 49..52

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

          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

              test("with approximation", async () => {
                const context = rr0TestUtil.newHtmlContext("time/1/9/9/0/08/index.html", "")
                const original = context.file.document.createElement("time")
                original.textContent = "~P2H"
                const replacement = await replacer.replacement(context, original)
          Severity: Major
          Found in time/TimeReplacer.test.ts and 2 other locations - About 3 hrs to fix
          time/TimeReplacer.test.ts on lines 197..204
          time/TimeReplacer.test.ts on lines 208..214

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

          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

                {
                  time: new TimeContext(nativeCase1Time.getYear(), nativeCase1Time.getMonth(), nativeCase1Time.getDayOfMonth(),
                    nativeCase1Time.getHour(), nativeCase1Time.getMinutes(), nativeCase1Time.getTimeZone()),
                  place: {name: "Le Mans", place: leMans72.places[0]},
                  description: "observation",
          time/datasource/baseovnifrance/BaseOvniFranceCaseSummaryRR0Mapper.test.ts on lines 52..58
          time/datasource/baseovnifrance/BaseOvniFranceCaseSummaryRR0Mapper.test.ts on lines 59..65
          time/datasource/baseovnifrance/BaseOvniFranceCaseSummaryRR0Mapper.test.ts on lines 66..72

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

          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

            this.errorHolder.append("text")
              .attr("text-anchor", "middle")  // this makes it easy to centre the text as the transform is applied to the anchor
              .attr("transform", "translate(" +
                ((this.miniErrorChartMargin.left + this.errorChartWidth + this.miniErrorChartMargin.right) / 2)
                + "," +
          Severity: Major
          Found in people/a/AlammarJay/js/simple_nn.js and 1 other location - About 3 hrs to fix
          people/a/AlammarJay/js/simple_nn.js on lines 606..613

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

          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

            this.heatmapHolder.append("text")
              .attr("text-anchor", "middle")  // this makes it easy to centre the text as the transform is applied to the anchor
              .attr("transform", "translate(" +
                ((this.miniGraphMargin.left + this.heatmapWidth + this.miniGraphMargin.right) / 2)
                + "," +
          Severity: Major
          Found in people/a/AlammarJay/js/simple_nn.js and 1 other location - About 3 hrs to fix
          people/a/AlammarJay/js/simple_nn.js on lines 261..268

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

          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

                {
                  time: new TimeContext(nativeCase3Time.getYear(), nativeCase3Time.getMonth(), nativeCase3Time.getDayOfMonth(),
                    nativeCase3Time.getHour(), nativeCase3Time.getMinutes(), nativeCase3Time.getTimeZone()),
                  place: {name: "Briançon", place: briancon05.places[0]},
                  description: "observation",
          time/datasource/baseovnifrance/BaseOvniFranceCaseSummaryRR0Mapper.test.ts on lines 45..51
          time/datasource/baseovnifrance/BaseOvniFranceCaseSummaryRR0Mapper.test.ts on lines 52..58
          time/datasource/baseovnifrance/BaseOvniFranceCaseSummaryRR0Mapper.test.ts on lines 66..72

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

          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

                {
                  time: new TimeContext(nativeCase2Time.getYear(), nativeCase2Time.getMonth(), nativeCase2Time.getDayOfMonth(),
                    nativeCase2Time.getHour(), nativeCase2Time.getMinutes(), nativeCase2Time.getTimeZone()),
                  place: {name: "Lyon", place: lyon69.places[0]},
                  description: "observation",
          time/datasource/baseovnifrance/BaseOvniFranceCaseSummaryRR0Mapper.test.ts on lines 45..51
          time/datasource/baseovnifrance/BaseOvniFranceCaseSummaryRR0Mapper.test.ts on lines 59..65
          time/datasource/baseovnifrance/BaseOvniFranceCaseSummaryRR0Mapper.test.ts on lines 66..72

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

          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

                {
                  time: new TimeContext(nativeCase4Time.getYear(), nativeCase4Time.getMonth(), nativeCase4Time.getDayOfMonth(),
                    nativeCase4Time.getHour(), nativeCase4Time.getMinutes(), nativeCase4Time.getTimeZone()),
                  place: {name: "Chambon-sur-Voueize", place: chambonSurVoueize23.places[0]},
                  description: "observation",
          time/datasource/baseovnifrance/BaseOvniFranceCaseSummaryRR0Mapper.test.ts on lines 45..51
          time/datasource/baseovnifrance/BaseOvniFranceCaseSummaryRR0Mapper.test.ts on lines 52..58
          time/datasource/baseovnifrance/BaseOvniFranceCaseSummaryRR0Mapper.test.ts on lines 59..65

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

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

          function portSearchChange (filter) {
            tableBody.innerHTML = ""
            const input = (portSearchInput.value || "").toLowerCase().trim()
          
            /**
          Severity: Minor
          Found in tech/info/soft/net/protocole/index.js - About 3 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 initializeGraph has 85 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          reluGraph.prototype.initializeGraph = function () {
            var obj = this
            this.graphHolder = d3.select(this.containerElement) // select the 'body' element
              .append("svg")           // append an SVG element to the body
              .attr("class", "activation-graph")
          Severity: Major
          Found in people/a/AlammarJay/js/relu_graph.js - About 3 hrs to fix
            Severity
            Category
            Status
            Source
            Language