takahitomiyamoto/heat-sfdx-tooling

View on GitHub

Showing 48 of 48 total issues

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

export const createExternalReferencesTable = (params: any) => {
  return createTable({
    item: params,
    headers: TABLE_HEADER.EXTERNAL_REFERENCES,
    func: {
Severity: Major
Found in src/custom-calls/spec-apex/md/table.ts and 2 other locations - About 1 hr to fix
src/custom-calls/spec-apex/md/table.ts on lines 269..278
src/custom-calls/spec-apex/md/table.ts on lines 299..308

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

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 const createPropertiesTable = (params: any) => {
  return createTable({
    item: params,
    headers: TABLE_HEADER.PROPERTIES,
    func: {
Severity: Major
Found in src/custom-calls/spec-apex/md/table.ts and 2 other locations - About 1 hr to fix
src/custom-calls/spec-apex/md/table.ts on lines 269..278
src/custom-calls/spec-apex/md/table.ts on lines 284..293

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

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 const createConstructorsTable = (params: any) => {
  return createTable({
    item: params,
    headers: TABLE_HEADER.CONSTRUCTORS,
    func: {
Severity: Major
Found in src/custom-calls/spec-apex/md/table.ts and 2 other locations - About 1 hr to fix
src/custom-calls/spec-apex/md/table.ts on lines 284..293
src/custom-calls/spec-apex/md/table.ts on lines 299..308

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

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 extractApexDoc has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const extractApexDoc = (body: any, regexp: any) => {
  body = body.replace(/\r\n?/g, '\n');
  const targetRaws = body.match(regexp.target);

  return !targetRaws
Severity: Minor
Found in src/custom-calls/spec-apex/md/common.ts - About 1 hr to fix

    Function buildExternalReferences has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const buildExternalReferences = (
      auth: authorization,
      jsonApexMember: any
    ) => {
      const _items = jsonApexMember.externalReferences;
    Severity: Minor
    Found in src/custom-calls/spec-apex/md/body.ts - About 1 hr to fix

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

      async function postComposite(params: authorization) {
        const _options = setOptionsPostComposite(params);
        const _requestBody = JSON.stringify(params.options.body);
      
        return await httpRequest(_options, _requestBody);
      Severity: Major
      Found in src/composite/composite.ts and 2 other locations - About 1 hr to fix
      src/objects/container-async-request.ts on lines 67..71
      src/objects/metadata-container.ts on lines 66..71

      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

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

      async function postContainerAsyncRequest(params: authorization) {
        const _options = setOptionsPostContainerAsyncRequest(params);
        const _requestBody = JSON.stringify(params.options.body);
        return await httpRequest(_options, _requestBody);
      }
      Severity: Major
      Found in src/objects/container-async-request.ts and 2 other locations - About 1 hr to fix
      src/composite/composite.ts on lines 33..38
      src/objects/metadata-container.ts on lines 66..71

      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

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

      async function postMetadataContainer(params: authorization) {
        const _options = setOptionsPostMetadataContainer(params);
        const _requestBody = JSON.stringify(params.options.body);
      
        return await httpRequest(_options, _requestBody);
      Severity: Major
      Found in src/objects/metadata-container.ts and 2 other locations - About 1 hr to fix
      src/composite/composite.ts on lines 33..38
      src/objects/container-async-request.ts on lines 67..71

      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 buildExternalReferences has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      export const buildExternalReferences = (
        auth: authorization,
        jsonApexMember: any
      ) => {
        const _items = jsonApexMember.externalReferences;
      Severity: Minor
      Found in src/custom-calls/spec-apex/md/body.ts - About 1 hr 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 buildMethods has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const buildMethods = (auth: authorization, jsonApexMember: any) => {
        const _items = jsonApexMember.methods;
      
        const result = [];
        result.push({ h2: TITLE.METHODS });
      Severity: Minor
      Found in src/custom-calls/spec-apex/md/body.ts - About 1 hr to fix

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

        const _convertSignature = (signature: string) => {
          return signature
            .replace(REGEXP.PARAM_LEFT_PARENTHESIS, '(\n  ')
            .replace(REGEXP.PARAM_RIGHT_PARENTHESIS, '\n)')
            .replace(REGEXP.PARAM_COMMA, ',\n  ');
        Severity: Major
        Found in src/custom-calls/spec-apex/md/code.ts and 1 other location - About 1 hr to fix
        src/custom-calls/spec-apex/md/common.ts on lines 366..371

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

        const convertSignature = (signature: string) => {
          return signature
            .replace(REGEXP.PARAM_LEFT_PARENTHESIS, '(\n  ')
            .replace(REGEXP.PARAM_RIGHT_PARENTHESIS, '\n)')
            .replace(REGEXP.PARAM_COMMA, ',\n  ');
        Severity: Major
        Found in src/custom-calls/spec-apex/md/common.ts and 1 other location - About 1 hr to fix
        src/custom-calls/spec-apex/md/code.ts on lines 12..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 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 5 locations. Consider refactoring.
        Open

        export const createHeaderTable = (params: any) => {
          return createTable({
            item: params,
            headers: TABLE_HEADER.HEADER,
            func: {
        Severity: Major
        Found in src/custom-calls/spec-apex/md/table.ts and 4 other locations - About 1 hr to fix
        src/custom-calls/spec-apex/md/table.ts on lines 227..235
        src/custom-calls/spec-apex/md/table.ts on lines 241..249
        src/custom-calls/spec-apex/md/table.ts on lines 255..263
        src/custom-calls/spec-apex/md/table.ts on lines 314..322

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

        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

        export const createApexDocTable = (params: any) => {
          return createTable({
            item: params,
            headers: TABLE_HEADER.APEX_DOC,
            func: {
        Severity: Major
        Found in src/custom-calls/spec-apex/md/table.ts and 4 other locations - About 1 hr to fix
        src/custom-calls/spec-apex/md/table.ts on lines 213..221
        src/custom-calls/spec-apex/md/table.ts on lines 227..235
        src/custom-calls/spec-apex/md/table.ts on lines 241..249
        src/custom-calls/spec-apex/md/table.ts on lines 314..322

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

        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

        export const createMethodsTable = (params: any) => {
          return createTable({
            item: params,
            headers: TABLE_HEADER.METHODS,
            func: {
        Severity: Major
        Found in src/custom-calls/spec-apex/md/table.ts and 4 other locations - About 1 hr to fix
        src/custom-calls/spec-apex/md/table.ts on lines 213..221
        src/custom-calls/spec-apex/md/table.ts on lines 227..235
        src/custom-calls/spec-apex/md/table.ts on lines 241..249
        src/custom-calls/spec-apex/md/table.ts on lines 255..263

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

        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

        export const createTriggerTable = (params: any) => {
          return createTable({
            item: params,
            headers: TABLE_HEADER.TRIGGER,
            func: {
        Severity: Major
        Found in src/custom-calls/spec-apex/md/table.ts and 4 other locations - About 1 hr to fix
        src/custom-calls/spec-apex/md/table.ts on lines 213..221
        src/custom-calls/spec-apex/md/table.ts on lines 227..235
        src/custom-calls/spec-apex/md/table.ts on lines 255..263
        src/custom-calls/spec-apex/md/table.ts on lines 314..322

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

        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

        export const createClassTable = (params: any) => {
          return createTable({
            item: params,
            headers: TABLE_HEADER.CLASS,
            func: {
        Severity: Major
        Found in src/custom-calls/spec-apex/md/table.ts and 4 other locations - About 1 hr to fix
        src/custom-calls/spec-apex/md/table.ts on lines 213..221
        src/custom-calls/spec-apex/md/table.ts on lines 241..249
        src/custom-calls/spec-apex/md/table.ts on lines 255..263
        src/custom-calls/spec-apex/md/table.ts on lines 314..322

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

        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 _variables = !item?.variables?.length
                ? ['-']
                : item.variables?.map((variable: any) => {
                    return variable.name;
                  });
        Severity: Minor
        Found in src/custom-calls/spec-apex/md/body.ts and 1 other location - About 55 mins to fix
        src/custom-calls/spec-apex/md/body.ts on lines 40..44

        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

              const _methods = !item?.methods?.length
                ? ['-']
                : item.methods?.map((method: any) => {
                    return method.name;
                  });
        Severity: Minor
        Found in src/custom-calls/spec-apex/md/body.ts and 1 other location - About 55 mins to fix
        src/custom-calls/spec-apex/md/body.ts on lines 35..39

        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

                const key = signature
                  .replace(regexp.keyStart, '')
                  .replace(REGEXP.PARAM_LIST_TYPE, '')
                  .replace(REGEXP.PARAM_LEFT_PARENTHESIS, '(')
                  .replace(REGEXP.PARAM_RIGHT_PARENTHESIS, ')')
        Severity: Minor
        Found in src/custom-calls/spec-apex/md/common.ts and 1 other location - About 55 mins to fix
        src/custom-calls/spec-apex/md/common.ts on lines 196..200

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

        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