ReCreateJS/txtjs

View on GitHub

Showing 340 of 340 total issues

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

        for i in target:
            if i.has_attr('horiz-adv-x'):
                out += '0|missing|' + i['horiz-adv-x'] + '\n'
Severity: Major
Found in tools/font_export/main.py and 13 other locations - About 45 mins to fix
tools/font_export/main.py on lines 151..152
tools/font_export/main.py on lines 161..162
tools/font_export/main.py on lines 164..165
tools/font_export/main.py on lines 167..168
tools/font_export/main.py on lines 170..171
tools/font_export/main.py on lines 173..174
tools/font_export/main.py on lines 176..177
tools/font_export/main.py on lines 179..180
tools/font_export/main.py on lines 182..183
tools/font_export/main.py on lines 185..186
tools/font_export/main.py on lines 188..189
tools/font_export/main.py on lines 191..192
tools/font_export/main.py on lines 194..195

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

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

Avoid deeply nested control flow statements.
Open

          if (this.align == PathAlign.Left) {
            realStart = this.start;
          } else if (this.align == PathAlign.Center) {
            realStart = this.start + (this.realLength - characterLength) / 2;
          } else if (this.align == PathAlign.Right) {
Severity: Major
Found in src/Path.ts - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

              if (this.align == PathAlign.Left) {
                realStart = this.start;
              } else if (this.align == PathAlign.Center) {
                realStart = this.start - (this.realLength - characterLength) / 2;
              } else if (this.align == PathAlign.Right) {
    Severity: Major
    Found in src/Path.ts - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                if (position < 0) {
                  position = position + this.length;
                }
      Severity: Major
      Found in src/Path.ts - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                  if (this.align == PathAlign.Left) {
                    realStart = this.start;
                    position = realStart - distance;
                  } else if (this.align == PathAlign.Center) {
                    realStart = this.start - (this.realLength - characterLength) / 2;
        Severity: Major
        Found in src/Path.ts - About 45 mins to fix

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

                      if i.has_attr('panose-1'):
                          out += '0|panose|' + i['panose-1'] + '\n'
          Severity: Major
          Found in tools/font_export/main.py and 13 other locations - About 45 mins to fix
          tools/font_export/main.py on lines 140..142
          tools/font_export/main.py on lines 151..152
          tools/font_export/main.py on lines 164..165
          tools/font_export/main.py on lines 167..168
          tools/font_export/main.py on lines 170..171
          tools/font_export/main.py on lines 173..174
          tools/font_export/main.py on lines 176..177
          tools/font_export/main.py on lines 179..180
          tools/font_export/main.py on lines 182..183
          tools/font_export/main.py on lines 185..186
          tools/font_export/main.py on lines 188..189
          tools/font_export/main.py on lines 191..192
          tools/font_export/main.py on lines 194..195

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

          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

          Avoid deeply nested control flow statements.
          Open

                    if (position < 0) {
                      position = position + this.length;
                    }
          Severity: Major
          Found in src/Path.ts - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                      if (position > this.length) {
                        position = position - this.length;
                      }
            Severity: Major
            Found in src/Path.ts - About 45 mins to fix

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

                          if i.has_attr('font-stretch'):
                              out += '0|font-stretch|' + i['font-stretch']  + '\n'
              Severity: Major
              Found in tools/font_export/main.py and 13 other locations - About 45 mins to fix
              tools/font_export/main.py on lines 140..142
              tools/font_export/main.py on lines 151..152
              tools/font_export/main.py on lines 161..162
              tools/font_export/main.py on lines 164..165
              tools/font_export/main.py on lines 167..168
              tools/font_export/main.py on lines 170..171
              tools/font_export/main.py on lines 173..174
              tools/font_export/main.py on lines 176..177
              tools/font_export/main.py on lines 179..180
              tools/font_export/main.py on lines 185..186
              tools/font_export/main.py on lines 188..189
              tools/font_export/main.py on lines 191..192
              tools/font_export/main.py on lines 194..195

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

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

                          if i.has_attr('x-height'):
                              out += '0|x-height|' + i['x-height']  + '\n'
              Severity: Major
              Found in tools/font_export/main.py and 13 other locations - About 45 mins to fix
              tools/font_export/main.py on lines 140..142
              tools/font_export/main.py on lines 151..152
              tools/font_export/main.py on lines 161..162
              tools/font_export/main.py on lines 164..165
              tools/font_export/main.py on lines 167..168
              tools/font_export/main.py on lines 170..171
              tools/font_export/main.py on lines 173..174
              tools/font_export/main.py on lines 176..177
              tools/font_export/main.py on lines 179..180
              tools/font_export/main.py on lines 182..183
              tools/font_export/main.py on lines 185..186
              tools/font_export/main.py on lines 191..192
              tools/font_export/main.py on lines 194..195

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

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

                          if i.has_attr('font-weight'):
                              out += '0|font-weight|' + i['font-weight']  + '\n'
              Severity: Major
              Found in tools/font_export/main.py and 13 other locations - About 45 mins to fix
              tools/font_export/main.py on lines 140..142
              tools/font_export/main.py on lines 151..152
              tools/font_export/main.py on lines 161..162
              tools/font_export/main.py on lines 164..165
              tools/font_export/main.py on lines 167..168
              tools/font_export/main.py on lines 170..171
              tools/font_export/main.py on lines 173..174
              tools/font_export/main.py on lines 176..177
              tools/font_export/main.py on lines 182..183
              tools/font_export/main.py on lines 185..186
              tools/font_export/main.py on lines 188..189
              tools/font_export/main.py on lines 191..192
              tools/font_export/main.py on lines 194..195

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

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

                          if i.has_attr('cap-height'):
                              out += '0|cap-height|' + i['cap-height']  + '\n'
              Severity: Major
              Found in tools/font_export/main.py and 13 other locations - About 45 mins to fix
              tools/font_export/main.py on lines 140..142
              tools/font_export/main.py on lines 151..152
              tools/font_export/main.py on lines 161..162
              tools/font_export/main.py on lines 164..165
              tools/font_export/main.py on lines 167..168
              tools/font_export/main.py on lines 170..171
              tools/font_export/main.py on lines 173..174
              tools/font_export/main.py on lines 176..177
              tools/font_export/main.py on lines 179..180
              tools/font_export/main.py on lines 182..183
              tools/font_export/main.py on lines 188..189
              tools/font_export/main.py on lines 191..192
              tools/font_export/main.py on lines 194..195

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

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

                          if i.has_attr('units-per-em'):
                              out += '0|units|' + i['units-per-em']  + '\n'
              Severity: Major
              Found in tools/font_export/main.py and 13 other locations - About 45 mins to fix
              tools/font_export/main.py on lines 140..142
              tools/font_export/main.py on lines 151..152
              tools/font_export/main.py on lines 161..162
              tools/font_export/main.py on lines 164..165
              tools/font_export/main.py on lines 167..168
              tools/font_export/main.py on lines 173..174
              tools/font_export/main.py on lines 176..177
              tools/font_export/main.py on lines 179..180
              tools/font_export/main.py on lines 182..183
              tools/font_export/main.py on lines 185..186
              tools/font_export/main.py on lines 188..189
              tools/font_export/main.py on lines 191..192
              tools/font_export/main.py on lines 194..195

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

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

                          if i.has_attr('alphabetic'):
                              out += '0|alphabetic|' + i['alphabetic']  + '\n'
              Severity: Major
              Found in tools/font_export/main.py and 13 other locations - About 45 mins to fix
              tools/font_export/main.py on lines 140..142
              tools/font_export/main.py on lines 151..152
              tools/font_export/main.py on lines 161..162
              tools/font_export/main.py on lines 164..165
              tools/font_export/main.py on lines 167..168
              tools/font_export/main.py on lines 170..171
              tools/font_export/main.py on lines 176..177
              tools/font_export/main.py on lines 179..180
              tools/font_export/main.py on lines 182..183
              tools/font_export/main.py on lines 185..186
              tools/font_export/main.py on lines 188..189
              tools/font_export/main.py on lines 191..192
              tools/font_export/main.py on lines 194..195

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

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

                          if i.has_attr('descent'):
                              out += '0|descent|' + i['descent'] + '\n'
              Severity: Major
              Found in tools/font_export/main.py and 13 other locations - About 45 mins to fix
              tools/font_export/main.py on lines 140..142
              tools/font_export/main.py on lines 151..152
              tools/font_export/main.py on lines 161..162
              tools/font_export/main.py on lines 167..168
              tools/font_export/main.py on lines 170..171
              tools/font_export/main.py on lines 173..174
              tools/font_export/main.py on lines 176..177
              tools/font_export/main.py on lines 179..180
              tools/font_export/main.py on lines 182..183
              tools/font_export/main.py on lines 185..186
              tools/font_export/main.py on lines 188..189
              tools/font_export/main.py on lines 191..192
              tools/font_export/main.py on lines 194..195

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

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

                          if i.has_attr('underline-position'):
                              out += '0|underline-position|' + i['underline-position']  + '\n'
              Severity: Major
              Found in tools/font_export/main.py and 13 other locations - About 45 mins to fix
              tools/font_export/main.py on lines 140..142
              tools/font_export/main.py on lines 151..152
              tools/font_export/main.py on lines 161..162
              tools/font_export/main.py on lines 164..165
              tools/font_export/main.py on lines 167..168
              tools/font_export/main.py on lines 170..171
              tools/font_export/main.py on lines 173..174
              tools/font_export/main.py on lines 176..177
              tools/font_export/main.py on lines 179..180
              tools/font_export/main.py on lines 182..183
              tools/font_export/main.py on lines 185..186
              tools/font_export/main.py on lines 188..189
              tools/font_export/main.py on lines 194..195

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

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

                          if i.has_attr('font-style'):
                              out += '0|font-style|' + i['font-style']  + '\n'
              Severity: Major
              Found in tools/font_export/main.py and 13 other locations - About 45 mins to fix
              tools/font_export/main.py on lines 140..142
              tools/font_export/main.py on lines 151..152
              tools/font_export/main.py on lines 161..162
              tools/font_export/main.py on lines 164..165
              tools/font_export/main.py on lines 167..168
              tools/font_export/main.py on lines 170..171
              tools/font_export/main.py on lines 173..174
              tools/font_export/main.py on lines 179..180
              tools/font_export/main.py on lines 182..183
              tools/font_export/main.py on lines 185..186
              tools/font_export/main.py on lines 188..189
              tools/font_export/main.py on lines 191..192
              tools/font_export/main.py on lines 194..195

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

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

                          if i.has_attr('underline-thickness'):
                              out += '0|underline-thickness|' + i['underline-thickness']  + '\n'
              Severity: Major
              Found in tools/font_export/main.py and 13 other locations - About 45 mins to fix
              tools/font_export/main.py on lines 140..142
              tools/font_export/main.py on lines 151..152
              tools/font_export/main.py on lines 161..162
              tools/font_export/main.py on lines 164..165
              tools/font_export/main.py on lines 167..168
              tools/font_export/main.py on lines 170..171
              tools/font_export/main.py on lines 173..174
              tools/font_export/main.py on lines 176..177
              tools/font_export/main.py on lines 179..180
              tools/font_export/main.py on lines 182..183
              tools/font_export/main.py on lines 185..186
              tools/font_export/main.py on lines 188..189
              tools/font_export/main.py on lines 191..192

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

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

                          if i.has_attr('ascent'):
                              out += '0|ascent|' + i['ascent'] + '\n'
              Severity: Major
              Found in tools/font_export/main.py and 13 other locations - About 45 mins to fix
              tools/font_export/main.py on lines 140..142
              tools/font_export/main.py on lines 151..152
              tools/font_export/main.py on lines 161..162
              tools/font_export/main.py on lines 164..165
              tools/font_export/main.py on lines 170..171
              tools/font_export/main.py on lines 173..174
              tools/font_export/main.py on lines 176..177
              tools/font_export/main.py on lines 179..180
              tools/font_export/main.py on lines 182..183
              tools/font_export/main.py on lines 185..186
              tools/font_export/main.py on lines 188..189
              tools/font_export/main.py on lines 191..192
              tools/font_export/main.py on lines 194..195

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

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

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

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

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

              Refactorings

              Further Reading

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

                    this._glyph = this._font.glyphs[
                      String.fromCharCode(this.characterCode)
                        .toLowerCase()
                        .charCodeAt(0)
                    ];
              Severity: Minor
              Found in src/Character.ts and 1 other location - About 40 mins to fix
              src/Character.ts on lines 79..83

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

              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