Showing 704 of 1,135 total issues
Method containerL.LoadVirtualLesson
has a Cognitive Complexity of 22 (exceeds 20 allowed). Consider refactoring. Open
Open
func (containerL) LoadVirtualLesson(e boil.Executor, singular bool, maybeContainer interface{}) error {
var slice []*Container
var object *Container
count := 1
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method Role.Insert
has 5 return statements (exceeds 4 allowed). Open
Open
func (o *Role) Insert(exec boil.Executor, whitelist ...string) error {
if o == nil {
return errors.New("kmodels: no roles provided for insertion")
}
Method containerL.LoadVirtualLesson
has 5 return statements (exceeds 4 allowed). Open
Open
func (containerL) LoadVirtualLesson(e boil.Executor, singular bool, maybeContainer interface{}) error {
var slice []*Container
var object *Container
count := 1
Method Label.Insert
has 5 return statements (exceeds 4 allowed). Open
Open
func (o *Label) Insert(exec boil.Executor, whitelist ...string) error {
if o == nil {
return errors.New("kmodels: no labels provided for insertion")
}
Method catalogL.LoadContainerDescriptionPatterns
has 5 return statements (exceeds 4 allowed). Open
Open
func (catalogL) LoadContainerDescriptionPatterns(e boil.Executor, singular bool, maybeCatalog interface{}) error {
var slice []*Catalog
var object *Catalog
count := 1
Method fileAssetL.LoadContainers
has 5 return statements (exceeds 4 allowed). Open
Open
func (fileAssetL) LoadContainers(e boil.Executor, singular bool, maybeFileAsset interface{}) error {
var slice []*FileAsset
var object *FileAsset
count := 1
Method FileAssetDescription.Insert
has 5 return statements (exceeds 4 allowed). Open
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")
}
Method CkeditorAsset.Insert
has 5 return statements (exceeds 4 allowed). Open
Open
func (o *CkeditorAsset) Insert(exec boil.Executor, whitelist ...string) error {
if o == nil {
return errors.New("kmodels: no ckeditor_assets provided for insertion")
}
Method rolesUserL.LoadUser
has 5 return statements (exceeds 4 allowed). Open
Open
func (rolesUserL) LoadUser(e boil.Executor, singular bool, maybeRolesUser interface{}) error {
var slice []*RolesUser
var object *RolesUser
count := 1
Method Comment.Insert
has 5 return statements (exceeds 4 allowed). Open
Open
func (o *Comment) Insert(exec boil.Executor, whitelist ...string) error {
if o == nil {
return errors.New("kmodels: no comments provided for insertion")
}
Function importFlatContainer
has 5 return statements (exceeds 4 allowed). Open
Open
func importFlatContainer(exec boil.Executor, container *kmodels.Container, cuType string) error {
stats.ContainersProcessed.Inc(1)
unit, err := models.ContentUnits(qm4.Where("(properties->>'kmedia_id')::int = ?", container.ID)).One(mdb)
if err != nil {
Method VirtualLesson.Insert
has 5 return statements (exceeds 4 allowed). Open
Open
func (o *VirtualLesson) Insert(exec boil.Executor, whitelist ...string) error {
if o == nil {
return errors.New("kmodels: no virtual_lessons provided for insertion")
}
Method Department.Insert
has 5 return statements (exceeds 4 allowed). Open
Open
func (o *Department) Insert(exec boil.Executor, whitelist ...string) error {
if o == nil {
return errors.New("kmodels: no departments provided for insertion")
}
Method fileAssetDescriptionL.LoadFile
has a Cognitive Complexity of 22 (exceeds 20 allowed). Consider refactoring. Open
Open
func (fileAssetDescriptionL) LoadFile(e boil.Executor, singular bool, maybeFileAssetDescription interface{}) error {
var slice []*FileAssetDescription
var object *FileAssetDescription
count := 1
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method Catalog.Insert
has 5 return statements (exceeds 4 allowed). Open
Open
func (o *Catalog) Insert(exec boil.Executor, whitelist ...string) error {
if o == nil {
return errors.New("kmodels: no catalogs provided for insertion")
}
Method fileAssetL.LoadServername
has 5 return statements (exceeds 4 allowed). Open
Open
func (fileAssetL) LoadServername(e boil.Executor, singular bool, maybeFileAsset interface{}) error {
var slice []*FileAsset
var object *FileAsset
count := 1
Method catalogL.LoadContainers
has 5 return statements (exceeds 4 allowed). Open
Open
func (catalogL) LoadContainers(e boil.Executor, singular bool, maybeCatalog interface{}) error {
var slice []*Catalog
var object *Catalog
count := 1
Method catalogL.LoadUser
has 5 return statements (exceeds 4 allowed). Open
Open
func (catalogL) LoadUser(e boil.Executor, singular bool, maybeCatalog interface{}) error {
var slice []*Catalog
var object *Catalog
count := 1
Method RolesUser.Insert
has 5 return statements (exceeds 4 allowed). Open
Open
func (o *RolesUser) Insert(exec boil.Executor, whitelist ...string) error {
if o == nil {
return errors.New("kmodels: no roles_users provided for insertion")
}
Method Server.Insert
has 5 return statements (exceeds 4 allowed). Open
Open
func (o *Server) Insert(exec boil.Executor, whitelist ...string) error {
if o == nil {
return errors.New("kmodels: no servers provided for insertion")
}