Bnei-Baruch/mdb

View on GitHub

Showing 431 of 1,135 total issues

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

func (o *FileType) Upsert(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error {
    if o == nil {
        return errors.New("kmodels: no file_types provided for upsert")
    }

Severity: Major
Found in importer/kmedia/kmodels/file_types.go and 4 other locations - About 1 day to fix
importer/kmedia/kmodels/content_types.go on lines 851..959
importer/kmedia/kmodels/languages.go on lines 1790..1898
importer/kmedia/kmodels/roles_users.go on lines 695..803
importer/kmedia/kmodels/servers.go on lines 860..968

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

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

func (o *Server) Upsert(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error {
    if o == nil {
        return errors.New("kmodels: no servers provided for upsert")
    }

Severity: Major
Found in importer/kmedia/kmodels/servers.go and 4 other locations - About 1 day to fix
importer/kmedia/kmodels/content_types.go on lines 851..959
importer/kmedia/kmodels/file_types.go on lines 535..643
importer/kmedia/kmodels/languages.go on lines 1790..1898
importer/kmedia/kmodels/roles_users.go on lines 695..803

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

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

    for i := 0; i < 4; i++ {
        metadata.ContentType = common.CT_LESSON_PART
        metadata.Part = null.IntFrom(i)
        metadata.ArtifactType = null.StringFrom("kitei_makor")
        metadata.WeekDate = nil
Severity: Major
Found in api/metadata_processor_test.go and 1 other location - About 1 day to fix
api/metadata_processor_test.go on lines 479..529

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

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

    for i := 0; i < 4; i++ {
        metadata.ContentType = common.CT_LESSON_PART
        metadata.Part = null.IntFrom(i)
        metadata.ArtifactType = null.StringFrom("lelo_mikud")
        metadata.WeekDate = nil
Severity: Major
Found in api/metadata_processor_test.go and 1 other location - About 1 day to fix
api/metadata_processor_test.go on lines 426..476

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

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

func (labelL) LoadContainers(e boil.Executor, singular bool, maybeLabel interface{}) error {
    var slice []*Label
    var object *Label

    count := 1
Severity: Major
Found in importer/kmedia/kmodels/labels.go and 2 other locations - About 1 day to fix
importer/kmedia/kmodels/catalogs.go on lines 719..796
importer/kmedia/kmodels/file_assets.go on lines 552..629

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

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

func (fileAssetL) LoadContainers(e boil.Executor, singular bool, maybeFileAsset interface{}) error {
    var slice []*FileAsset
    var object *FileAsset

    count := 1
Severity: Major
Found in importer/kmedia/kmodels/file_assets.go and 2 other locations - About 1 day to fix
importer/kmedia/kmodels/catalogs.go on lines 719..796
importer/kmedia/kmodels/labels.go on lines 222..299

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

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

func (catalogL) LoadContainers(e boil.Executor, singular bool, maybeCatalog interface{}) error {
    var slice []*Catalog
    var object *Catalog

    count := 1
Severity: Major
Found in importer/kmedia/kmodels/catalogs.go and 2 other locations - About 1 day to fix
importer/kmedia/kmodels/file_assets.go on lines 552..629
importer/kmedia/kmodels/labels.go on lines 222..299

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

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

func (o *Role) Insert(exec boil.Executor, whitelist ...string) error {
    if o == nil {
        return errors.New("kmodels: no roles provided for insertion")
    }

Severity: Major
Found in importer/kmedia/kmodels/roles.go and 10 other locations - About 1 day to fix
importer/kmedia/kmodels/catalog_descriptions.go on lines 674..757
importer/kmedia/kmodels/catalogs.go on lines 1937..2020
importer/kmedia/kmodels/container_description_patterns.go on lines 631..714
importer/kmedia/kmodels/container_descriptions.go on lines 677..760
importer/kmedia/kmodels/containers.go on lines 2217..2300
importer/kmedia/kmodels/file_asset_descriptions.go on lines 447..530
importer/kmedia/kmodels/file_assets.go on lines 1515..1598
importer/kmedia/kmodels/lecturer_descriptions.go on lines 283..366
importer/kmedia/kmodels/lecturers.go on lines 280..363
importer/kmedia/kmodels/users.go on lines 1118..1201

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

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

func (o *FileAssetDescription) Insert(exec boil.Executor, whitelist ...string) error {
    if o == nil {
        return errors.New("kmodels: no file_asset_descriptions provided for insertion")
    }

Severity: Major
Found in importer/kmedia/kmodels/file_asset_descriptions.go and 10 other locations - About 1 day to fix
importer/kmedia/kmodels/catalog_descriptions.go on lines 674..757
importer/kmedia/kmodels/catalogs.go on lines 1937..2020
importer/kmedia/kmodels/container_description_patterns.go on lines 631..714
importer/kmedia/kmodels/container_descriptions.go on lines 677..760
importer/kmedia/kmodels/containers.go on lines 2217..2300
importer/kmedia/kmodels/file_assets.go on lines 1515..1598
importer/kmedia/kmodels/lecturer_descriptions.go on lines 283..366
importer/kmedia/kmodels/lecturers.go on lines 280..363
importer/kmedia/kmodels/roles.go on lines 280..363
importer/kmedia/kmodels/users.go on lines 1118..1201

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

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

func (o *Container) Insert(exec boil.Executor, whitelist ...string) error {
    if o == nil {
        return errors.New("kmodels: no containers provided for insertion")
    }

Severity: Major
Found in importer/kmedia/kmodels/containers.go and 10 other locations - About 1 day to fix
importer/kmedia/kmodels/catalog_descriptions.go on lines 674..757
importer/kmedia/kmodels/catalogs.go on lines 1937..2020
importer/kmedia/kmodels/container_description_patterns.go on lines 631..714
importer/kmedia/kmodels/container_descriptions.go on lines 677..760
importer/kmedia/kmodels/file_asset_descriptions.go on lines 447..530
importer/kmedia/kmodels/file_assets.go on lines 1515..1598
importer/kmedia/kmodels/lecturer_descriptions.go on lines 283..366
importer/kmedia/kmodels/lecturers.go on lines 280..363
importer/kmedia/kmodels/roles.go on lines 280..363
importer/kmedia/kmodels/users.go on lines 1118..1201

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

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

func (o *Catalog) Insert(exec boil.Executor, whitelist ...string) error {
    if o == nil {
        return errors.New("kmodels: no catalogs provided for insertion")
    }

Severity: Major
Found in importer/kmedia/kmodels/catalogs.go and 10 other locations - About 1 day to fix
importer/kmedia/kmodels/catalog_descriptions.go on lines 674..757
importer/kmedia/kmodels/container_description_patterns.go on lines 631..714
importer/kmedia/kmodels/container_descriptions.go on lines 677..760
importer/kmedia/kmodels/containers.go on lines 2217..2300
importer/kmedia/kmodels/file_asset_descriptions.go on lines 447..530
importer/kmedia/kmodels/file_assets.go on lines 1515..1598
importer/kmedia/kmodels/lecturer_descriptions.go on lines 283..366
importer/kmedia/kmodels/lecturers.go on lines 280..363
importer/kmedia/kmodels/roles.go on lines 280..363
importer/kmedia/kmodels/users.go on lines 1118..1201

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

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

func (o *ContainerDescription) Insert(exec boil.Executor, whitelist ...string) error {
    if o == nil {
        return errors.New("kmodels: no container_descriptions provided for insertion")
    }

Severity: Major
Found in importer/kmedia/kmodels/container_descriptions.go and 10 other locations - About 1 day to fix
importer/kmedia/kmodels/catalog_descriptions.go on lines 674..757
importer/kmedia/kmodels/catalogs.go on lines 1937..2020
importer/kmedia/kmodels/container_description_patterns.go on lines 631..714
importer/kmedia/kmodels/containers.go on lines 2217..2300
importer/kmedia/kmodels/file_asset_descriptions.go on lines 447..530
importer/kmedia/kmodels/file_assets.go on lines 1515..1598
importer/kmedia/kmodels/lecturer_descriptions.go on lines 283..366
importer/kmedia/kmodels/lecturers.go on lines 280..363
importer/kmedia/kmodels/roles.go on lines 280..363
importer/kmedia/kmodels/users.go on lines 1118..1201

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

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

func (o *Lecturer) Insert(exec boil.Executor, whitelist ...string) error {
    if o == nil {
        return errors.New("kmodels: no lecturers provided for insertion")
    }

Severity: Major
Found in importer/kmedia/kmodels/lecturers.go and 10 other locations - About 1 day to fix
importer/kmedia/kmodels/catalog_descriptions.go on lines 674..757
importer/kmedia/kmodels/catalogs.go on lines 1937..2020
importer/kmedia/kmodels/container_description_patterns.go on lines 631..714
importer/kmedia/kmodels/container_descriptions.go on lines 677..760
importer/kmedia/kmodels/containers.go on lines 2217..2300
importer/kmedia/kmodels/file_asset_descriptions.go on lines 447..530
importer/kmedia/kmodels/file_assets.go on lines 1515..1598
importer/kmedia/kmodels/lecturer_descriptions.go on lines 283..366
importer/kmedia/kmodels/roles.go on lines 280..363
importer/kmedia/kmodels/users.go on lines 1118..1201

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

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

func (o *CatalogDescription) Insert(exec boil.Executor, whitelist ...string) error {
    if o == nil {
        return errors.New("kmodels: no catalog_descriptions provided for insertion")
    }

Severity: Major
Found in importer/kmedia/kmodels/catalog_descriptions.go and 10 other locations - About 1 day to fix
importer/kmedia/kmodels/catalogs.go on lines 1937..2020
importer/kmedia/kmodels/container_description_patterns.go on lines 631..714
importer/kmedia/kmodels/container_descriptions.go on lines 677..760
importer/kmedia/kmodels/containers.go on lines 2217..2300
importer/kmedia/kmodels/file_asset_descriptions.go on lines 447..530
importer/kmedia/kmodels/file_assets.go on lines 1515..1598
importer/kmedia/kmodels/lecturer_descriptions.go on lines 283..366
importer/kmedia/kmodels/lecturers.go on lines 280..363
importer/kmedia/kmodels/roles.go on lines 280..363
importer/kmedia/kmodels/users.go on lines 1118..1201

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

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

func (o *LecturerDescription) Insert(exec boil.Executor, whitelist ...string) error {
    if o == nil {
        return errors.New("kmodels: no lecturer_descriptions provided for insertion")
    }

Severity: Major
Found in importer/kmedia/kmodels/lecturer_descriptions.go and 10 other locations - About 1 day to fix
importer/kmedia/kmodels/catalog_descriptions.go on lines 674..757
importer/kmedia/kmodels/catalogs.go on lines 1937..2020
importer/kmedia/kmodels/container_description_patterns.go on lines 631..714
importer/kmedia/kmodels/container_descriptions.go on lines 677..760
importer/kmedia/kmodels/containers.go on lines 2217..2300
importer/kmedia/kmodels/file_asset_descriptions.go on lines 447..530
importer/kmedia/kmodels/file_assets.go on lines 1515..1598
importer/kmedia/kmodels/lecturers.go on lines 280..363
importer/kmedia/kmodels/roles.go on lines 280..363
importer/kmedia/kmodels/users.go on lines 1118..1201

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

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

func (o *User) Insert(exec boil.Executor, whitelist ...string) error {
    if o == nil {
        return errors.New("kmodels: no users provided for insertion")
    }

Severity: Major
Found in importer/kmedia/kmodels/users.go and 10 other locations - About 1 day to fix
importer/kmedia/kmodels/catalog_descriptions.go on lines 674..757
importer/kmedia/kmodels/catalogs.go on lines 1937..2020
importer/kmedia/kmodels/container_description_patterns.go on lines 631..714
importer/kmedia/kmodels/container_descriptions.go on lines 677..760
importer/kmedia/kmodels/containers.go on lines 2217..2300
importer/kmedia/kmodels/file_asset_descriptions.go on lines 447..530
importer/kmedia/kmodels/file_assets.go on lines 1515..1598
importer/kmedia/kmodels/lecturer_descriptions.go on lines 283..366
importer/kmedia/kmodels/lecturers.go on lines 280..363
importer/kmedia/kmodels/roles.go on lines 280..363

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

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

func (o *ContainerDescriptionPattern) Insert(exec boil.Executor, whitelist ...string) error {
    if o == nil {
        return errors.New("kmodels: no container_description_patterns provided for insertion")
    }

Severity: Major
Found in importer/kmedia/kmodels/container_description_patterns.go and 10 other locations - About 1 day to fix
importer/kmedia/kmodels/catalog_descriptions.go on lines 674..757
importer/kmedia/kmodels/catalogs.go on lines 1937..2020
importer/kmedia/kmodels/container_descriptions.go on lines 677..760
importer/kmedia/kmodels/containers.go on lines 2217..2300
importer/kmedia/kmodels/file_asset_descriptions.go on lines 447..530
importer/kmedia/kmodels/file_assets.go on lines 1515..1598
importer/kmedia/kmodels/lecturer_descriptions.go on lines 283..366
importer/kmedia/kmodels/lecturers.go on lines 280..363
importer/kmedia/kmodels/roles.go on lines 280..363
importer/kmedia/kmodels/users.go on lines 1118..1201

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

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

func (o *FileAsset) Insert(exec boil.Executor, whitelist ...string) error {
    if o == nil {
        return errors.New("kmodels: no file_assets provided for insertion")
    }

Severity: Major
Found in importer/kmedia/kmodels/file_assets.go and 10 other locations - About 1 day to fix
importer/kmedia/kmodels/catalog_descriptions.go on lines 674..757
importer/kmedia/kmodels/catalogs.go on lines 1937..2020
importer/kmedia/kmodels/container_description_patterns.go on lines 631..714
importer/kmedia/kmodels/container_descriptions.go on lines 677..760
importer/kmedia/kmodels/containers.go on lines 2217..2300
importer/kmedia/kmodels/file_asset_descriptions.go on lines 447..530
importer/kmedia/kmodels/lecturer_descriptions.go on lines 283..366
importer/kmedia/kmodels/lecturers.go on lines 280..363
importer/kmedia/kmodels/roles.go on lines 280..363
importer/kmedia/kmodels/users.go on lines 1118..1201

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

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

func (containerDescriptionPatternL) LoadCatalogs(e boil.Executor, singular bool, maybeContainerDescriptionPattern interface{}) error {
    var slice []*ContainerDescriptionPattern
    var object *ContainerDescriptionPattern

    count := 1
Severity: Major
Found in importer/kmedia/kmodels/container_description_patterns.go and 1 other location - About 1 day to fix
importer/kmedia/kmodels/containers.go on lines 620..697

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

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

func (containerL) LoadCatalogs(e boil.Executor, singular bool, maybeContainer interface{}) error {
    var slice []*Container
    var object *Container

    count := 1
Severity: Major
Found in importer/kmedia/kmodels/containers.go and 1 other location - About 1 day to fix
importer/kmedia/kmodels/container_description_patterns.go on lines 228..305

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

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