Bnei-Baruch/mdb

View on GitHub

Showing 1,135 of 1,135 total issues

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

File container_description_patterns.go has 915 lines of code (exceeds 500 allowed). Consider refactoring.
Open

// Code generated by SQLBoiler (https://github.com/volatiletech/sqlboiler). DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.

package kmodels

Severity: Major
Found in importer/kmedia/kmodels/container_description_patterns.go - About 1 day to fix

    File labels.go has 904 lines of code (exceeds 500 allowed). Consider refactoring.
    Open

    // Code generated by SQLBoiler (https://github.com/volatiletech/sqlboiler). DO NOT EDIT.
    // This file is meant to be re-generated in place and/or deleted at any time.
    
    package kmodels
    
    
    Severity: Major
    Found in importer/kmedia/kmodels/labels.go - About 1 day to fix

      Language has 76 methods (exceeds 20 allowed). Consider refactoring.
      Open

      type Language struct {
          ID       int         `boil:"id" json:"id" toml:"id" yaml:"id"`
          Locale   null.String `boil:"locale" json:"locale,omitempty" toml:"locale" yaml:"locale,omitempty"`
          Code3    null.String `boil:"code3" json:"code3,omitempty" toml:"code3" yaml:"code3,omitempty"`
          Language null.String `boil:"language" json:"language,omitempty" toml:"language" yaml:"language,omitempty"`
      Severity: Major
      Found in importer/kmedia/kmodels/languages.go - About 1 day to fix

        File virtual_lessons.go has 877 lines of code (exceeds 500 allowed). Consider refactoring.
        Open

        // Code generated by SQLBoiler (https://github.com/volatiletech/sqlboiler). DO NOT EDIT.
        // This file is meant to be re-generated in place and/or deleted at any time.
        
        package kmodels
        
        
        Severity: Major
        Found in importer/kmedia/kmodels/virtual_lessons.go - About 1 day to fix

          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

          Severity
          Category
          Status
          Source
          Language