The documentation states that the return code for the Main class is the number of errors found by CheckStyle:
So if 1138 problem were found, the return code is 1138.
But nonzero return codes don't mean that CheckStyle reached an abnormal termination point, on the contrary, it performed its duty as expected.
So I'd say that successfully processing the input files is a success.
On the other hand I understand that using a positive return code can be used to to stop a build for instance.
So return codes values could for example be:
0: No processing errors, no problems detected
1: Warning: No processing errors, problems detected (the number is not transmitted)
2: Error: Some files could generated parsing error(s)
3: Fatal: No files could be parsed
Which would help integrating CheckStyle better
For those who need the number of problems, the information can be deduced from the produced XML report.