Litee / SolutionCop

Tool for static analysis of Visual Studio solutions
Apache License 2.0
23 stars 3 forks source link

--build-server-no-success-messages is ignored #36

Open imanushin opened 7 years ago

Litee commented 7 years ago

I just checked v0.7.0 from command line and it seems to work - no success TeamCity message. End of console output is like this:

...
##teamcity[testIgnored name='SolutionCop.TreatWarningsAsErrors']
INFO: Analyzing projects using rule WarningLevel
##teamcity[testIgnored name='SolutionCop.WarningLevel']
##teamcity[testSuiteFinished name='SolutionCop']
INFO: Analysis finished!
INFO: No errors found!

Without flag it is:

...
##teamcity[testIgnored name='SolutionCop.TreatWarningsAsErrors']
INFO: Analyzing projects using rule WarningLevel
##teamcity[testIgnored name='SolutionCop.WarningLevel']
##teamcity[testSuiteFinished name='SolutionCop']
INFO: Analysis finished!
INFO: No errors found!
##teamcity[progressMessage text='PASSED - SolutionCop.xml']
imanushin commented 7 years ago

@Litee , what Team City thinks:

  1. First test arrived: stop displaying status messages (such as "Building project XXX", etc)
  2. TeamCity shows only like "4 tests passed" (for 4 SC rules)
  3. After Unit Test session start (e.g. after building) TeamCity starts to increment tests counter

What I think we should to improve:

  1. All rules ignoration should be written to console without TeamCity mark
  2. All passed tests info should be written to console without TeamCity mark
  3. All errors are written with TeamCity mark
Litee commented 7 years ago

Sounds like one more strategy for console output. Let us do the following - I just have pushed re-factored command-lines parameters processing. You can raise PR with alternative strategy into ReportFormatType enum + processing. IMO it will be faster ;)