Oluwasegun-AA/md-generator

View on GitHub

Showing 67 of 70 total issues

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

program
  .command('list [env]')
  .description('list All Required/optional .md files')
  .option('-O --optional', 'list all optional files')
  .option('-R --required', 'list all required files')
Severity: Major
Found in src/index.ts and 1 other location - About 1 hr to fix
src/index.ts on lines 35..42

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

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

program
  .command('check [env]')
  .description('check for missing .md files')
  .option('-O, --optional', 'check all optional files')
  .option('-R, --required', 'check all required files')
Severity: Major
Found in src/index.ts and 1 other location - About 1 hr to fix
src/index.ts on lines 14..21

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

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

export const createMdFiles = async (USE_DEFAULT: boolean, filesToBeCreated: string[] | ICurrentFile[], isEmpty: boolean): Promise<void> => {
  const { validFileNames, inValidFileNames }: ISortedFiles = await handleOverride(filesToBeCreated);
  if (validFileNames.length === 0 && inValidFileNames.length === 0) {
    useHelpAlert({
      errorText: 'Error:  No option selected, Press <space> to select, <a> to toggle all, <i> to invert selection',
Severity: Minor
Found in src/core/actions/createActions/index.ts - About 1 hr to fix

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

    const removeRequired = (files: ICurrentFile[]): IQuestionResponse => ({
      type: 'checkbox',
      name: 'removeFiles',
      message:
        'Which of the following REQUIRED .md files(s) would you like to delete?\n',
    src/core/questions/setupQuestions/createCommand/createInit.ts on lines 29..34
    src/core/questions/setupQuestions/createCommand/createInit.ts on lines 55..61

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

    const selectFileToCreate = (files: ICurrentFile[]): IQuestionResponse => ({
      type: 'checkbox',
      name: 'createFiles',
      message: 'Which of the following .md files would you like to create?\n',
      choices: [...getFullFileNames(files)],
    src/core/questions/setupQuestions/createCommand/createInit.ts on lines 55..61
    src/core/questions/setupQuestions/removeCommand/removeInit.ts on lines 36..42

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

    const createRequired = (files: ICurrentFile[]): IQuestionResponse => ({
      type: 'checkbox',
      name: 'createFiles',
      message:
        'Which of the following REQUIRED .md files would you like to create?\n',
    src/core/questions/setupQuestions/createCommand/createInit.ts on lines 29..34
    src/core/questions/setupQuestions/removeCommand/removeInit.ts on lines 36..42

    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

    program
      .command('create [env]')
      .description('create All/specific files')
      .option('-O, --optional', 'create all optional files')
      .option('-R, --required', 'create all required files')
    Severity: Major
    Found in src/index.ts and 1 other location - About 1 hr to fix
    src/index.ts on lines 44..53

    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

    program
      .command('remove [env]')
      .description('remove All/specific .md files')
      .option('-A, --all', 'remove all .md files')
      .option('-O, --optional', 'remove all optional files')
    Severity: Major
    Found in src/index.ts and 1 other location - About 1 hr to fix
    src/index.ts on lines 23..30

    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

      public static check = (args: any): IArguments => {
        const { optional, required }: any = args;
        return { optional, required };
      };
    Severity: Minor
    Found in src/core/coreUtils/index.ts and 1 other location - About 55 mins to fix
    src/core/coreUtils/index.ts on lines 37..40

    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

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

      public static list: any = (args: any): IArguments => {
        const { optional, required }: any = args;
        return { optional, required };
      };
    Severity: Minor
    Found in src/core/coreUtils/index.ts and 1 other location - About 55 mins to fix
    src/core/coreUtils/index.ts on lines 59..62

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

      public static list: any = (args: any, resp: ICurrentFile): void => {
        const values = getValues(args, resp);
        listHandler(values);
      }
    Severity: Major
    Found in src/core/actions/index.ts and 3 other locations - About 40 mins to fix
    src/core/actions/index.ts on lines 17..20
    src/core/actions/index.ts on lines 22..25
    src/core/actions/index.ts on lines 27..30

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

    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

      public static remove: any = (args: any, resp: ICurrentFile): void => {
        const values = getValues(args, resp);
        removeHandler(values);
      }
    Severity: Major
    Found in src/core/actions/index.ts and 3 other locations - About 40 mins to fix
    src/core/actions/index.ts on lines 12..15
    src/core/actions/index.ts on lines 17..20
    src/core/actions/index.ts on lines 22..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 49.

    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

      public static create: any = (args: any, resp: ICurrentFile): void => {
        const values = getValues(args, resp);
        createHandler(values);
      }
    Severity: Major
    Found in src/core/actions/index.ts and 3 other locations - About 40 mins to fix
    src/core/actions/index.ts on lines 12..15
    src/core/actions/index.ts on lines 22..25
    src/core/actions/index.ts on lines 27..30

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

    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

      public static check: any = (args: any, resp: ICurrentFile): void => {
        const values = getValues(args, resp);
        checkHandler(values);
      }
    Severity: Major
    Found in src/core/actions/index.ts and 3 other locations - About 40 mins to fix
    src/core/actions/index.ts on lines 12..15
    src/core/actions/index.ts on lines 17..20
    src/core/actions/index.ts on lines 27..30

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

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

    const usageInfo = (projectInfos: IProjectInfos): IQuestionResponse => ({
      type: 'input',
      message: '  Usage command or instruction (use empty value to skip)',
      name: 'usage',
      default: projectInfos.usage,
    Severity: Major
    Found in src/core/questions/setupQuestions/projectQuestions/usage.ts and 8 other locations - About 40 mins to fix
    src/core/questions/setupQuestions/projectQuestions/author-email.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/author-name.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-description.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-documentation-url.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-homepage.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-name.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-version.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/test-command.ts on lines 3..8

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 48.

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

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

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

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

    Refactorings

    Further Reading

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

    const documentationUrl = (projectInfos: IProjectInfos): IQuestionResponse => ({
      type: 'input',
      message: '  Project documentation URL (use empty value to skip)',
      name: 'projectDocumentationUrl',
      default: projectInfos.documentationUrl,
    src/core/questions/setupQuestions/projectQuestions/author-email.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/author-name.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-description.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-homepage.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-name.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-version.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/test-command.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/usage.ts on lines 3..8

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 48.

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

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

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

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

    Refactorings

    Further Reading

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

    const projectHomepage = (projectInfos: IProjectInfos): IQuestionResponse => ({
      type: 'input',
      message: '  Project homepage (use empty value to skip)',
      name: 'projectHomepage',
      default: projectInfos.homepage,
    src/core/questions/setupQuestions/projectQuestions/author-email.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/author-name.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-description.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-documentation-url.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-name.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-version.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/test-command.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/usage.ts on lines 3..8

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 48.

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

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

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

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

    Refactorings

    Further Reading

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

    const projectDescription = (projectInfos: IProjectInfos): IQuestionResponse => ({
      type: 'input',
      message: '  Project description',
      name: 'projectDescription',
      default: projectInfos.description,
    src/core/questions/setupQuestions/projectQuestions/author-email.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/author-name.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-documentation-url.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-homepage.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-name.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-version.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/test-command.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/usage.ts on lines 3..8

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 48.

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

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

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

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

    Refactorings

    Further Reading

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

    const projectName = (projectInfos: IProjectInfos): IQuestionResponse => ({
      type: 'input',
      message: '  Project name',
      name: 'projectName',
      default: projectInfos.name,
    src/core/questions/setupQuestions/projectQuestions/author-email.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/author-name.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-description.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-documentation-url.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-homepage.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-version.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/test-command.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/usage.ts on lines 3..8

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 48.

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

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

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

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

    Refactorings

    Further Reading

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

    const projectVersion = (projectInfos: IProjectInfos): IQuestionResponse => ({
      type: 'input',
      message: '  Project version (use empty value to skip)',
      name: 'projectVersion',
      default: projectInfos.version,
    src/core/questions/setupQuestions/projectQuestions/author-email.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/author-name.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-description.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-documentation-url.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-homepage.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/project-name.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/test-command.ts on lines 3..8
    src/core/questions/setupQuestions/projectQuestions/usage.ts on lines 3..8

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 48.

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

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

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

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

    Refactorings

    Further Reading

    Severity
    Category
    Status
    Source
    Language