fix: the TeamCity inspectionType service message (#4573)
This commit is contained in:
parent
66ec75e75f
commit
5ae78cd2ff
@ -88,7 +88,7 @@ type InspectionType struct {
|
||||
}
|
||||
|
||||
func (i InspectionType) Print(w io.Writer, escaper *strings.Replacer) (int, error) {
|
||||
return fmt.Fprintf(w, "##teamcity[InspectionType id='%s' name='%s' description='%s' category='%s']\n",
|
||||
return fmt.Fprintf(w, "##teamcity[inspectionType id='%s' name='%s' description='%s' category='%s']\n",
|
||||
limit(i.id, smallLimit), limit(i.name, smallLimit), limit(escaper.Replace(i.description), largeLimit), limit(i.category, smallLimit))
|
||||
}
|
||||
|
||||
|
@ -56,10 +56,10 @@ func TestTeamCity_Print(t *testing.T) {
|
||||
err := printer.Print(issues)
|
||||
require.NoError(t, err)
|
||||
|
||||
expected := `##teamcity[InspectionType id='linter-a' name='linter-a' description='linter-a' category='Golangci-lint reports']
|
||||
expected := `##teamcity[inspectionType id='linter-a' name='linter-a' description='linter-a' category='Golangci-lint reports']
|
||||
##teamcity[inspection typeId='linter-a' message='warning issue' file='path/to/filea.go' line='10' SEVERITY='']
|
||||
##teamcity[inspection typeId='linter-a' message='error issue' file='path/to/filea.go' line='10' SEVERITY='ERROR']
|
||||
##teamcity[InspectionType id='linter-b' name='linter-b' description='linter-b' category='Golangci-lint reports']
|
||||
##teamcity[inspectionType id='linter-b' name='linter-b' description='linter-b' category='Golangci-lint reports']
|
||||
##teamcity[inspection typeId='linter-b' message='info issue' file='path/to/fileb.go' line='300' SEVERITY='']
|
||||
`
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user