bptlab/scylla-ui

View on GitHub

Showing 32 of 32 total issues

Function cleanXML has 59 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  export function cleanXML(xml) {
    const isInt = /^-?\s*\d+$/,
          isDig = /^(-?\s*\d+\.?\d*)$/,
          radix = 10;

Severity: Major
Found in src/app/services/file-sharing/xml-postprocessor.ts - About 2 hrs to fix

    Function exports has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    module.exports = function (config) {
      config.set({
        // enable / disable watching file and executing tests whenever any file changes
        autoWatch: true,
    
    
    Severity: Minor
    Found in karma.conf.js - About 1 hr to fix

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

      export class LandingComponent implements OnInit {
      
        constructor() { }
      
        ngOnInit() {
      Severity: Major
      Found in src/app/landing/landing.component.ts and 3 other locations - About 1 hr to fix
      src/app/menu/footer-bar/footer-bar.component.ts on lines 8..15
      src/app/menu/header-bar/header-bar.component.ts on lines 8..15
      src/app/misc/not-found/not-found.component.ts on lines 8..15

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 55.

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

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

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

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

      Refactorings

      Further Reading

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

      export class NotFoundComponent implements OnInit {
      
        constructor() { }
      
        ngOnInit() {
      Severity: Major
      Found in src/app/misc/not-found/not-found.component.ts and 3 other locations - About 1 hr to fix
      src/app/landing/landing.component.ts on lines 8..15
      src/app/menu/footer-bar/footer-bar.component.ts on lines 8..15
      src/app/menu/header-bar/header-bar.component.ts on lines 8..15

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 55.

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

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

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

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

      Refactorings

      Further Reading

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

      export class FooterBarComponent implements OnInit {
      
        constructor() { }
      
        ngOnInit() {
      Severity: Major
      Found in src/app/menu/footer-bar/footer-bar.component.ts and 3 other locations - About 1 hr to fix
      src/app/landing/landing.component.ts on lines 8..15
      src/app/menu/header-bar/header-bar.component.ts on lines 8..15
      src/app/misc/not-found/not-found.component.ts on lines 8..15

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 55.

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

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

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

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

      Refactorings

      Further Reading

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

      export class HeaderBarComponent implements OnInit {
      
        constructor() { }
      
        ngOnInit() {
      Severity: Major
      Found in src/app/menu/header-bar/header-bar.component.ts and 3 other locations - About 1 hr to fix
      src/app/landing/landing.component.ts on lines 8..15
      src/app/menu/footer-bar/footer-bar.component.ts on lines 8..15
      src/app/misc/not-found/not-found.component.ts on lines 8..15

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 55.

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

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

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

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

      Refactorings

      Further Reading

      Avoid deeply nested control flow statements.
      Open

                              for (i = 0, s = -1, e = -1; i < l && e - s <= 15; ++i) {
                                  if (value.charAt(i) > 0) {
                                      if (s === -1) {
                                          s = i;
                                      } else {
      Severity: Major
      Found in src/app/services/file-sharing/xml-postprocessor.ts - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if (e - s <= 15) {
                                    xml[node] = parseFloat(value);
                                }
        Severity: Major
        Found in src/app/services/file-sharing/xml-postprocessor.ts - About 45 mins to fix

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

            getName(fileFormat: string) {
              if (!this['_' + fileFormat]) {
                return null;
              }
              return this['_' + fileFormat].name;
          Severity: Minor
          Found in src/app/services/file-sharing/file-sharing.service.ts and 1 other location - About 40 mins to fix
          src/app/services/file-sharing/file-sharing.service.ts on lines 47..52

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

          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

            getData(fileFormat: string) {
              if (!this['_' + fileFormat]) {
                return null;
              }
              return this['_' + fileFormat].data;
          Severity: Minor
          Found in src/app/services/file-sharing/file-sharing.service.ts and 1 other location - About 40 mins to fix
          src/app/services/file-sharing/file-sharing.service.ts on lines 41..46

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

          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

          export class AppRoutingModule { }
          Severity: Minor
          Found in src/app/app-routing.module.ts and 1 other location - About 35 mins to fix
          src/app/landing/landing-routing.module.ts on lines 28..28

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

          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

          export class LandingRoutingModule { }
          Severity: Minor
          Found in src/app/landing/landing-routing.module.ts and 1 other location - About 35 mins to fix
          src/app/app-routing.module.ts on lines 26..26

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

          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