ReCreateJS/txtjs

View on GitHub

Showing 340 of 340 total issues

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

export default function init() {
  const canvas = createHiDPICanvas(820, 900, 1);
  document.body.appendChild(canvas);
  const stage = new createjs.Stage(canvas);

Severity: Minor
Found in examples/CharacterText/autosize_reduce_expand.ts - About 1 hr to fix

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

    export default function init() {
      const canvas = createHiDPICanvas(610, 610, 2);
      document.body.appendChild(canvas);
      const stage = new createjs.Stage(canvas);
    
    
    Severity: Minor
    Found in examples/Text/multiline_align_breaks.ts - About 1 hr to fix

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

      export default function init() {
        const canvas = createHiDPICanvas(480, 480, 2);
        document.body.appendChild(canvas);
        const stage = new createjs.Stage(canvas);
      
      
      Severity: Minor
      Found in examples/CharacterText/single_word_oneline.ts - About 1 hr to fix

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

        export default function init() {
          const canvas = createHiDPICanvas(610, 610, 2);
          document.body.appendChild(canvas);
          const stage = new createjs.Stage(canvas);
        
        
        Severity: Minor
        Found in examples/CharacterText/multiline_align_breaks.ts - About 1 hr to fix

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

          export default function init() {
            const canvas = createHiDPICanvas(610, 610, 2);
            document.body.appendChild(canvas);
            const stage = new createjs.Stage(canvas);
          
          
          Severity: Minor
          Found in examples/CharacterText/multiline_align.ts - About 1 hr to fix

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

            export default function init() {
              const canvas = createHiDPICanvas(610, 610, 2);
              document.body.appendChild(canvas);
              const stage = new createjs.Stage(canvas);
            
            
            Severity: Minor
            Found in examples/Text/multiline_align.ts - About 1 hr to fix

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

              export default function init() {
                const canvas = createHiDPICanvas(500, 500, 2);
                document.body.appendChild(canvas);
                const stage = new createjs.Stage(canvas);
              
              
              Severity: Minor
              Found in examples/Text/single_word_oneline.ts - About 1 hr to fix

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

                                  char._font.ligatures[ligTarget.charAt(0)][
                                    ligTarget.charAt(1)
                                  ][ligTarget.charAt(2)][ligTarget.charAt(3)].glyph
                Severity: Major
                Found in src/PathText.ts and 1 other location - About 1 hr to fix
                src/PathText.ts on lines 418..420

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

                  setEnd(end: number) {
                    this.end = end;
                    this.pathPoints.end = this.end;
                    this.pathPoints.update();
                  }
                Severity: Major
                Found in src/PathText.ts and 1 other location - About 1 hr to fix
                src/PathText.ts on lines 68..72

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 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 2 locations. Consider refactoring.
                Open

                  setStart(start: number) {
                    this.start = start;
                    this.pathPoints.start = this.start;
                    this.pathPoints.update();
                  }
                Severity: Major
                Found in src/PathText.ts and 1 other location - About 1 hr to fix
                src/PathText.ts on lines 74..78

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

                                char._font.ligatures[ligTarget.charAt(0)][ligTarget.charAt(1)][
                                  ligTarget.charAt(2)
                                ][ligTarget.charAt(3)]
                Severity: Major
                Found in src/PathText.ts and 1 other location - About 1 hr to fix
                src/PathText.ts on lines 424..426

                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 target.has_key( 'bottom' ):
                                out += '0|bottom|' + str( target[ 'bottom' ] ) + '\n'
                Severity: Major
                Found in tools/font_export/main.py and 2 other locations - About 1 hr to fix
                tools/font_export/main.py on lines 127..128
                tools/font_export/main.py on lines 130..131

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

                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 target.has_key( 'middle' ):
                                out += '0|middle|' + str( target[ 'middle' ] ) + '\n'
                Severity: Major
                Found in tools/font_export/main.py and 2 other locations - About 1 hr to fix
                tools/font_export/main.py on lines 127..128
                tools/font_export/main.py on lines 133..134

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

                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 target.has_key( 'top' ):
                                out += '0|top|' + str( target[ 'top' ] ) + '\n'
                Severity: Major
                Found in tools/font_export/main.py and 2 other locations - About 1 hr to fix
                tools/font_export/main.py on lines 130..131
                tools/font_export/main.py on lines 133..134

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

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

                export default function init() {
                  const canvas = createHiDPICanvas(300, 200, 2);
                  document.body.appendChild(canvas);
                
                  const output = document.createElement("p");
                Severity: Minor
                Found in examples/CharacterText/child_events.ts - About 1 hr to fix

                  Function init has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export default function init() {
                    const canvas = createHiDPICanvas(500, 300, 2);
                    document.body.appendChild(canvas);
                    const stage = new createjs.Stage(canvas);
                  
                  
                  Severity: Minor
                  Found in examples/PathText/child_events.ts - About 1 hr to fix

                    Function init has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export default function init() {
                      const canvas = createHiDPICanvas(820, 900, 1);
                      document.body.appendChild(canvas);
                      const stage = new createjs.Stage(canvas);
                    
                    
                    Severity: Minor
                    Found in examples/CharacterText/autosize_expand.ts - About 1 hr to fix

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

                      export default function init() {
                        const canvas = createHiDPICanvas(1000, 1000, 2);
                        document.body.appendChild(canvas);
                        const stage = new createjs.Stage(canvas);
                        let i = 1;
                      Severity: Minor
                      Found in examples/CharacterText/loadtest.ts - About 1 hr to fix

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

                        export default function init() {
                          const canvas = createHiDPICanvas(1000, 1000, 2);
                          document.body.appendChild(canvas);
                          const stage = new createjs.Stage(canvas);
                          let i = 1;
                        Severity: Minor
                        Found in examples/Text/loadtest.ts - About 1 hr to fix

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

                                          if CHARS.has_key( c_1 ) and CHARS[ c_1 ] != 1:
                                              c_1 = CHARS[ c_1 ]
                          Severity: Major
                          Found in tools/font_export/main.py and 2 other locations - About 1 hr to fix
                          tools/font_export/main.py on lines 208..209
                          tools/font_export/main.py on lines 340..341

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

                          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