From 0a9d10f5b3a308a702ac5e066eabe88104c40695 Mon Sep 17 00:00:00 2001 From: 4meepo Date: Thu, 19 Sep 2024 17:31:07 +0800 Subject: [PATCH] fix UT --- tagalign.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tagalign.go b/tagalign.go index b0047c2..f1d7739 100644 --- a/tagalign.go +++ b/tagalign.go @@ -262,10 +262,8 @@ func (w *Helper) processGroup(pass *analysis.Pass) { i++ } - if w.sort { + if w.sort && StrictStyle == w.style { sortAllKeys(w.fixedTagOrder, uniqueKeys) - } - if w.style == StrictStyle { maxTagNum = len(uniqueKeys) } @@ -302,7 +300,6 @@ func (w *Helper) processGroup(pass *analysis.Pass) { // tag absent in strict mode. if !found { minLength = 0 - break } } else { if j >= len(tagsGroup[i]) {