microsoft / sarif-sdk

.NET code and supporting files for working with the 'Static Analysis Results Interchange Format' (SARIF, see https://github.com/oasis-tcs/sarif-spec)
Other
191 stars 88 forks source link

User facing output to file diff #2749

Closed michaelcfanning closed 6 months ago

michaelcfanning commented 7 months ago

This change retrieves and persists user-facing output generated by functional tests. These strings are to be persisted alongside the generated .sarif files in the Expected directory in TestData. We are experimenting with this capability in one SARIF Driver framework use case. Once it's proven/refined, we should push that code deeper into the test API.

shaopeng-gh commented 7 months ago

Will the generated .txt file same when running on different machines, does it contains the part that is the absolute path of the file that is having problem which will be different on the machine

michaelcfanning commented 7 months ago

The non-deterministic repo root is normalized to a variable, e.g.:

$(SRC_ROOT)\src\Plugins\Tests\TestData\Example\Inputs\TST101_001.TestRule.ps1(4,43-69): warning STST101/001: '…111111' was flagged as a potential problem.


In reply to: 1867931239