@@ -89,7 +89,7 @@ type InspectionType struct {
8989
9090func (i InspectionType ) Print (w io.Writer , escaper * strings.Replacer ) (int , error ) {
9191 return fmt .Fprintf (w , "##teamcity[inspectionType id='%s' name='%s' description='%s' category='%s']\n " ,
92- limit (i .id , smallLimit ), limit (i .name , smallLimit ), limit (escaper .Replace (i .description ), largeLimit ), limit (i .category , smallLimit ))
92+ cutVal (i .id , smallLimit ), cutVal (i .name , smallLimit ), cutVal (escaper .Replace (i .description ), largeLimit ), cutVal (i .category , smallLimit ))
9393}
9494
9595// InspectionInstance reports a specific defect, warning, error message.
@@ -105,15 +105,15 @@ type InspectionInstance struct {
105105
106106func (i InspectionInstance ) Print (w io.Writer , replacer * strings.Replacer ) (int , error ) {
107107 return fmt .Fprintf (w , "##teamcity[inspection typeId='%s' message='%s' file='%s' line='%d' SEVERITY='%s']\n " ,
108- limit (i .typeID , smallLimit ),
109- limit (replacer .Replace (i .message ), largeLimit ),
110- limit (i .file , largeLimit ),
108+ cutVal (i .typeID , smallLimit ),
109+ cutVal (replacer .Replace (i .message ), largeLimit ),
110+ cutVal (i .file , largeLimit ),
111111 i .line , strings .ToUpper (i .severity ))
112112}
113113
114- func limit (s string , max int ) string {
114+ func cutVal (s string , limit int ) string {
115115 var size , count int
116- for i := 0 ; i < max && count < len (s ); i ++ {
116+ for i := 0 ; i < limit && count < len (s ); i ++ {
117117 _ , size = utf8 .DecodeRuneInString (s [count :])
118118 count += size
119119 }
0 commit comments