Showing 12 of 12 total issues
Method arangorepository.EditAnnotation
has 57 lines of code (exceeds 50 allowed). Consider refactoring. Open
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(
- Create a ticketCreate a ticket
Method arangorepository.RemoveFromAnnotationGroup
has 53 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (ar *arangorepository) RemoveFromAnnotationGroup(
groupID string,
idslice ...string,
) (*model.AnnoGroup, error) {
manno := &model.AnnoGroup{}
- Create a ticketCreate a ticket
Method arangorepository.RemoveFromAnnotationGroup
has 8 return statements (exceeds 4 allowed). Open
Open
func (ar *arangorepository) RemoveFromAnnotationGroup(
groupID string,
idslice ...string,
) (*model.AnnoGroup, error) {
manno := &model.AnnoGroup{}
- Create a ticketCreate a ticket
Method arangorepository.RemoveAnnotation
has 7 return statements (exceeds 4 allowed). Open
Open
func (ar *arangorepository) RemoveAnnotation(id string, purge bool) error {
manno := &model.AnnoDoc{}
_, err := ar.anno.annot.ReadDocument(context.Background(), id, manno)
if err != nil {
if driver.IsNotFoundGeneral(err) {
- Create a ticketCreate a ticket
Method arangorepository.AppendToAnnotationGroup
has 6 return statements (exceeds 4 allowed). Open
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")
}
- Create a ticketCreate a ticket
Method arangorepository.EditAnnotation
has 6 return statements (exceeds 4 allowed). Open
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(
- Create a ticketCreate a ticket
Method arangorepository.AddAnnotationGroup
has 6 return statements (exceeds 4 allowed). Open
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")
}
- Create a ticketCreate a ticket
Function RunServer
has 5 return statements (exceeds 4 allowed). Open
Open
func RunServer(clt *cli.Context) error {
spn, err := repoAndNatsConn(clt)
if err != nil {
return cli.NewExitError(err.Error(), errCode)
}
- Create a ticketCreate a ticket
Method AnnotationService.UpdateAnnotation
has 5 return statements (exceeds 4 allowed). Open
Open
func (s *AnnotationService) UpdateAnnotation(
ctx context.Context,
rta *annotation.TaggedAnnotationUpdate,
) (*annotation.TaggedAnnotation, error) {
tga := &annotation.TaggedAnnotation{}
- Create a ticketCreate a ticket
Method AnnotationService.GetAnnotation
has 5 return statements (exceeds 4 allowed). Open
Open
func (srv *AnnotationService) GetAnnotation(
ctx context.Context,
req *annotation.AnnotationId,
) (*annotation.TaggedAnnotation, error) {
tna, err := srv.initializeTaggedAnnotation(ctx, req)
- Create a ticketCreate a ticket
Method AnnotationService.ListAnnotationGroups
has 5 return statements (exceeds 4 allowed). Open
Open
func (srv *AnnotationService) ListAnnotationGroups(
ctx context.Context, rgp *annotation.ListGroupParameters,
) (*annotation.TaggedAnnotationGroupCollection, error) {
gac := &annotation.TaggedAnnotationGroupCollection{}
// default value of limit
- Create a ticketCreate a ticket
Method AnnotationService.ListAnnotations
has 5 return statements (exceeds 4 allowed). Open
Open
func (srv *AnnotationService) ListAnnotations(
ctx context.Context, ral *annotation.ListParameters,
) (*annotation.TaggedAnnotationCollection, error) {
tac := &annotation.TaggedAnnotationCollection{}
// default value of limit
- Create a ticketCreate a ticket