ReCreateJS/txtjs

View on GitHub

Showing 340 of 340 total issues

Function constructor has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  constructor(
    x1: number[],
    rx: number,
    ry: number,
    phiarg: number,
Severity: Major
Found in src/SVGArc.ts - About 2 hrs to fix

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

      stage.addChild(
        new txt.CharacterText({
          text: "The fox jumped over...",
          font: "raleway",
          singleLine: true,
    Severity: Major
    Found in examples/CharacterText/autosize_reduce.ts and 11 other locations - About 2 hrs to fix
    examples/CharacterText/autosize_reduce.ts on lines 8..24
    examples/CharacterText/autosize_reduce.ts on lines 26..42
    examples/CharacterText/autosize_reduce.ts on lines 44..60
    examples/CharacterText/autosize_reduce.ts on lines 62..78
    examples/CharacterText/autosize_reduce.ts on lines 80..96
    examples/CharacterText/autosize_reduce.ts on lines 98..114
    examples/CharacterText/autosize_reduce.ts on lines 116..132
    examples/CharacterText/autosize_reduce.ts on lines 134..150
    examples/CharacterText/autosize_reduce.ts on lines 170..186
    examples/CharacterText/autosize_reduce.ts on lines 188..204
    examples/CharacterText/autosize_reduce.ts on lines 206..222

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 85.

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

      stage.addChild(
        new txt.CharacterText({
          text: "The fox jumped over...",
          font: "raleway",
          singleLine: true,
    Severity: Major
    Found in examples/CharacterText/autosize_reduce.ts and 11 other locations - About 2 hrs to fix
    examples/CharacterText/autosize_reduce.ts on lines 8..24
    examples/CharacterText/autosize_reduce.ts on lines 26..42
    examples/CharacterText/autosize_reduce.ts on lines 44..60
    examples/CharacterText/autosize_reduce.ts on lines 62..78
    examples/CharacterText/autosize_reduce.ts on lines 80..96
    examples/CharacterText/autosize_reduce.ts on lines 98..114
    examples/CharacterText/autosize_reduce.ts on lines 116..132
    examples/CharacterText/autosize_reduce.ts on lines 134..150
    examples/CharacterText/autosize_reduce.ts on lines 152..168
    examples/CharacterText/autosize_reduce.ts on lines 170..186
    examples/CharacterText/autosize_reduce.ts on lines 188..204

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

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

      stage.addChild(
        new txt.CharacterText({
          text: "The fox jumped over...",
          font: "raleway",
          singleLine: true,
    Severity: Major
    Found in examples/CharacterText/autosize_reduce.ts and 11 other locations - About 2 hrs to fix
    examples/CharacterText/autosize_reduce.ts on lines 8..24
    examples/CharacterText/autosize_reduce.ts on lines 26..42
    examples/CharacterText/autosize_reduce.ts on lines 44..60
    examples/CharacterText/autosize_reduce.ts on lines 62..78
    examples/CharacterText/autosize_reduce.ts on lines 98..114
    examples/CharacterText/autosize_reduce.ts on lines 116..132
    examples/CharacterText/autosize_reduce.ts on lines 134..150
    examples/CharacterText/autosize_reduce.ts on lines 152..168
    examples/CharacterText/autosize_reduce.ts on lines 170..186
    examples/CharacterText/autosize_reduce.ts on lines 188..204
    examples/CharacterText/autosize_reduce.ts on lines 206..222

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 85.

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

      stage.addChild(
        new txt.CharacterText({
          text: "The fox jumped over...",
          font: "raleway",
          singleLine: true,
    Severity: Major
    Found in examples/CharacterText/autosize_reduce.ts and 11 other locations - About 2 hrs to fix
    examples/CharacterText/autosize_reduce.ts on lines 26..42
    examples/CharacterText/autosize_reduce.ts on lines 44..60
    examples/CharacterText/autosize_reduce.ts on lines 62..78
    examples/CharacterText/autosize_reduce.ts on lines 80..96
    examples/CharacterText/autosize_reduce.ts on lines 98..114
    examples/CharacterText/autosize_reduce.ts on lines 116..132
    examples/CharacterText/autosize_reduce.ts on lines 134..150
    examples/CharacterText/autosize_reduce.ts on lines 152..168
    examples/CharacterText/autosize_reduce.ts on lines 170..186
    examples/CharacterText/autosize_reduce.ts on lines 188..204
    examples/CharacterText/autosize_reduce.ts on lines 206..222

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 85.

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

      stage.addChild(
        new txt.CharacterText({
          text: "The fox jumped over...",
          font: "raleway",
          singleLine: true,
    Severity: Major
    Found in examples/CharacterText/autosize_reduce.ts and 11 other locations - About 2 hrs to fix
    examples/CharacterText/autosize_reduce.ts on lines 8..24
    examples/CharacterText/autosize_reduce.ts on lines 26..42
    examples/CharacterText/autosize_reduce.ts on lines 44..60
    examples/CharacterText/autosize_reduce.ts on lines 62..78
    examples/CharacterText/autosize_reduce.ts on lines 80..96
    examples/CharacterText/autosize_reduce.ts on lines 98..114
    examples/CharacterText/autosize_reduce.ts on lines 116..132
    examples/CharacterText/autosize_reduce.ts on lines 152..168
    examples/CharacterText/autosize_reduce.ts on lines 170..186
    examples/CharacterText/autosize_reduce.ts on lines 188..204
    examples/CharacterText/autosize_reduce.ts on lines 206..222

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 85.

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

      stage.addChild(
        new txt.CharacterText({
          text: "The fox jumped over...",
          font: "raleway",
          singleLine: true,
    Severity: Major
    Found in examples/CharacterText/autosize_reduce.ts and 11 other locations - About 2 hrs to fix
    examples/CharacterText/autosize_reduce.ts on lines 8..24
    examples/CharacterText/autosize_reduce.ts on lines 26..42
    examples/CharacterText/autosize_reduce.ts on lines 44..60
    examples/CharacterText/autosize_reduce.ts on lines 62..78
    examples/CharacterText/autosize_reduce.ts on lines 80..96
    examples/CharacterText/autosize_reduce.ts on lines 98..114
    examples/CharacterText/autosize_reduce.ts on lines 134..150
    examples/CharacterText/autosize_reduce.ts on lines 152..168
    examples/CharacterText/autosize_reduce.ts on lines 170..186
    examples/CharacterText/autosize_reduce.ts on lines 188..204
    examples/CharacterText/autosize_reduce.ts on lines 206..222

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 85.

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

      stage.addChild(
        new txt.CharacterText({
          text: "The fox jumped over...",
          font: "raleway",
          singleLine: true,
    Severity: Major
    Found in examples/CharacterText/autosize_reduce.ts and 11 other locations - About 2 hrs to fix
    examples/CharacterText/autosize_reduce.ts on lines 8..24
    examples/CharacterText/autosize_reduce.ts on lines 26..42
    examples/CharacterText/autosize_reduce.ts on lines 44..60
    examples/CharacterText/autosize_reduce.ts on lines 62..78
    examples/CharacterText/autosize_reduce.ts on lines 80..96
    examples/CharacterText/autosize_reduce.ts on lines 98..114
    examples/CharacterText/autosize_reduce.ts on lines 116..132
    examples/CharacterText/autosize_reduce.ts on lines 134..150
    examples/CharacterText/autosize_reduce.ts on lines 152..168
    examples/CharacterText/autosize_reduce.ts on lines 188..204
    examples/CharacterText/autosize_reduce.ts on lines 206..222

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 85.

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

      stage.addChild(
        new txt.CharacterText({
          text: "The fox jumped over...",
          font: "raleway",
          singleLine: true,
    Severity: Major
    Found in examples/CharacterText/autosize_reduce.ts and 11 other locations - About 2 hrs to fix
    examples/CharacterText/autosize_reduce.ts on lines 8..24
    examples/CharacterText/autosize_reduce.ts on lines 44..60
    examples/CharacterText/autosize_reduce.ts on lines 62..78
    examples/CharacterText/autosize_reduce.ts on lines 80..96
    examples/CharacterText/autosize_reduce.ts on lines 98..114
    examples/CharacterText/autosize_reduce.ts on lines 116..132
    examples/CharacterText/autosize_reduce.ts on lines 134..150
    examples/CharacterText/autosize_reduce.ts on lines 152..168
    examples/CharacterText/autosize_reduce.ts on lines 170..186
    examples/CharacterText/autosize_reduce.ts on lines 188..204
    examples/CharacterText/autosize_reduce.ts on lines 206..222

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 85.

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

      stage.addChild(
        new txt.CharacterText({
          text: "The fox jumped over...",
          font: "raleway",
          singleLine: true,
    Severity: Major
    Found in examples/CharacterText/autosize_reduce.ts and 11 other locations - About 2 hrs to fix
    examples/CharacterText/autosize_reduce.ts on lines 8..24
    examples/CharacterText/autosize_reduce.ts on lines 26..42
    examples/CharacterText/autosize_reduce.ts on lines 44..60
    examples/CharacterText/autosize_reduce.ts on lines 80..96
    examples/CharacterText/autosize_reduce.ts on lines 98..114
    examples/CharacterText/autosize_reduce.ts on lines 116..132
    examples/CharacterText/autosize_reduce.ts on lines 134..150
    examples/CharacterText/autosize_reduce.ts on lines 152..168
    examples/CharacterText/autosize_reduce.ts on lines 170..186
    examples/CharacterText/autosize_reduce.ts on lines 188..204
    examples/CharacterText/autosize_reduce.ts on lines 206..222

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 85.

    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

          if (char.missing) {
            if (this.missingGlyphs == null) {
              this.missingGlyphs = [];
            }
            this.missingGlyphs.push({
    Severity: Major
    Found in src/CharacterText.ts and 1 other location - About 2 hrs to fix
    src/Text.ts on lines 204..213

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

    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

          if (char.missing) {
            if (this.missingGlyphs == null) {
              this.missingGlyphs = [];
            }
            this.missingGlyphs.push({
    Severity: Major
    Found in src/Text.ts and 1 other location - About 2 hrs to fix
    src/CharacterText.ts on lines 404..413

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

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

      stage.addChild(
        new txt.CharacterText({
          text: "The fox jumped over...",
          font: "raleway",
          singleLine: true,
    Severity: Major
    Found in examples/CharacterText/autosize_reduce.ts and 11 other locations - About 2 hrs to fix
    examples/CharacterText/autosize_reduce.ts on lines 8..24
    examples/CharacterText/autosize_reduce.ts on lines 26..42
    examples/CharacterText/autosize_reduce.ts on lines 62..78
    examples/CharacterText/autosize_reduce.ts on lines 80..96
    examples/CharacterText/autosize_reduce.ts on lines 98..114
    examples/CharacterText/autosize_reduce.ts on lines 116..132
    examples/CharacterText/autosize_reduce.ts on lines 134..150
    examples/CharacterText/autosize_reduce.ts on lines 152..168
    examples/CharacterText/autosize_reduce.ts on lines 170..186
    examples/CharacterText/autosize_reduce.ts on lines 188..204
    examples/CharacterText/autosize_reduce.ts on lines 206..222

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 85.

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

      stage.addChild(
        new txt.CharacterText({
          text: "The fox jumped over...",
          font: "raleway",
          singleLine: true,
    Severity: Major
    Found in examples/CharacterText/autosize_reduce.ts and 11 other locations - About 2 hrs to fix
    examples/CharacterText/autosize_reduce.ts on lines 8..24
    examples/CharacterText/autosize_reduce.ts on lines 26..42
    examples/CharacterText/autosize_reduce.ts on lines 44..60
    examples/CharacterText/autosize_reduce.ts on lines 62..78
    examples/CharacterText/autosize_reduce.ts on lines 80..96
    examples/CharacterText/autosize_reduce.ts on lines 116..132
    examples/CharacterText/autosize_reduce.ts on lines 134..150
    examples/CharacterText/autosize_reduce.ts on lines 152..168
    examples/CharacterText/autosize_reduce.ts on lines 170..186
    examples/CharacterText/autosize_reduce.ts on lines 188..204
    examples/CharacterText/autosize_reduce.ts on lines 206..222

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 85.

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

      stage.addChild(
        new txt.CharacterText({
          text: "The fox jumped over...",
          font: "raleway",
          singleLine: true,
    Severity: Major
    Found in examples/CharacterText/autosize_reduce.ts and 11 other locations - About 2 hrs to fix
    examples/CharacterText/autosize_reduce.ts on lines 8..24
    examples/CharacterText/autosize_reduce.ts on lines 26..42
    examples/CharacterText/autosize_reduce.ts on lines 44..60
    examples/CharacterText/autosize_reduce.ts on lines 62..78
    examples/CharacterText/autosize_reduce.ts on lines 80..96
    examples/CharacterText/autosize_reduce.ts on lines 98..114
    examples/CharacterText/autosize_reduce.ts on lines 116..132
    examples/CharacterText/autosize_reduce.ts on lines 134..150
    examples/CharacterText/autosize_reduce.ts on lines 152..168
    examples/CharacterText/autosize_reduce.ts on lines 170..186
    examples/CharacterText/autosize_reduce.ts on lines 206..222

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 85.

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

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

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

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

    Refactorings

    Further Reading

    File SVGPath.ts has 270 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    export function parsePathData(data) {
      if (!data) {
        return [];
      }
      let cs = data;
    Severity: Minor
    Found in src/SVGPath.ts - About 2 hrs to fix

      Function lineLayout has 62 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        lineLayout() {
          // loop over lines
          // place into text
          let measuredHeight = 0;
          let line;
      Severity: Major
      Found in src/CharacterText.ts - About 2 hrs to fix

        Function lineLayout has 61 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          lineLayout() {
            // loop over lines
            // place into text
            let measuredHeight = 0;
            let line;
        Severity: Major
        Found in src/Text.ts - About 2 hrs to fix

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

            const text = new txt.CharacterText({
              text: "Chess Onward The big blue file brush Who be dribble flower office",
              font: "lobster",
              tracking: 0,
              lineHeight: 100,
          Severity: Major
          Found in examples/CharacterText/ligatures.ts and 1 other location - About 2 hrs to fix
          examples/Text/ligatures.ts on lines 9..22

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

          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

            const text = new txt.Text({
              text: "Chess Onward The big blue file brush Who be dribble flower office",
              font: "lobster",
              tracking: 0,
              lineHeight: 100,
          Severity: Major
          Found in examples/Text/ligatures.ts and 1 other location - About 2 hrs to fix
          examples/CharacterText/ligatures.ts on lines 8..21

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

          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