Bnei-Baruch/mdb

View on GitHub

Showing 431 of 1,135 total issues

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

func loadAndImportMissingClipsCollections() (map[int]*models.Collection, error) {

    cs, err := models.Collections(
        qm4.Where("type_id = ?", common.CONTENT_TYPE_REGISTRY.ByName[common.CT_CLIPS].ID)).
        All(mdb)
Severity: Major
Found in importer/kmedia/clips.go and 1 other location - About 1 day to fix
importer/kmedia/articles.go on lines 89..156

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

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 loadAndImportMissingArticlesCollections() (map[int]*models.Collection, error) {

    cs, err := models.Collections(
        qm4.Where("type_id = ?", common.CONTENT_TYPE_REGISTRY.ByName[common.CT_ARTICLES].ID)).
        All(mdb)
Severity: Major
Found in importer/kmedia/articles.go and 1 other location - About 1 day to fix
importer/kmedia/clips.go on lines 167..234

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

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 *Language) Insert(exec boil.Executor, whitelist ...string) error {
    if o == nil {
        return errors.New("kmodels: no languages provided for insertion")
    }

Severity: Major
Found in importer/kmedia/kmodels/languages.go and 4 other locations - About 1 day to fix
importer/kmedia/kmodels/content_types.go on lines 590..663
importer/kmedia/kmodels/file_types.go on lines 274..347
importer/kmedia/kmodels/roles_users.go on lines 434..507
importer/kmedia/kmodels/servers.go on lines 599..672

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

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 *RolesUser) Insert(exec boil.Executor, whitelist ...string) error {
    if o == nil {
        return errors.New("kmodels: no roles_users provided for insertion")
    }

Severity: Major
Found in importer/kmedia/kmodels/roles_users.go and 4 other locations - About 1 day to fix
importer/kmedia/kmodels/content_types.go on lines 590..663
importer/kmedia/kmodels/file_types.go on lines 274..347
importer/kmedia/kmodels/languages.go on lines 1529..1602
importer/kmedia/kmodels/servers.go on lines 599..672

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

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 *ContentType) Insert(exec boil.Executor, whitelist ...string) error {
    if o == nil {
        return errors.New("kmodels: no content_types provided for insertion")
    }

Severity: Major
Found in importer/kmedia/kmodels/content_types.go and 4 other locations - About 1 day to fix
importer/kmedia/kmodels/file_types.go on lines 274..347
importer/kmedia/kmodels/languages.go on lines 1529..1602
importer/kmedia/kmodels/roles_users.go on lines 434..507
importer/kmedia/kmodels/servers.go on lines 599..672

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

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) Insert(exec boil.Executor, whitelist ...string) error {
    if o == nil {
        return errors.New("kmodels: no servers provided for insertion")
    }

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 590..663
importer/kmedia/kmodels/file_types.go on lines 274..347
importer/kmedia/kmodels/languages.go on lines 1529..1602
importer/kmedia/kmodels/roles_users.go on lines 434..507

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

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 *FileType) Insert(exec boil.Executor, whitelist ...string) error {
    if o == nil {
        return errors.New("kmodels: no file_types provided for insertion")
    }

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 590..663
importer/kmedia/kmodels/languages.go on lines 1529..1602
importer/kmedia/kmodels/roles_users.go on lines 434..507
importer/kmedia/kmodels/servers.go on lines 599..672

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

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 (suite *RestSuite) TestCollectionsList() {
    cp := new(DummyAuthProvider)

    req := CollectionsRequest{
        ListRequest: ListRequest{StartIndex: 1, StopIndex: 5},
Severity: Major
Found in api/rest_test.go and 1 other location - About 1 day to fix
api/rest_test.go on lines 134..194

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

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 (suite *RestSuite) TestContentUnitsList() {
    cp := new(DummyAuthProvider)
    req := ContentUnitsRequest{
        ListRequest: ListRequest{StartIndex: 1, StopIndex: 5},
    }
Severity: Major
Found in api/rest_test.go and 1 other location - About 1 day to fix
api/rest_test.go on lines 55..116

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

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 handlePersonsList(exec boil.Executor, r PersonsRequest) (*PersonsResponse, *HttpError) {
    mods := make([]qm.QueryMod, 0)

    // filters
    if err := appendIDsFilterMods(&mods, r.IDsFilter); err != nil {
Severity: Major
Found in api/rest.go and 1 other location - About 7 hrs to fix
api/rest.go on lines 4232..4286

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

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 handlePublishersList(exec boil.Executor, r PublishersRequest) (*PublishersResponse, *HttpError) {
    mods := make([]qm.QueryMod, 0)

    // filters
    if err := appendIDsFilterMods(&mods, r.IDsFilter); err != nil {
Severity: Major
Found in api/rest.go and 1 other location - About 7 hrs to fix
api/rest.go on lines 4017..4071

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

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 (fileAssetL) LoadLang(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 3 other locations - About 7 hrs to fix
importer/kmedia/kmodels/catalog_descriptions.go on lines 305..371
importer/kmedia/kmodels/container_descriptions.go on lines 308..374
importer/kmedia/kmodels/containers.go on lines 480..546

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

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 (containerL) LoadLang(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 3 other locations - About 7 hrs to fix
importer/kmedia/kmodels/catalog_descriptions.go on lines 305..371
importer/kmedia/kmodels/container_descriptions.go on lines 308..374
importer/kmedia/kmodels/file_assets.go on lines 342..408

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

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 (containerDescriptionL) LoadLang(e boil.Executor, singular bool, maybeContainerDescription interface{}) error {
    var slice []*ContainerDescription
    var object *ContainerDescription

    count := 1
Severity: Major
Found in importer/kmedia/kmodels/container_descriptions.go and 3 other locations - About 7 hrs to fix
importer/kmedia/kmodels/catalog_descriptions.go on lines 305..371
importer/kmedia/kmodels/containers.go on lines 480..546
importer/kmedia/kmodels/file_assets.go on lines 342..408

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

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 (catalogDescriptionL) LoadLang(e boil.Executor, singular bool, maybeCatalogDescription interface{}) error {
    var slice []*CatalogDescription
    var object *CatalogDescription

    count := 1
Severity: Major
Found in importer/kmedia/kmodels/catalog_descriptions.go and 3 other locations - About 7 hrs to fix
importer/kmedia/kmodels/container_descriptions.go on lines 308..374
importer/kmedia/kmodels/containers.go on lines 480..546
importer/kmedia/kmodels/file_assets.go on lines 342..408

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

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 (fileAssetL) LoadServername(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 5 other locations - About 7 hrs to fix
importer/kmedia/kmodels/catalogs.go on lines 368..434
importer/kmedia/kmodels/catalogs.go on lines 438..504
importer/kmedia/kmodels/containers.go on lines 410..476
importer/kmedia/kmodels/containers.go on lines 550..616
importer/kmedia/kmodels/file_assets.go on lines 482..548

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

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 (containerL) LoadContentType(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 5 other locations - About 7 hrs to fix
importer/kmedia/kmodels/catalogs.go on lines 368..434
importer/kmedia/kmodels/catalogs.go on lines 438..504
importer/kmedia/kmodels/containers.go on lines 550..616
importer/kmedia/kmodels/file_assets.go on lines 412..478
importer/kmedia/kmodels/file_assets.go on lines 482..548

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

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 (catalogL) LoadParent(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 5 other locations - About 7 hrs to fix
importer/kmedia/kmodels/catalogs.go on lines 438..504
importer/kmedia/kmodels/containers.go on lines 410..476
importer/kmedia/kmodels/containers.go on lines 550..616
importer/kmedia/kmodels/file_assets.go on lines 412..478
importer/kmedia/kmodels/file_assets.go on lines 482..548

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

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 (catalogL) LoadUser(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 5 other locations - About 7 hrs to fix
importer/kmedia/kmodels/catalogs.go on lines 368..434
importer/kmedia/kmodels/containers.go on lines 410..476
importer/kmedia/kmodels/containers.go on lines 550..616
importer/kmedia/kmodels/file_assets.go on lines 412..478
importer/kmedia/kmodels/file_assets.go on lines 482..548

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

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 (containerL) LoadVirtualLesson(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 5 other locations - About 7 hrs to fix
importer/kmedia/kmodels/catalogs.go on lines 368..434
importer/kmedia/kmodels/catalogs.go on lines 438..504
importer/kmedia/kmodels/containers.go on lines 410..476
importer/kmedia/kmodels/file_assets.go on lines 412..478
importer/kmedia/kmodels/file_assets.go on lines 482..548

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

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