@@ -89,7 +89,7 @@ type InspectionType struct {
89
89
90
90
func (i InspectionType ) Print (w io.Writer , escaper * strings.Replacer ) (int , error ) {
91
91
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 ))
93
93
}
94
94
95
95
// InspectionInstance reports a specific defect, warning, error message.
@@ -105,15 +105,15 @@ type InspectionInstance struct {
105
105
106
106
func (i InspectionInstance ) Print (w io.Writer , replacer * strings.Replacer ) (int , error ) {
107
107
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 ),
111
111
i .line , strings .ToUpper (i .severity ))
112
112
}
113
113
114
- func limit (s string , max int ) string {
114
+ func cutVal (s string , limit int ) string {
115
115
var size , count int
116
- for i := 0 ; i < max && count < len (s ); i ++ {
116
+ for i := 0 ; i < limit && count < len (s ); i ++ {
117
117
_ , size = utf8 .DecodeRuneInString (s [count :])
118
118
count += size
119
119
}
0 commit comments