mtxr/vscode-sqltools

View on GitHub

Showing 131 of 131 total issues

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

  getLineCommentToken(input: string): Token {
    return this.getTokenOnFirstMatch({
      input,
      type: TokenTypes.LINE_COMMENT,
      regex: this.LINE_COMMENT_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 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
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.iconsPath = vscode.Uri.file(path.resolve(this.context.extensionPath, 'icons')).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 124..124

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

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

          conn.exec(query, (err, rows) => {
            if (err) {
              return this.resolveErr(resolve, err, query);
            }
            return this.resolveQueryResults(resolve, rows, query);
Severity: Minor
Found in packages/drivers/src/driver/saphana/index.ts and 1 other location - About 50 mins to fix
packages/drivers/src/driver/saphana/index.ts on lines 98..103

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

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

            statement.exec(args, (err, rows) => {
              if (err) {
                return this.resolveErr(resolve, err, query);
              }
              return this.resolveQueryResults(resolve, rows, query);
Severity: Minor
Found in packages/drivers/src/driver/saphana/index.ts and 1 other location - About 50 mins to fix
packages/drivers/src/driver/saphana/index.ts on lines 106..111

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

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

      this.resultsWebview.get(payload[0].connId || this.explorer.getActive().id).updateResults(payload);
Severity: Major
Found in packages/plugins/connection-manager/extension.ts and 2 other locations - About 45 mins to fix
packages/plugins/connection-manager/extension.ts on lines 91..91
packages/plugins/connection-manager/extension.ts on lines 242..242

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

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

      this.resultsWebview.get(payload[0].connId || this.explorer.getActive().id).updateResults(payload);
Severity: Major
Found in packages/plugins/connection-manager/extension.ts and 2 other locations - About 45 mins to fix
packages/plugins/connection-manager/extension.ts on lines 79..79
packages/plugins/connection-manager/extension.ts on lines 242..242

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

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

const MySQL = ({ settings, updateSettings, ...props }) => (
  <GenericSettings settings={settings} updateSettings={updateSettings} {...props}/>
);
Severity: Major
Found in packages/ui/screens/Settings/Drivers/MySQL.tsx and 4 other locations - About 45 mins to fix
packages/ui/screens/Settings/Drivers/DB2.tsx on lines 4..6
packages/ui/screens/Settings/Drivers/MSSQL.tsx on lines 4..6
packages/ui/screens/Settings/Drivers/OracleDB.tsx on lines 4..6
packages/ui/screens/Settings/Drivers/PostgreSQL.tsx on lines 4..6

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

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

    [id: string]: {
      tables: NSDatabase.ITable[];
      columns: NSDatabase.IColumn[];
      functions: NSDatabase.IFunction[];
    };
Severity: Minor
Found in packages/plugins/connection-manager/store/state.ts and 1 other location - About 45 mins to fix
packages/plugins/connection-manager/store/actions.ts on lines 21..25

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

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

  constructor(props) {
    super(props);
    window.addEventListener('message', ev => this.messagesHandler(ev.data as IWebviewMessage));
  }
Severity: Minor
Found in packages/ui/screens/Settings/Screen.tsx and 1 other location - About 45 mins to fix
packages/ui/screens/Results/Screen.tsx on lines 24..27

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

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 (tagSymbol == tagChar) {
              isInTag = false;
            }
Severity: Major
Found in packages/core/utils/query/parse.ts - About 45 mins to fix

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

      data: {
        tables: NSDatabase.ITable[];
        columns?: NSDatabase.IColumn[];
        functions: NSDatabase.IFunction[];
      }
    Severity: Minor
    Found in packages/plugins/connection-manager/store/actions.ts and 1 other location - About 45 mins to fix
    packages/plugins/connection-manager/store/state.ts on lines 13..17

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

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

    const OracleDB = ({ settings, updateSettings, ...props }) => (
      <GenericSettings settings={settings} updateSettings={updateSettings} {...props}/>
    );
    Severity: Major
    Found in packages/ui/screens/Settings/Drivers/OracleDB.tsx and 4 other locations - About 45 mins to fix
    packages/ui/screens/Settings/Drivers/DB2.tsx on lines 4..6
    packages/ui/screens/Settings/Drivers/MSSQL.tsx on lines 4..6
    packages/ui/screens/Settings/Drivers/MySQL.tsx on lines 4..6
    packages/ui/screens/Settings/Drivers/PostgreSQL.tsx on lines 4..6

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

    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

      constructor(props) {
        super(props);
        window.addEventListener('message', ev => this.messagesHandler(ev.data as IWebviewMessage));
      }
    Severity: Minor
    Found in packages/ui/screens/Results/Screen.tsx and 1 other location - About 45 mins to fix
    packages/ui/screens/Settings/Screen.tsx on lines 108..111

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

    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 Chevron = () => (<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>);
    Severity: Minor
    Found in docs/src/components/RenderSettings/Chevron.tsx and 1 other location - About 45 mins to fix
    docs/src/components/RenderSettings/index.tsx on lines 19..19

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

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

    const DB2 = ({ settings, updateSettings, ...props }) => (
      <GenericSettings settings={settings} updateSettings={updateSettings} {...props}/>
    );
    Severity: Major
    Found in packages/ui/screens/Settings/Drivers/DB2.tsx and 4 other locations - About 45 mins to fix
    packages/ui/screens/Settings/Drivers/MSSQL.tsx on lines 4..6
    packages/ui/screens/Settings/Drivers/MySQL.tsx on lines 4..6
    packages/ui/screens/Settings/Drivers/OracleDB.tsx on lines 4..6
    packages/ui/screens/Settings/Drivers/PostgreSQL.tsx on lines 4..6

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

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

          this.resultsWebview.get(payload[0].connId || this.explorer.getActive().id).updateResults(payload);
    Severity: Major
    Found in packages/plugins/connection-manager/extension.ts and 2 other locations - About 45 mins to fix
    packages/plugins/connection-manager/extension.ts on lines 79..79
    packages/plugins/connection-manager/extension.ts on lines 91..91

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

    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