server/pkg/git/signatures.go
Function VerifyTagSignatures
has 9 return statements (exceeds 4 allowed). Open
Open
func VerifyTagSignatures(repo *git.Repository, tagName string, trustedPGPPublicKeys []string, requiredNumberOfVerifiedSignatures int, logger hclog.Logger) error {
tr, err := repo.Tag(tagName)
if err != nil {
return fmt.Errorf("unable to get tag: %w", err)
}
Function objectSignaturesFromNotes
has 7 return statements (exceeds 4 allowed). Open
Open
func objectSignaturesFromNotes(repo *git.Repository, objectID string) ([]string, error) {
ref, err := repo.Reference(notesReferenceName, true)
if err != nil {
if err == plumbing.ErrReferenceNotFound {
return nil, nil
Function verifyObjectSignatures
has 7 return statements (exceeds 4 allowed). Open
Open
func verifyObjectSignatures(repo *git.Repository, objectID string, trustedPGPPublicKeys []string, requiredNumberOfVerifiedSignatures int, logger hclog.Logger) error {
signatures, err := objectSignaturesFromNotes(repo, objectID)
if err != nil {
if strings.HasSuffix(err.Error(), plumbing.ErrObjectNotFound.Error()) {
logger.Debug(fmt.Sprintf("[DEBUG-SIGNATURES] git object not found (%s): exiting", err))
Function VerifyCommitSignatures
has 6 return statements (exceeds 4 allowed). Open
Open
func VerifyCommitSignatures(repo *git.Repository, commit string, trustedPGPPublicKeys []string, requiredNumberOfVerifiedSignatures int, logger hclog.Logger) error {
co, err := repo.CommitObject(plumbing.NewHash(commit))
if err != nil {
return fmt.Errorf("unable to get commit %q: %w", commit, err)
}
Function VerifyTagSignatures
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func VerifyTagSignatures(repo *git.Repository, tagName string, trustedPGPPublicKeys []string, requiredNumberOfVerifiedSignatures int, logger hclog.Logger) error {
Function verifyObjectSignatures
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func verifyObjectSignatures(repo *git.Repository, objectID string, trustedPGPPublicKeys []string, requiredNumberOfVerifiedSignatures int, logger hclog.Logger) error {
Function VerifyCommitSignatures
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func VerifyCommitSignatures(repo *git.Repository, commit string, trustedPGPPublicKeys []string, requiredNumberOfVerifiedSignatures int, logger hclog.Logger) error {