Description
We need to introduce tracing capabilities in ReferenceCop to help debug why certain references trigger specific rules. These traces would be left in verbose log files in the output directory for diagnostic purposes.
Problem
Currently, when a rule is triggered, it can be difficult to understand exactly why that happened, especially in complex build scenarios. Better tracing would help users understand and debug rule violations.
Proposed Solution
- Add tracing capabilities to the MSBuild task and Roslyn analyzer
- Include relevant information in traces (rule details, reference details, context)
- Make trace verbosity configurable
- Ensure traces appear in a separate log file in a readable format
Implementation Details
- Consider using the MSBuild logging APIs for the build task
- Use appropriate diagnostics mechanisms for the Roslyn analyzer
- Ensure tracing is minimal by default but can be increased for debugging
- Add clear documentation on how to enable and interpret traces
Acceptance Criteria
- Traces provide useful information about rule triggers
- Trace verbosity is configurable
- Performance impact is minimal when tracing is not enabled
- Documentation explains how to use the tracing features for debugging
Notes
Not sure yet how much this would be useful, but it could help diagnose issues in complex build scenarios.
Description
We need to introduce tracing capabilities in ReferenceCop to help debug why certain references trigger specific rules. These traces would be left in verbose log files in the output directory for diagnostic purposes.
Problem
Currently, when a rule is triggered, it can be difficult to understand exactly why that happened, especially in complex build scenarios. Better tracing would help users understand and debug rule violations.
Proposed Solution
Implementation Details
Acceptance Criteria
Notes
Not sure yet how much this would be useful, but it could help diagnose issues in complex build scenarios.