lgtome/templates-builder

View on GitHub

Showing 32 of 36 total issues

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

  index({ relation, deep = 1 }) {
    return `export { ${relation} } from '${getPathByDeep(deep)}${relation}'`
  }
Severity: Minor
Found in src/templates/Frameworks/VueTemplateService.js and 1 other location - About 45 mins to fix
src/templates/Frameworks/ReactTemplateService.js on lines 24..26

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

  it('cutExtension should returns name without extension', () => {
    const filename = 'testFile1.js'
    const result = useTransform.cutExtensionTransform(filename)

    assert.equal(result, 'testFile1')
Severity: Major
Found in __tests__/useTransform.test.js and 5 other locations - About 35 mins to fix
__tests__/useTransform.test.js on lines 5..10
__tests__/useTransform.test.js on lines 11..16
__tests__/useTransform.test.js on lines 17..22
__tests__/useTransform.test.js on lines 41..46
__tests__/useTransform.test.js on lines 47..52

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

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

  it('snake transform should return filename transformed to snake case', () => {
    const filename = 'testFile'
    const result = useTransform.snakeCaseTransform(filename)

    assert.equal(result, 'test_file')
Severity: Major
Found in __tests__/useTransform.test.js and 5 other locations - About 35 mins to fix
__tests__/useTransform.test.js on lines 5..10
__tests__/useTransform.test.js on lines 17..22
__tests__/useTransform.test.js on lines 29..34
__tests__/useTransform.test.js on lines 41..46
__tests__/useTransform.test.js on lines 47..52

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

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

function snakeCaseTransform(filename = '') {
  return filename.replace(
    uppercaseRegex,
    (element, index) => (index ? '_' : '') + element.toLowerCase()
  )
Severity: Minor
Found in src/helpers/useTransform.js and 1 other location - About 35 mins to fix
src/helpers/useTransform.js on lines 7..12

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

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

  it('pascal transform should return filename transformed to pascal case', () => {
    const filename = 'testFile'
    const result = useTransform.pascalCaseTransform(filename)

    assert.equal(result, 'TestFile')
Severity: Major
Found in __tests__/useTransform.test.js and 5 other locations - About 35 mins to fix
__tests__/useTransform.test.js on lines 5..10
__tests__/useTransform.test.js on lines 11..16
__tests__/useTransform.test.js on lines 29..34
__tests__/useTransform.test.js on lines 41..46
__tests__/useTransform.test.js on lines 47..52

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

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

function kebabCaseTransform(filename = '') {
  return filename.replace(
    uppercaseRegex,
    (element, index) => (index ? '-' : '') + element.toLowerCase()
  )
Severity: Minor
Found in src/helpers/useTransform.js and 1 other location - About 35 mins to fix
src/helpers/useTransform.js on lines 14..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 47.

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

  it('removeSeparators should returns name without - separator', () => {
    const filename = 'test-File2'
    const result = useTransform.removeSeparatorsTransform(filename)

    assert.equal(result, 'testFile2')
Severity: Major
Found in __tests__/useTransform.test.js and 5 other locations - About 35 mins to fix
__tests__/useTransform.test.js on lines 5..10
__tests__/useTransform.test.js on lines 11..16
__tests__/useTransform.test.js on lines 17..22
__tests__/useTransform.test.js on lines 29..34
__tests__/useTransform.test.js on lines 47..52

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

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

  it('cutExtension should returns filename if extension not included', () => {
    const filename = 'testFile2'
    const result = useTransform.cutExtensionTransform(filename)

    assert.equal(result, filename)
Severity: Minor
Found in __tests__/useTransform.test.js and 2 other locations - About 35 mins to fix
__tests__/useTransform.test.js on lines 23..28
__tests__/useTransform.test.js on lines 53..58

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

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

  it('removeSeparators should returns name without . separator', () => {
    const filename = 'test.File2'
    const result = useTransform.removeSeparatorsTransform(filename)

    assert.equal(result, 'testFile2')
Severity: Major
Found in __tests__/useTransform.test.js and 5 other locations - About 35 mins to fix
__tests__/useTransform.test.js on lines 5..10
__tests__/useTransform.test.js on lines 11..16
__tests__/useTransform.test.js on lines 17..22
__tests__/useTransform.test.js on lines 29..34
__tests__/useTransform.test.js on lines 41..46

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

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

  it('camel transform should return filename transformed to camel case', () => {
    const filename = 'testFile'
    const result = useTransform.camelCaseTransform(filename)

    assert.equal(result, filename)
Severity: Minor
Found in __tests__/useTransform.test.js and 2 other locations - About 35 mins to fix
__tests__/useTransform.test.js on lines 35..40
__tests__/useTransform.test.js on lines 53..58

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

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

  it('kebab transform should return filename transformed to kebab case', () => {
    const filename = 'testFile'
    const result = useTransform.kebabCaseTransform(filename)

    assert.equal(result, 'test-file')
Severity: Major
Found in __tests__/useTransform.test.js and 5 other locations - About 35 mins to fix
__tests__/useTransform.test.js on lines 11..16
__tests__/useTransform.test.js on lines 17..22
__tests__/useTransform.test.js on lines 29..34
__tests__/useTransform.test.js on lines 41..46
__tests__/useTransform.test.js on lines 47..52

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

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

  it('removeSeparators should returns name without transformation if separator not provided', () => {
    const filename = 'testFile2'
    const result = useTransform.removeSeparatorsTransform(filename)

    assert.equal(result, filename)
Severity: Minor
Found in __tests__/useTransform.test.js and 2 other locations - About 35 mins to fix
__tests__/useTransform.test.js on lines 23..28
__tests__/useTransform.test.js on lines 35..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 47.

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