Showing 555 of 555 total issues

Function renderContent has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  renderContent(context: HtmlRR0SsgContext, rr0Data: D, container: HTMLElement): void {
    const outDoc = context.file.document
    const time = rr0Data.dateTime
    const timeEl = outDoc.createElement("time") as HTMLTimeElement
    const timeValue = timeEl.dateTime = time.toString()
Severity: Minor
Found in time/EventRenderer.ts - About 1 hr to fix

    Function getFromRow has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      protected getFromRow(context: RR0SsgContext, row: Element): BaseOvniFranceCaseSummary {
        const columns = row.querySelectorAll("td")
        const caseLink = columns[0].firstElementChild as HTMLAnchorElement
        const url = new URL(caseLink.href, this.baseUrl)
        const id = new URLSearchParams(url.search).get("numobs")
    Severity: Minor
    Found in time/datasource/baseovnifrance/BaseOvniFranceHttpDatasource.ts - About 1 hr to fix

      Function getFromRow has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        getFromRow(context: HtmlRR0SsgContext, r: Element): RR0CaseSummary {
          const row = r.cloneNode(true) as Element
          const caseLink = context.file.name
          const url = new URL(caseLink, this.baseUrl)
          const timeEl = row.querySelector("time") as HTMLTimeElement
      Severity: Minor
      Found in time/datasource/rr0/RR0HttpDatasource.ts - About 1 hr to fix

        Function process has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          protected process(context: HtmlSsgContext, from: Element, target: Element, level: number): boolean {
            let added = false
            const sectionsHeadings = from.querySelectorAll("section h" + level)
            const articlesHeadings = from.querySelectorAll("article h" + level)
            const headings = Array.from(sectionsHeadings).concat(Array.from(articlesHeadings))
        Severity: Minor
        Found in outline/OutlineReplaceCommand.ts - About 1 hr to fix

          Function map has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            map(context: HtmlRR0SsgContext, sourceCase: UrecatCase, sourceTime: Date): RR0CaseSummary {
              const caseSource: OnlineSource = {
                url: sourceCase.url, title: "cas n° " + sourceCase.id, authors: this.authors,
                publication: {publisher: this.copyright, time: TimeContext.fromDate(sourceTime, context.time.options)}
              }
          Severity: Minor
          Found in time/datasource/urecat/UrecatRR0Mapper.ts - About 1 hr to fix

            Function read has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              async read(): Promise<T[]> {
                if (this.values.length > 0) {
                  this.logger.warn("Overwriting previously read values", this.values)
                }
                this.values = []
            Severity: Minor
            Found in CSVFileReader.ts - About 1 hr to fix

              Function toc has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                protected async toc(context: HtmlRR0SsgContext, book: Book) {
                  const startFileName = path.join(book.dirName, "index.html")
                  try {
                    context.getInputFrom(startFileName)
                    const startFileNames = [context.file.name]
              Severity: Minor
              Found in book/BookDirectoryStep.ts - About 1 hr to fix

                Function getWeightNodeCoordinates has 8 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  function getWeightNodeCoordinates(inputLayerNodeCount,
                                                    inputNodeCount, outputNodeCount,
                                                    inputLayerCoordinates, weightLayerXCoordinates,
                                                    outputLayerCoordinates,
                                                    biasLayerX, inputLayerX) {
                Severity: Major
                Found in people/a/AlammarJay/js/nn_calc.js - About 1 hr to fix

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

                        inputs.append("text")
                          .attr("id", "output-name")
                          .attr("class", "node-text")
                          .attr("text-anchor", "middle")
                          .attr("x", 0)
                  Severity: Major
                  Found in people/a/AlammarJay/js/nn_calc.js and 1 other location - About 1 hr to fix
                  people/a/AlammarJay/js/nn_calc.js on lines 429..434

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

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

                        d3.range(this.numberOfInputNodes).map(function (id) {
                          this.updateParameter('weight', id, newWeights[id], false)
                        }.bind(this));
                  Severity: Major
                  Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 1 hr to fix
                  people/a/AlammarJay/js/two_variable_nn.js on lines 497..499

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

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

                      inputs.append("text")
                        .attr("id", "output-name")
                        .attr("class", "node-text")
                        .attr("text-anchor", "middle")
                        .attr("x", 0)
                  Severity: Major
                  Found in people/a/AlammarJay/js/nn_calc.js and 1 other location - About 1 hr to fix
                  people/a/AlammarJay/js/nn_calc.js on lines 1541..1546

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

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

                        d3.range(this.numberOfInputNodes).map(function (id) {
                          this.updateParameter('weight', id, newWeights[id], false)
                        }.bind(this));
                  Severity: Major
                  Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 1 hr to fix
                  people/a/AlammarJay/js/two_variable_nn.js on lines 489..491

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

                  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 (parsed.monthStr) {
                        const month = parseInt(parsed.monthStr, 10)
                        if (!Number.isNaN(month)) {
                          timeContext.setMonth(month)
                        }
                  Severity: Major
                  Found in time/TimeReplacer.ts and 2 other locations - About 1 hr to fix
                  time/TimeReplacer.ts on lines 65..70
                  time/TimeReplacer.ts on lines 77..82

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

                  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 (parsed.yearStr) {
                        const year = parseInt(parsed.yearStr, 10)
                        if (!Number.isNaN(year)) {
                          timeContext.setYear(year)
                        }
                  Severity: Major
                  Found in time/TimeReplacer.ts and 2 other locations - About 1 hr to fix
                  time/TimeReplacer.ts on lines 71..76
                  time/TimeReplacer.ts on lines 77..82

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

                  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 (parsed.dayOfMonthStr) {
                        const dayOfMonth = parseInt(parsed.dayOfMonthStr, 10)
                        if (!Number.isNaN(dayOfMonth)) {
                          timeContext.setDayOfMonth(dayOfMonth)
                        }
                  Severity: Major
                  Found in time/TimeReplacer.ts and 2 other locations - About 1 hr to fix
                  time/TimeReplacer.ts on lines 65..70
                  time/TimeReplacer.ts on lines 71..76

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

                  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

                      sigmoidOutputGroups.select("text")
                        .attr("class", "sigmoid-output")
                        .text(function (d) {
                          return numberFormatter(d.value * 100, 2) + "%"
                        })
                  Severity: Minor
                  Found in people/a/AlammarJay/js/nn_calc.js and 1 other location - About 55 mins to fix
                  people/a/AlammarJay/js/nn_calc.js on lines 893..897

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

                  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

                      sigmoidOutputElements.append("text")
                        .attr("class", "sigmoid-output")
                        .text(function (d) {
                          return numberFormatter(d.value * 100, 2) + "%"
                        })
                  Severity: Minor
                  Found in people/a/AlammarJay/js/nn_calc.js and 1 other location - About 55 mins to fix
                  people/a/AlammarJay/js/nn_calc.js on lines 878..882

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

                  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 async getInstance(): Promise<IndexedReplacer> {
                      if (!this.singleton) {
                        this.singleton = new IndexedReplacer();
                      }
                      return this.singleton;
                  Severity: Minor
                  Found in index/indexedReplacerFactory.ts and 1 other location - About 55 mins to fix
                  people/witness/WitnessReplacerFactory.ts on lines 22..27

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

                  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 (contentUrl != 'time') {
                          const text = Time.titleFromFile(context, contentUrl);
                          if (text) {
                            return {type: LinkType.prev, text, url: '/' + contentUrl};
                          }
                  Severity: Minor
                  Found in time/TimeLinkDefaultHandler.ts and 1 other location - About 55 mins to fix
                  time/TimeLinkDefaultHandler.ts on lines 48..53

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

                  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 async getInstance(): Promise<WitnessReplacer> {
                      if (!this.singleton) {
                        this.singleton = new WitnessReplacer()
                      }
                      return this.singleton
                  Severity: Minor
                  Found in people/witness/WitnessReplacerFactory.ts and 1 other location - About 55 mins to fix
                  index/indexedReplacerFactory.ts on lines 20..25

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

                  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