Showing 555 of 555 total issues

Function f has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  d3.f = function () {
    var functions = arguments
    //convert all string arguments into field accessors
    var i = 0, l = functions.length
    while (i < l) {

    Function f has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      d3.f = function () {
        var functions = arguments
        //convert all string arguments into field accessors
        var i = 0, l = functions.length
        while (i < l) {
    Severity: Minor
    Found in people/a/AlammarJay/js/d3-jetpack.js - About 1 hr to fix

      Function createReplacer has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        protected async createReplacer(context: HtmlRR0SsgContext): Promise<DomReplacer> {
          const doc = context.file.document
          return new class implements DomReplacer {
            async replace(original: HTMLElement): Promise<HTMLElement> {
              if (!original.hasChildNodes()) {
      Severity: Minor
      Found in lang/LanguageReplaceCommand.ts - About 1 hr to fix

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

            groupElements.select("#weight0Value")
              .text(function (d) {
                return "W" + (d.outputIndex + 1) + "," + (d.inputIndex + 1)
              })
        Severity: Major
        Found in people/a/AlammarJay/js/nn_calc.js and 1 other location - About 1 hr to fix
        people/a/AlammarJay/js/shallow_nn_grapher.js on lines 240..243

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

        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

          groupElements.select("#weight0Value")
            .text(function (d) {
              return "W" + (d.outputIndex + 1) + "," + (d.inputIndex + 1);
            });
        Severity: Major
        Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 1 other location - About 1 hr to fix
        people/a/AlammarJay/js/nn_calc.js on lines 162..165

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

        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 sigmoidGraph has 9 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        var sigmoidGraph = function (containerElement, xStart, xEnd, xDefault, sliderElement, sigmoidInputElement,
                                     sigmoidFormulaInputElement, sigmoidResult, sigmoidGraphResult) {
        Severity: Major
        Found in people/a/AlammarJay/js/sigmoid_graph.js - About 1 hr to fix

          Function reluGraph has 9 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          var reluGraph = function (containerElement, xStart, xEnd, xDefault, sliderElement, reluInputElement,
                                    reluFormulaInputElement, reluResult, reluGraphResult) {
          Severity: Major
          Found in people/a/AlammarJay/js/relu_graph.js - About 1 hr to fix

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

              private handleImage(context: HtmlRR0SsgContext, imageUrl: string) {
                const inputFile = context.file.name
                if (imageUrl) {
                  const isLocal = !imageUrl.startsWith('http');
                  if (isLocal) {
            Severity: Minor
            Found in ImageCommand.ts - About 1 hr to fix

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

                getInfoStr(context: HtmlRR0SsgContext) {
                  const authors = context.file.meta.author
                  const authorsStr = authors && authors.length > 0 ? authors.join(" & ") : ""
              
                  let timeStr = ""
              Severity: Minor
              Found in OpenGraphCommand.ts - About 1 hr to fix

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

                  this.inputNode = this.neuralNetworkG
                    .append("circle")
                    .attr("class", "input-node")
                    .attr("r", nodeRadius)
                    .attr("cx", this.neuralNetworkMargin.left + nodeRadius)
                Severity: Major
                Found in people/a/AlammarJay/js/two_variable_nn.js and 2 other locations - About 1 hr to fix
                people/a/AlammarJay/js/simple_nn.js on lines 731..736
                people/a/AlammarJay/js/two_variable_nn.js on lines 364..369

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

                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

                        grapher.tooltipDiv.html(rows)
                          .style("left", (d3.event.pageX) + "px")
                          .style("top", (d3.event.pageY) + "px")
                Severity: Major
                Found in people/a/AlammarJay/js/nn_calc.js and 2 other locations - About 1 hr to fix
                people/a/AlammarJay/js/nn_calc.js on lines 606..608
                people/a/AlammarJay/js/nn_calc.js on lines 615..617

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

                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

                        viz.tooltipDiv.html(html)
                          .style("left", (d3.event.pageX) + "px")
                          .style("top", (d3.event.pageY) + "px")
                Severity: Major
                Found in people/a/AlammarJay/js/nn_calc.js and 2 other locations - About 1 hr to fix
                people/a/AlammarJay/js/nn_calc.js on lines 391..393
                people/a/AlammarJay/js/nn_calc.js on lines 606..608

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

                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

                        viz.tooltipDiv.html(rows)
                          .style("left", (d3.event.pageX) + "px")
                          .style("top", (d3.event.pageY) + "px")
                Severity: Major
                Found in people/a/AlammarJay/js/nn_calc.js and 2 other locations - About 1 hr to fix
                people/a/AlammarJay/js/nn_calc.js on lines 391..393
                people/a/AlammarJay/js/nn_calc.js on lines 615..617

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

                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

                  this.inputNode = this.neuralNetworkG
                    .append("circle")
                    .attr("class", "input-node")
                    .attr("r", nodeRadius)
                    .attr("cx", this.neuralNetworkMargin.left + nodeRadius)
                Severity: Major
                Found in people/a/AlammarJay/js/two_variable_nn.js and 2 other locations - About 1 hr to fix
                people/a/AlammarJay/js/simple_nn.js on lines 731..736
                people/a/AlammarJay/js/two_variable_nn.js on lines 325..330

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

                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

                  this.inputNode = this.neuralNetworkG
                    .append("circle")
                    .attr("class", "input-node")
                    .attr("r", nodeRadius)
                    .attr("cx", this.neuralNetworkMargin.left + nodeRadius)
                Severity: Major
                Found in people/a/AlammarJay/js/simple_nn.js and 2 other locations - About 1 hr to fix
                people/a/AlammarJay/js/two_variable_nn.js on lines 325..330
                people/a/AlammarJay/js/two_variable_nn.js on lines 364..369

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

                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

                    {
                      const lastnameFirstElement = createPeopleElement(context,
                        "Hynek, Josef Allen (Northwestern University, Evanston, Illinois)")
                      const replacement = await replacer.replacement(context, lastnameFirstElement)
                      expect(replacement.outerHTML).toBe(
                Severity: Major
                Found in people/PeopleReplacer.test.ts and 3 other locations - About 1 hr to fix
                people/PeopleReplacer.test.ts on lines 33..39
                people/PeopleReplacer.test.ts on lines 54..59
                people/PeopleReplacer.test.ts on lines 60..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 57.

                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

                    {
                      const firstnameFirstElement = createPeopleElement(context,
                        "Josef Allen Hynek (Northwestern University, Evanston, Illinois)")
                      const replacement = await replacer.replacement(context, firstnameFirstElement)
                      expect(replacement.outerHTML).toBe(
                Severity: Major
                Found in people/PeopleReplacer.test.ts and 3 other locations - About 1 hr to fix
                people/PeopleReplacer.test.ts on lines 26..32
                people/PeopleReplacer.test.ts on lines 54..59
                people/PeopleReplacer.test.ts on lines 60..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 57.

                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

                    {
                      const peopleWithFullName = createPeopleElement(context, "Jérôme Beau")
                      let replacement = await replacer.replacement(context, peopleWithFullName)
                      expect(replacement.outerHTML).toBe(
                        `<span title="1972-, 50 ans, France, ufologue, Informaticien" class="country-fr occupation-ufologist occupation-softwareEngineer" translate="no"><a href="/people/b/BeauJerome/">Jérôme Beau</a></span>`)
                Severity: Major
                Found in people/PeopleReplacer.test.ts and 3 other locations - About 1 hr to fix
                people/PeopleReplacer.test.ts on lines 26..32
                people/PeopleReplacer.test.ts on lines 33..39
                people/PeopleReplacer.test.ts on lines 60..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 57.

                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

                    {
                      const peopleWithLastName = createPeopleElement(context, "Beau")
                      let replacement = await replacer.replacement(context, peopleWithLastName)
                      expect(replacement.outerHTML).toBe(
                        `<span title="1972-, 50 ans, France, ufologue, Informaticien" class="country-fr occupation-ufologist occupation-softwareEngineer" translate="no" title="Jérôme Beau"><a href="/people/b/BeauJerome/" title="Jérôme Beau">Beau</a></span>`)
                Severity: Major
                Found in people/PeopleReplacer.test.ts and 3 other locations - About 1 hr to fix
                people/PeopleReplacer.test.ts on lines 26..32
                people/PeopleReplacer.test.ts on lines 33..39
                people/PeopleReplacer.test.ts on lines 54..59

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

                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 (!minutes) {
                        switch (hourDelta) {
                          case -1:
                            text = messages.hour.before
                            break
                Severity: Major
                Found in time/RelativeTimeTextBuilder.ts and 2 other locations - About 1 hr to fix
                time/RelativeTimeTextBuilder.ts on lines 121..130
                time/RelativeTimeTextBuilder.ts on lines 131..140

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

                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

                Severity
                Category
                Status
                Source
                Language