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
193 stars 91 forks source link

Restructuring initialization handling to harden, redirecting RichReturnCode to GlobalContext #2769

Closed scottoneil-ms closed 8 months ago

scottoneil-ms commented 8 months ago

Discussion about previous change (which breaks a pattern in a small way) revealed a larger problem around config initialization. This is a modest change to how we do config init that hardens all the easy cases without changing error behavior for any hard cases. It is enough to ensure config state that is essential for basic IO expectations even in failure cases (ie: RichReturnCode) is respected even in failure scenarios where we might not do much in the way of scanning.