mtxr/vscode-sqltools

View on GitHub

Showing 131 of 131 total issues

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

      case 'testConnectionError':
        this.setState({
          loading: false,
          externalMessage: ((payload && payload.message ? payload.message : payload) || '').toString(),
          externalMessageType: 'error'
Severity: Major
Found in packages/ui/screens/Settings/Screen.tsx and 1 other location - About 1 hr to fix
packages/ui/screens/Settings/Screen.tsx on lines 66..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 61.

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 getClientOptions has 57 lines of code (exceeds 50 allowed). Consider refactoring.
Open

  private getClientOptions(): LanguageClientOptions {
    const telemetryArgs: ITelemetryArgs = {
      enableTelemetry: ConfigManager.telemetry,
      extraInfo: {
        sessId: VSCodeEnv.sessionId,
Severity: Major
Found in packages/extension/language-client/client.ts - About 1 hr to fix

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

        sp.stdout.on('data', data => {
          output.stdout += data.toString();
          output.full += data.toString();
        });
    Severity: Major
    Found in tools/add-driver.js and 3 other locations - About 1 hr to fix
    tools/add-driver.js on lines 19..22
    tools/add-driver.js on lines 23..26
    tools/add-driver.js on lines 48..51

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

    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

        sp.stderr.on('data', data => {
          output.stderr += data.toString();
          output.full += data.toString();
        });
    Severity: Major
    Found in tools/add-driver.js and 3 other locations - About 1 hr to fix
    tools/add-driver.js on lines 19..22
    tools/add-driver.js on lines 23..26
    tools/add-driver.js on lines 44..47

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

    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

        sp.stdout.on('data', data => {
          output.stdout += data.toString();
          output.full += data.toString();
        });
    Severity: Major
    Found in tools/add-driver.js and 3 other locations - About 1 hr to fix
    tools/add-driver.js on lines 23..26
    tools/add-driver.js on lines 44..47
    tools/add-driver.js on lines 48..51

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

    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

        sp.stderr.on('data', data => {
          output.stderr += data.toString();
          output.full += data.toString();
        });
    Severity: Major
    Found in tools/add-driver.js and 3 other locations - About 1 hr to fix
    tools/add-driver.js on lines 19..22
    tools/add-driver.js on lines 44..47
    tools/add-driver.js on lines 48..51

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

    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

            ib.title = `Value for '${params[ib.step - 1].param}' in '${params[ib.step - 1].string}'`;
    Severity: Major
    Found in packages/plugins/connection-manager/extension.ts and 1 other location - About 1 hr to fix
    packages/plugins/connection-manager/extension.ts on lines 212..212

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

    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

              ib.title = `Value for '${params[ib.step - 1].param}' in '${params[ib.step - 1].string}'`;
    Severity: Major
    Found in packages/plugins/connection-manager/extension.ts and 1 other location - About 1 hr to fix
    packages/plugins/connection-manager/extension.ts on lines 201..201

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

    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 dependencies = Object.assign(
      {},
      uiPkgJson.dependencies || {},
      lsPkgJson.dependencies || {},
      corePkgJson.dependencies || {},
    Severity: Major
    Found in packages/extension/webpack.config.js and 1 other location - About 1 hr to fix
    packages/extension/webpack.config.js on lines 23..29

    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

    Consider simplifying this complex logical expression.
    Open

          if (
            isInComment == true &&
            (((commentChar == '#' || commentChar == '-') && char == '\n') ||
              (commentChar == '/' && (char == '*' && nextChar == '/')))
          ) {
    Severity: Major
    Found in packages/core/utils/query/parse.ts - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

            if (
              ((char == '#' && nextChar == ' ') || (char == '-' && nextChar == '-') || (char == '/' && nextChar == '*')) &&
              isInString == false
            ) {
              isInComment = true;
      Severity: Major
      Found in packages/core/utils/query/parse.ts - About 1 hr to fix

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

        const devDependencies = Object.assign(
          {},
          uiPkgJson.devDependencies || {},
          lsPkgJson.devDependencies || {},
          corePkgJson.devDependencies || {},
        Severity: Major
        Found in packages/extension/webpack.config.js and 1 other location - About 1 hr to fix
        packages/extension/webpack.config.js on lines 16..22

        Duplicated Code

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

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

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

        Tuning

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

          getNewlineReservedToken(input: string): Token {
            return this.getTokenOnFirstMatch({
              input,
              type: TokenTypes.RESERVED_NEWLINE,
              regex: this.RESERVED_NEWLINE_REGEX,
        Severity: Major
        Found in packages/formatter/src/core/Tokenizer.ts and 11 other locations - About 55 mins to fix
        packages/formatter/src/core/Tokenizer.ts on lines 160..166
        packages/formatter/src/core/Tokenizer.ts on lines 172..178
        packages/formatter/src/core/Tokenizer.ts on lines 180..186
        packages/formatter/src/core/Tokenizer.ts on lines 188..194
        packages/formatter/src/core/Tokenizer.ts on lines 196..202
        packages/formatter/src/core/Tokenizer.ts on lines 204..210
        packages/formatter/src/core/Tokenizer.ts on lines 281..287
        packages/formatter/src/core/Tokenizer.ts on lines 315..321
        packages/formatter/src/core/Tokenizer.ts on lines 323..329
        packages/formatter/src/core/Tokenizer.ts on lines 339..345
        packages/formatter/src/core/Tokenizer.ts on lines 347..353

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

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

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

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

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

        Refactorings

        Further Reading

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

          getWordToken(input: string): Token {
            return this.getTokenOnFirstMatch({
              input,
              type: TokenTypes.WORD,
              regex: this.WORD_REGEX,
        Severity: Major
        Found in packages/formatter/src/core/Tokenizer.ts and 11 other locations - About 55 mins to fix
        packages/formatter/src/core/Tokenizer.ts on lines 160..166
        packages/formatter/src/core/Tokenizer.ts on lines 172..178
        packages/formatter/src/core/Tokenizer.ts on lines 180..186
        packages/formatter/src/core/Tokenizer.ts on lines 188..194
        packages/formatter/src/core/Tokenizer.ts on lines 196..202
        packages/formatter/src/core/Tokenizer.ts on lines 204..210
        packages/formatter/src/core/Tokenizer.ts on lines 281..287
        packages/formatter/src/core/Tokenizer.ts on lines 315..321
        packages/formatter/src/core/Tokenizer.ts on lines 323..329
        packages/formatter/src/core/Tokenizer.ts on lines 331..337
        packages/formatter/src/core/Tokenizer.ts on lines 339..345

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

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

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

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

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

        Refactorings

        Further Reading

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

          getStringToken(input: string): Token {
            return this.getTokenOnFirstMatch({
              input,
              type: TokenTypes.STRING,
              regex: this.STRING_REGEX,
        Severity: Major
        Found in packages/formatter/src/core/Tokenizer.ts and 11 other locations - About 55 mins to fix
        packages/formatter/src/core/Tokenizer.ts on lines 160..166
        packages/formatter/src/core/Tokenizer.ts on lines 172..178
        packages/formatter/src/core/Tokenizer.ts on lines 180..186
        packages/formatter/src/core/Tokenizer.ts on lines 196..202
        packages/formatter/src/core/Tokenizer.ts on lines 204..210
        packages/formatter/src/core/Tokenizer.ts on lines 281..287
        packages/formatter/src/core/Tokenizer.ts on lines 315..321
        packages/formatter/src/core/Tokenizer.ts on lines 323..329
        packages/formatter/src/core/Tokenizer.ts on lines 331..337
        packages/formatter/src/core/Tokenizer.ts on lines 339..345
        packages/formatter/src/core/Tokenizer.ts on lines 347..353

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

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

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

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

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

        Refactorings

        Further Reading

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

          getToplevelReservedToken(input: string): Token {
            return this.getTokenOnFirstMatch({
              input,
              type: TokenTypes.RESERVED_TOPLEVEL,
              regex: this.RESERVED_TOPLEVEL_REGEX,
        Severity: Major
        Found in packages/formatter/src/core/Tokenizer.ts and 11 other locations - About 55 mins to fix
        packages/formatter/src/core/Tokenizer.ts on lines 160..166
        packages/formatter/src/core/Tokenizer.ts on lines 172..178
        packages/formatter/src/core/Tokenizer.ts on lines 180..186
        packages/formatter/src/core/Tokenizer.ts on lines 188..194
        packages/formatter/src/core/Tokenizer.ts on lines 196..202
        packages/formatter/src/core/Tokenizer.ts on lines 204..210
        packages/formatter/src/core/Tokenizer.ts on lines 281..287
        packages/formatter/src/core/Tokenizer.ts on lines 315..321
        packages/formatter/src/core/Tokenizer.ts on lines 331..337
        packages/formatter/src/core/Tokenizer.ts on lines 339..345
        packages/formatter/src/core/Tokenizer.ts on lines 347..353

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

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

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

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

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

        Refactorings

        Further Reading

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

          getToplevelTablePrefixReservedToken(input: string): Token {
            return this.getTokenOnFirstMatch({
              input,
              type: TokenTypes.TABLENAME_PREFIX,
              regex: this.TABLE_NAME_PREFIX_REGEX,
        Severity: Major
        Found in packages/formatter/src/core/Tokenizer.ts and 11 other locations - About 55 mins to fix
        packages/formatter/src/core/Tokenizer.ts on lines 160..166
        packages/formatter/src/core/Tokenizer.ts on lines 172..178
        packages/formatter/src/core/Tokenizer.ts on lines 180..186
        packages/formatter/src/core/Tokenizer.ts on lines 188..194
        packages/formatter/src/core/Tokenizer.ts on lines 196..202
        packages/formatter/src/core/Tokenizer.ts on lines 204..210
        packages/formatter/src/core/Tokenizer.ts on lines 281..287
        packages/formatter/src/core/Tokenizer.ts on lines 323..329
        packages/formatter/src/core/Tokenizer.ts on lines 331..337
        packages/formatter/src/core/Tokenizer.ts on lines 339..345
        packages/formatter/src/core/Tokenizer.ts on lines 347..353

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

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

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

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

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

        Refactorings

        Further Reading

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

          getOpenParenToken(input: string): Token {
            return this.getTokenOnFirstMatch({
              input,
              type: TokenTypes.OPEN_PAREN,
              regex: this.OPEN_PAREN_REGEX,
        Severity: Major
        Found in packages/formatter/src/core/Tokenizer.ts and 11 other locations - About 55 mins to fix
        packages/formatter/src/core/Tokenizer.ts on lines 160..166
        packages/formatter/src/core/Tokenizer.ts on lines 172..178
        packages/formatter/src/core/Tokenizer.ts on lines 180..186
        packages/formatter/src/core/Tokenizer.ts on lines 188..194
        packages/formatter/src/core/Tokenizer.ts on lines 204..210
        packages/formatter/src/core/Tokenizer.ts on lines 281..287
        packages/formatter/src/core/Tokenizer.ts on lines 315..321
        packages/formatter/src/core/Tokenizer.ts on lines 323..329
        packages/formatter/src/core/Tokenizer.ts on lines 331..337
        packages/formatter/src/core/Tokenizer.ts on lines 339..345
        packages/formatter/src/core/Tokenizer.ts on lines 347..353

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

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

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

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

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

        Refactorings

        Further Reading

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

          getCloseParenToken(input: string): Token {
            return this.getTokenOnFirstMatch({
              input,
              type: TokenTypes.CLOSE_PAREN,
              regex: this.CLOSE_PAREN_REGEX,
        Severity: Major
        Found in packages/formatter/src/core/Tokenizer.ts and 11 other locations - About 55 mins to fix
        packages/formatter/src/core/Tokenizer.ts on lines 160..166
        packages/formatter/src/core/Tokenizer.ts on lines 172..178
        packages/formatter/src/core/Tokenizer.ts on lines 180..186
        packages/formatter/src/core/Tokenizer.ts on lines 188..194
        packages/formatter/src/core/Tokenizer.ts on lines 196..202
        packages/formatter/src/core/Tokenizer.ts on lines 281..287
        packages/formatter/src/core/Tokenizer.ts on lines 315..321
        packages/formatter/src/core/Tokenizer.ts on lines 323..329
        packages/formatter/src/core/Tokenizer.ts on lines 331..337
        packages/formatter/src/core/Tokenizer.ts on lines 339..345
        packages/formatter/src/core/Tokenizer.ts on lines 347..353

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

        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.viewsPath = vscode.Uri.file(path.resolve(this.context.extensionPath, 'ui')).with({ scheme: 'vscode-resource' });
        Severity: Minor
        Found in packages/plugins/connection-manager/screens/results.ts and 1 other location - About 55 mins to fix
        packages/plugins/connection-manager/screens/results.ts on lines 123..123

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

        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