autowp/autowp-frontend

View on GitHub

Showing 647 of 647 total issues

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

export class AttrsClient {
  private client: GrpcClient<any>;

  /**
   * Raw RPC implementation for each service client method.
Severity: Major
Found in src/grpc/spec.pbsc.ts and 1 other location - About 1 wk to fix
src/grpc/spec.pbsc.ts on lines 1422..1699

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

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 UsersClient {
  private client: GrpcClient<any>;

  /**
   * Raw RPC implementation for each service client method.
Severity: Major
Found in src/grpc/spec.pbsc.ts and 1 other location - About 1 wk to fix
src/grpc/spec.pbsc.ts on lines 4020..4297

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

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 TrafficClient {
  private client: GrpcClient<any>;

  /**
   * Raw RPC implementation for each service client method.
Severity: Major
Found in src/grpc/spec.pbsc.ts and 1 other location - About 1 wk to fix
src/grpc/spec.pbsc.ts on lines 3558..3798

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

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 MessagingClient {
  private client: GrpcClient<any>;

  /**
   * Raw RPC implementation for each service client method.
Severity: Major
Found in src/grpc/spec.pbsc.ts and 1 other location - About 1 wk to fix
src/grpc/spec.pbsc.ts on lines 1006..1246

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

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 spec.pbsc.ts has 2556 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
//
// THIS IS A GENERATED FILE
Severity: Major
Found in src/grpc/spec.pbsc.ts - About 1 wk to fix

    Function Jcrop has a Cognitive Complexity of 346 (exceeds 5 allowed). Consider refactoring.
    Open

    function Jcrop(obj, opt) {
    
      let $img;
      let xscale;
      let yscale;
    Severity: Minor
    Found in src/app/jcrop/jquery.Jcrop.js - About 1 wk to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function Jcrop has 1066 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function Jcrop(obj, opt) {
    
      let $img;
      let xscale;
      let yscale;
    Severity: Major
    Found in src/app/jcrop/jquery.Jcrop.js - About 5 days to fix

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

      export module Help {
        /**
         * Standard JavaScript object representation for Help
         */
        export interface AsObject {
      Severity: Major
      Found in src/grpc/google/rpc/error-details.pb.ts and 2 other locations - About 4 days to fix
      src/grpc/google/rpc/error-details.pb.ts on lines 446..615
      src/grpc/google/rpc/error-details.pb.ts on lines 1437..1609

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

      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

      export module QuotaFailure {
        /**
         * Standard JavaScript object representation for QuotaFailure
         */
        export interface AsObject {
      Severity: Major
      Found in src/grpc/google/rpc/error-details.pb.ts and 2 other locations - About 4 days to fix
      src/grpc/google/rpc/error-details.pb.ts on lines 1437..1609
      src/grpc/google/rpc/error-details.pb.ts on lines 2082..2245

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

      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

      export module BadRequest {
        /**
         * Standard JavaScript object representation for BadRequest
         */
        export interface AsObject {
      Severity: Major
      Found in src/grpc/google/rpc/error-details.pb.ts and 2 other locations - About 4 days to fix
      src/grpc/google/rpc/error-details.pb.ts on lines 446..615
      src/grpc/google/rpc/error-details.pb.ts on lines 2082..2245

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

      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 Help implements GrpcMessage {
        static id = 'google.rpc.Help';
      
        /**
         * Deserialize binary data to message
      Severity: Major
      Found in src/grpc/google/rpc/error-details.pb.ts and 3 other locations - About 4 days to fix
      src/grpc/google/rpc/error-details.pb.ts on lines 316..445
      src/grpc/google/rpc/error-details.pb.ts on lines 982..1114
      src/grpc/google/rpc/error-details.pb.ts on lines 1308..1436

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

      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 PreconditionFailure implements GrpcMessage {
        static id = 'google.rpc.PreconditionFailure';
      
        /**
         * Deserialize binary data to message
      Severity: Major
      Found in src/grpc/google/rpc/error-details.pb.ts and 3 other locations - About 4 days to fix
      src/grpc/google/rpc/error-details.pb.ts on lines 316..445
      src/grpc/google/rpc/error-details.pb.ts on lines 1308..1436
      src/grpc/google/rpc/error-details.pb.ts on lines 1962..2081

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

      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 BadRequest implements GrpcMessage {
        static id = 'google.rpc.BadRequest';
      
        /**
         * Deserialize binary data to message
      Severity: Major
      Found in src/grpc/google/rpc/error-details.pb.ts and 3 other locations - About 4 days to fix
      src/grpc/google/rpc/error-details.pb.ts on lines 316..445
      src/grpc/google/rpc/error-details.pb.ts on lines 982..1114
      src/grpc/google/rpc/error-details.pb.ts on lines 1962..2081

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

      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 QuotaFailure implements GrpcMessage {
        static id = 'google.rpc.QuotaFailure';
      
        /**
         * Deserialize binary data to message
      Severity: Major
      Found in src/grpc/google/rpc/error-details.pb.ts and 3 other locations - About 4 days to fix
      src/grpc/google/rpc/error-details.pb.ts on lines 982..1114
      src/grpc/google/rpc/error-details.pb.ts on lines 1308..1436
      src/grpc/google/rpc/error-details.pb.ts on lines 1962..2081

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

      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 error-details.pb.ts has 1481 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* tslint:disable */
      /* eslint-disable */
      // @ts-nocheck
      //
      // THIS IS A GENERATED FILE
      Severity: Major
      Found in src/grpc/google/rpc/error-details.pb.ts - About 3 days to fix

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

        const vehicleTypesRp = {
          'car-type-rp/2-floor-bus': $localize`:Vehicle type in context of "most fastest among Roadsters"@@car-type-rp/2-floor-bus:2-floor buses`,
          'car-type-rp/2door-hardtop': $localize`:Vehicle type in context of "most fastest among Roadsters"@@car-type-rp/2door-hardtop:2-door hardtops`,
          'car-type-rp/4door-hardtop': $localize`:Vehicle type in context of "most fastest among Roadsters"@@car-type-rp/4door-hardtop:4-door hardtops`,
          'car-type-rp/barchetta': $localize`:Vehicle type in context of "most fastest among Roadsters"@@car-type-rp/barchetta:Barchettas`,
        Severity: Major
        Found in src/app/utils/translations.ts and 1 other location - About 3 days to fix
        src/app/utils/translations.ts on lines 203..243

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

        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 vehicleTypes = {
          'car-type/2-floor-bus': $localize`2-floor bus`,
          'car-type/2door-hardtop': $localize`2-door hardtop`,
          'car-type/4door-hardtop': $localize`4-door hardtop`,
          'car-type/barchetta': $localize`Barchetta`,
        Severity: Major
        Found in src/app/utils/translations.ts and 1 other location - About 3 days to fix
        src/app/utils/translations.ts on lines 245..285

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

        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 StatisticsClient {
          private client: GrpcClient<any>;
        
          /**
           * Raw RPC implementation for each service client method.
        Severity: Major
        Found in src/grpc/spec.pbsc.ts and 1 other location - About 3 days to fix
        src/grpc/spec.pbsc.ts on lines 909..1001

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

        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 ArticlesClient {
          private client: GrpcClient<any>;
        
          /**
           * Raw RPC implementation for each service client method.
        Severity: Major
        Found in src/grpc/spec.pbsc.ts and 1 other location - About 3 days to fix
        src/grpc/spec.pbsc.ts on lines 3803..3895

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

        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 jquery.Jcrop.js has 1104 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /**
         * jquery.Jcrop.js v0.9.12
         * jQuery Image Cropping Plugin - released under MIT License
         * Author: Kelly Hallman <khallman@gmail.com>
         * http://github.com/tapmodo/Jcrop
        Severity: Major
        Found in src/app/jcrop/jquery.Jcrop.js - About 2 days to fix
          Severity
          Category
          Status
          Source
          Language