dictyBase/modware-annotation

View on GitHub
internal/repository/arangodb/annotation_write.go

Summary

Maintainability
A
3 hrs
Test Coverage

Method arangorepository.EditAnnotation has 57 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (ar *arangorepository) EditAnnotation(uat *annotation.TaggedAnnotationUpdate) (*model.AnnoDoc, error) {
    mann := &model.AnnoDoc{}
    attr := uat.Data.Attributes
    rgt, err := ar.database.Get(
        fmt.Sprintf(
Severity: Minor
Found in internal/repository/arangodb/annotation_write.go - About 1 hr to fix

Method arangorepository.AppendToAnnotationGroup has 6 return statements (exceeds 4 allowed).
Open

func (ar *arangorepository) AppendToAnnotationGroup(groupID string, idslice ...string) (*model.AnnoGroup, error) {
    grp := &model.AnnoGroup{}
    if len(idslice) <= 1 {
        return grp, errors.New("need at least more than one entry to form a group")
    }
Severity: Major
Found in internal/repository/arangodb/annotation_write.go - About 40 mins to fix

Method arangorepository.EditAnnotation has 6 return statements (exceeds 4 allowed).
Open

func (ar *arangorepository) EditAnnotation(uat *annotation.TaggedAnnotationUpdate) (*model.AnnoDoc, error) {
    mann := &model.AnnoDoc{}
    attr := uat.Data.Attributes
    rgt, err := ar.database.Get(
        fmt.Sprintf(
Severity: Major
Found in internal/repository/arangodb/annotation_write.go - About 40 mins to fix

Method arangorepository.AddAnnotationGroup has 6 return statements (exceeds 4 allowed).
Open

func (ar *arangorepository) AddAnnotationGroup(idslice ...string) (*model.AnnoGroup, error) {
    grp := &model.AnnoGroup{}
    if len(idslice) <= 1 {
        return grp, errors.New("need at least more than one entry to form a group")
    }
Severity: Major
Found in internal/repository/arangodb/annotation_write.go - About 40 mins to fix

There are no issues that match your filters.

Category
Status