Bnei-Baruch/mdb

View on GitHub

Showing 431 of 1,135 total issues

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

func (o *User) Update(exec boil.Executor, whitelist ...string) error {
    currTime := time.Now().In(boil.GetLocation())

    o.UpdatedAt.Time = currTime
    o.UpdatedAt.Valid = true
Severity: Major
Found in importer/kmedia/kmodels/users.go and 10 other locations - About 6 hrs to fix
importer/kmedia/kmodels/catalog_descriptions.go on lines 790..845
importer/kmedia/kmodels/catalogs.go on lines 2053..2108
importer/kmedia/kmodels/container_description_patterns.go on lines 747..802
importer/kmedia/kmodels/container_descriptions.go on lines 793..848
importer/kmedia/kmodels/containers.go on lines 2333..2388
importer/kmedia/kmodels/file_asset_descriptions.go on lines 563..618
importer/kmedia/kmodels/file_assets.go on lines 1631..1686
importer/kmedia/kmodels/lecturer_descriptions.go on lines 399..454
importer/kmedia/kmodels/lecturers.go on lines 396..451
importer/kmedia/kmodels/roles.go on lines 396..451

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

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) Update(exec boil.Executor, whitelist ...string) error {
    currTime := time.Now().In(boil.GetLocation())

    o.UpdatedAt.Time = currTime
    o.UpdatedAt.Valid = true
Severity: Major
Found in importer/kmedia/kmodels/catalog_descriptions.go and 10 other locations - About 6 hrs to fix
importer/kmedia/kmodels/catalogs.go on lines 2053..2108
importer/kmedia/kmodels/container_description_patterns.go on lines 747..802
importer/kmedia/kmodels/container_descriptions.go on lines 793..848
importer/kmedia/kmodels/containers.go on lines 2333..2388
importer/kmedia/kmodels/file_asset_descriptions.go on lines 563..618
importer/kmedia/kmodels/file_assets.go on lines 1631..1686
importer/kmedia/kmodels/lecturer_descriptions.go on lines 399..454
importer/kmedia/kmodels/lecturers.go on lines 396..451
importer/kmedia/kmodels/roles.go on lines 396..451
importer/kmedia/kmodels/users.go on lines 1234..1289

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

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) Update(exec boil.Executor, whitelist ...string) error {
    currTime := time.Now().In(boil.GetLocation())

    o.UpdatedAt.Time = currTime
    o.UpdatedAt.Valid = true
Severity: Major
Found in importer/kmedia/kmodels/file_assets.go and 10 other locations - About 6 hrs to fix
importer/kmedia/kmodels/catalog_descriptions.go on lines 790..845
importer/kmedia/kmodels/catalogs.go on lines 2053..2108
importer/kmedia/kmodels/container_description_patterns.go on lines 747..802
importer/kmedia/kmodels/container_descriptions.go on lines 793..848
importer/kmedia/kmodels/containers.go on lines 2333..2388
importer/kmedia/kmodels/file_asset_descriptions.go on lines 563..618
importer/kmedia/kmodels/lecturer_descriptions.go on lines 399..454
importer/kmedia/kmodels/lecturers.go on lines 396..451
importer/kmedia/kmodels/roles.go on lines 396..451
importer/kmedia/kmodels/users.go on lines 1234..1289

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

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) Update(exec boil.Executor, whitelist ...string) error {
    currTime := time.Now().In(boil.GetLocation())

    o.UpdatedAt.Time = currTime
    o.UpdatedAt.Valid = true
Severity: Major
Found in importer/kmedia/kmodels/container_description_patterns.go and 10 other locations - About 6 hrs to fix
importer/kmedia/kmodels/catalog_descriptions.go on lines 790..845
importer/kmedia/kmodels/catalogs.go on lines 2053..2108
importer/kmedia/kmodels/container_descriptions.go on lines 793..848
importer/kmedia/kmodels/containers.go on lines 2333..2388
importer/kmedia/kmodels/file_asset_descriptions.go on lines 563..618
importer/kmedia/kmodels/file_assets.go on lines 1631..1686
importer/kmedia/kmodels/lecturer_descriptions.go on lines 399..454
importer/kmedia/kmodels/lecturers.go on lines 396..451
importer/kmedia/kmodels/roles.go on lines 396..451
importer/kmedia/kmodels/users.go on lines 1234..1289

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

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) Update(exec boil.Executor, whitelist ...string) error {
    currTime := time.Now().In(boil.GetLocation())

    o.UpdatedAt.Time = currTime
    o.UpdatedAt.Valid = true
Severity: Major
Found in importer/kmedia/kmodels/lecturer_descriptions.go and 10 other locations - About 6 hrs to fix
importer/kmedia/kmodels/catalog_descriptions.go on lines 790..845
importer/kmedia/kmodels/catalogs.go on lines 2053..2108
importer/kmedia/kmodels/container_description_patterns.go on lines 747..802
importer/kmedia/kmodels/container_descriptions.go on lines 793..848
importer/kmedia/kmodels/containers.go on lines 2333..2388
importer/kmedia/kmodels/file_asset_descriptions.go on lines 563..618
importer/kmedia/kmodels/file_assets.go on lines 1631..1686
importer/kmedia/kmodels/lecturers.go on lines 396..451
importer/kmedia/kmodels/roles.go on lines 396..451
importer/kmedia/kmodels/users.go on lines 1234..1289

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

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) Update(exec boil.Executor, whitelist ...string) error {
    currTime := time.Now().In(boil.GetLocation())

    o.UpdatedAt.Time = currTime
    o.UpdatedAt.Valid = true
Severity: Major
Found in importer/kmedia/kmodels/lecturers.go and 10 other locations - About 6 hrs to fix
importer/kmedia/kmodels/catalog_descriptions.go on lines 790..845
importer/kmedia/kmodels/catalogs.go on lines 2053..2108
importer/kmedia/kmodels/container_description_patterns.go on lines 747..802
importer/kmedia/kmodels/container_descriptions.go on lines 793..848
importer/kmedia/kmodels/containers.go on lines 2333..2388
importer/kmedia/kmodels/file_asset_descriptions.go on lines 563..618
importer/kmedia/kmodels/file_assets.go on lines 1631..1686
importer/kmedia/kmodels/lecturer_descriptions.go on lines 399..454
importer/kmedia/kmodels/roles.go on lines 396..451
importer/kmedia/kmodels/users.go on lines 1234..1289

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

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) Update(exec boil.Executor, whitelist ...string) error {
    currTime := time.Now().In(boil.GetLocation())

    o.UpdatedAt.Time = currTime
    o.UpdatedAt.Valid = true
Severity: Major
Found in importer/kmedia/kmodels/containers.go and 10 other locations - About 6 hrs to fix
importer/kmedia/kmodels/catalog_descriptions.go on lines 790..845
importer/kmedia/kmodels/catalogs.go on lines 2053..2108
importer/kmedia/kmodels/container_description_patterns.go on lines 747..802
importer/kmedia/kmodels/container_descriptions.go on lines 793..848
importer/kmedia/kmodels/file_asset_descriptions.go on lines 563..618
importer/kmedia/kmodels/file_assets.go on lines 1631..1686
importer/kmedia/kmodels/lecturer_descriptions.go on lines 399..454
importer/kmedia/kmodels/lecturers.go on lines 396..451
importer/kmedia/kmodels/roles.go on lines 396..451
importer/kmedia/kmodels/users.go on lines 1234..1289

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

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) Update(exec boil.Executor, whitelist ...string) error {
    currTime := time.Now().In(boil.GetLocation())

    o.UpdatedAt.Time = currTime
    o.UpdatedAt.Valid = true
Severity: Major
Found in importer/kmedia/kmodels/container_descriptions.go and 10 other locations - About 6 hrs to fix
importer/kmedia/kmodels/catalog_descriptions.go on lines 790..845
importer/kmedia/kmodels/catalogs.go on lines 2053..2108
importer/kmedia/kmodels/container_description_patterns.go on lines 747..802
importer/kmedia/kmodels/containers.go on lines 2333..2388
importer/kmedia/kmodels/file_asset_descriptions.go on lines 563..618
importer/kmedia/kmodels/file_assets.go on lines 1631..1686
importer/kmedia/kmodels/lecturer_descriptions.go on lines 399..454
importer/kmedia/kmodels/lecturers.go on lines 396..451
importer/kmedia/kmodels/roles.go on lines 396..451
importer/kmedia/kmodels/users.go on lines 1234..1289

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

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) Update(exec boil.Executor, whitelist ...string) error {
    currTime := time.Now().In(boil.GetLocation())

    o.UpdatedAt.Time = currTime
    o.UpdatedAt.Valid = true
Severity: Major
Found in importer/kmedia/kmodels/roles.go and 10 other locations - About 6 hrs to fix
importer/kmedia/kmodels/catalog_descriptions.go on lines 790..845
importer/kmedia/kmodels/catalogs.go on lines 2053..2108
importer/kmedia/kmodels/container_description_patterns.go on lines 747..802
importer/kmedia/kmodels/container_descriptions.go on lines 793..848
importer/kmedia/kmodels/containers.go on lines 2333..2388
importer/kmedia/kmodels/file_asset_descriptions.go on lines 563..618
importer/kmedia/kmodels/file_assets.go on lines 1631..1686
importer/kmedia/kmodels/lecturer_descriptions.go on lines 399..454
importer/kmedia/kmodels/lecturers.go on lines 396..451
importer/kmedia/kmodels/users.go on lines 1234..1289

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

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) Update(exec boil.Executor, whitelist ...string) error {
    currTime := time.Now().In(boil.GetLocation())

    o.UpdatedAt.Time = currTime
    o.UpdatedAt.Valid = true
Severity: Major
Found in importer/kmedia/kmodels/catalogs.go and 10 other locations - About 6 hrs to fix
importer/kmedia/kmodels/catalog_descriptions.go on lines 790..845
importer/kmedia/kmodels/container_description_patterns.go on lines 747..802
importer/kmedia/kmodels/container_descriptions.go on lines 793..848
importer/kmedia/kmodels/containers.go on lines 2333..2388
importer/kmedia/kmodels/file_asset_descriptions.go on lines 563..618
importer/kmedia/kmodels/file_assets.go on lines 1631..1686
importer/kmedia/kmodels/lecturer_descriptions.go on lines 399..454
importer/kmedia/kmodels/lecturers.go on lines 396..451
importer/kmedia/kmodels/roles.go on lines 396..451
importer/kmedia/kmodels/users.go on lines 1234..1289

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

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

func (o *Language) AddLangFileAssets(exec boil.Executor, insert bool, related ...*FileAsset) error {
    var err error
    for _, rel := range related {
        if insert {
            rel.LangID.String = o.Code3.String
Severity: Major
Found in importer/kmedia/kmodels/languages.go and 3 other locations - About 6 hrs to fix
importer/kmedia/kmodels/languages.go on lines 592..641
importer/kmedia/kmodels/languages.go on lines 813..862
importer/kmedia/kmodels/languages.go on lines 1034..1083

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

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

func (o *Language) AddLangCatalogDescriptions(exec boil.Executor, insert bool, related ...*CatalogDescription) error {
    var err error
    for _, rel := range related {
        if insert {
            rel.LangID.String = o.Code3.String
Severity: Major
Found in importer/kmedia/kmodels/languages.go and 3 other locations - About 6 hrs to fix
importer/kmedia/kmodels/languages.go on lines 813..862
importer/kmedia/kmodels/languages.go on lines 1034..1083
importer/kmedia/kmodels/languages.go on lines 1255..1304

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

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

func (o *Language) AddLangContainers(exec boil.Executor, insert bool, related ...*Container) error {
    var err error
    for _, rel := range related {
        if insert {
            rel.LangID.String = o.Code3.String
Severity: Major
Found in importer/kmedia/kmodels/languages.go and 3 other locations - About 6 hrs to fix
importer/kmedia/kmodels/languages.go on lines 592..641
importer/kmedia/kmodels/languages.go on lines 813..862
importer/kmedia/kmodels/languages.go on lines 1255..1304

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

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

func (o *Language) AddLangContainerDescriptions(exec boil.Executor, insert bool, related ...*ContainerDescription) error {
    var err error
    for _, rel := range related {
        if insert {
            rel.LangID.String = o.Code3.String
Severity: Major
Found in importer/kmedia/kmodels/languages.go and 3 other locations - About 6 hrs to fix
importer/kmedia/kmodels/languages.go on lines 592..641
importer/kmedia/kmodels/languages.go on lines 1034..1083
importer/kmedia/kmodels/languages.go on lines 1255..1304

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

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

func (o *ContentType) AddContainers(exec boil.Executor, insert bool, related ...*Container) error {
    var err error
    for _, rel := range related {
        if insert {
            rel.ContentTypeID.Int = o.ID
Severity: Major
Found in importer/kmedia/kmodels/content_types.go and 5 other locations - About 6 hrs to fix
importer/kmedia/kmodels/catalogs.go on lines 1191..1240
importer/kmedia/kmodels/servers.go on lines 325..374
importer/kmedia/kmodels/users.go on lines 539..588
importer/kmedia/kmodels/users.go on lines 760..809
importer/kmedia/kmodels/virtual_lessons.go on lines 319..368

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

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

func (o *VirtualLesson) AddContainers(exec boil.Executor, insert bool, related ...*Container) error {
    var err error
    for _, rel := range related {
        if insert {
            rel.VirtualLessonID.Int = o.ID
Severity: Major
Found in importer/kmedia/kmodels/virtual_lessons.go and 5 other locations - About 6 hrs to fix
importer/kmedia/kmodels/catalogs.go on lines 1191..1240
importer/kmedia/kmodels/content_types.go on lines 316..365
importer/kmedia/kmodels/servers.go on lines 325..374
importer/kmedia/kmodels/users.go on lines 539..588
importer/kmedia/kmodels/users.go on lines 760..809

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

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

func (o *Server) AddServernameFileAssets(exec boil.Executor, insert bool, related ...*FileAsset) error {
    var err error
    for _, rel := range related {
        if insert {
            rel.ServernameID.String = o.Servername
Severity: Major
Found in importer/kmedia/kmodels/servers.go and 5 other locations - About 6 hrs to fix
importer/kmedia/kmodels/catalogs.go on lines 1191..1240
importer/kmedia/kmodels/content_types.go on lines 316..365
importer/kmedia/kmodels/users.go on lines 539..588
importer/kmedia/kmodels/users.go on lines 760..809
importer/kmedia/kmodels/virtual_lessons.go on lines 319..368

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

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

func (o *User) AddFileAssets(exec boil.Executor, insert bool, related ...*FileAsset) error {
    var err error
    for _, rel := range related {
        if insert {
            rel.UserID.Int = o.ID
Severity: Major
Found in importer/kmedia/kmodels/users.go and 5 other locations - About 6 hrs to fix
importer/kmedia/kmodels/catalogs.go on lines 1191..1240
importer/kmedia/kmodels/content_types.go on lines 316..365
importer/kmedia/kmodels/servers.go on lines 325..374
importer/kmedia/kmodels/users.go on lines 539..588
importer/kmedia/kmodels/virtual_lessons.go on lines 319..368

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

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

func (o *User) AddCatalogs(exec boil.Executor, insert bool, related ...*Catalog) error {
    var err error
    for _, rel := range related {
        if insert {
            rel.UserID.Int = o.ID
Severity: Major
Found in importer/kmedia/kmodels/users.go and 5 other locations - About 6 hrs to fix
importer/kmedia/kmodels/catalogs.go on lines 1191..1240
importer/kmedia/kmodels/content_types.go on lines 316..365
importer/kmedia/kmodels/servers.go on lines 325..374
importer/kmedia/kmodels/users.go on lines 760..809
importer/kmedia/kmodels/virtual_lessons.go on lines 319..368

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

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

func (o *Catalog) AddParentCatalogs(exec boil.Executor, insert bool, related ...*Catalog) error {
    var err error
    for _, rel := range related {
        if insert {
            rel.ParentID.Int = o.ID
Severity: Major
Found in importer/kmedia/kmodels/catalogs.go and 5 other locations - About 6 hrs to fix
importer/kmedia/kmodels/content_types.go on lines 316..365
importer/kmedia/kmodels/servers.go on lines 325..374
importer/kmedia/kmodels/users.go on lines 539..588
importer/kmedia/kmodels/users.go on lines 760..809
importer/kmedia/kmodels/virtual_lessons.go on lines 319..368

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

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