From 6fe84c16857647d90c7729ccdfee47e94a032812 Mon Sep 17 00:00:00 2001 From: omissis Date: Sun, 11 Sep 2022 14:15:44 +0200 Subject: [PATCH] feat: add more details to 'have_permission' rule message --- internal/arch/file/expect/have_permissions.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/arch/file/expect/have_permissions.go b/internal/arch/file/expect/have_permissions.go index ff78858..6a48a5b 100644 --- a/internal/arch/file/expect/have_permissions.go +++ b/internal/arch/file/expect/have_permissions.go @@ -68,13 +68,13 @@ func (e havePermissionsExpression) getViolation(filePath string) rule.CoreViolat iNodeType = "directory" } - format := "%s '%s' does not have permissions matching '%s'" + format := "%s '%s' does not have permissions matching '%s', '%s' found" if e.options.negated { - format = "%s '%s' does have permissions matching '%s'" + format = "%s '%s' does have permissions matching '%s', '%s' found" } return rule.NewCoreViolation( - fmt.Sprintf(format, iNodeType, filepath.Base(filePath), e.permissions), + fmt.Sprintf(format, iNodeType, filepath.Base(filePath), e.permissions, info.Mode().String()), ) }