File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -145,10 +145,21 @@ func (s *Shortener) formatStmt(stmt dst.Stmt, force bool) {
145145 case * dst.SwitchStmt :
146146 s .formatStmt (st .Body , false )
147147
148+ case * dst.BadStmt , * dst.EmptyStmt , * dst.LabeledStmt ,
149+ * dst.SendStmt , * dst.IncDecStmt , * dst.BranchStmt , * dst.TypeSwitchStmt :
150+ // These statements are explicitly defined to improve switch cases exhaustiveness.
151+ // They may be handled in the future.
152+ if shouldShorten {
153+ s .logger .Debug (
154+ "got a statement type that is not shortened" ,
155+ slog .Any ("stmt_type" , stmtType ),
156+ )
157+ }
158+
148159 default :
149160 if shouldShorten {
150161 s .logger .Debug (
151- "got a statement type that can't be shortened " ,
162+ "got an unknown statement type" ,
152163 slog .Any ("stmt_type" , stmtType ),
153164 )
154165 }
You can’t perform that action at this time.
0 commit comments