Add configurable CSV output columns for detailed results#3026
Conversation
Co-authored-by: BernieWhite <13513058+BernieWhite@users.noreply.github.com>
BernieWhite
left a comment
There was a problem hiding this comment.
@copilot Add help content to the markdown file concepts/PSRule/en-US/about_PSRule_Options.md for the new option csvDetailedColumns.
Co-authored-by: BernieWhite <13513058+BernieWhite@users.noreply.github.com>
Added comprehensive help documentation for the
Commit: f183837 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
BernieWhite
left a comment
There was a problem hiding this comment.
@copilot Reorder properties in src/PSRule/Configuration/OutputOption.cs so that CsvDetailedColumns is after Culture.
…ntation Co-authored-by: BernieWhite <13513058+BernieWhite@users.noreply.github.com>
Reordered the CsvDetailedColumns property to appear after Culture in OutputOption.cs. Updated all related methods (constructor, copy constructor, Equals, GetHashCode, Combine, and Load methods) to maintain the proper order. Commit: 9363ec0 |
This PR implements configurable CSV output columns for PSRule, allowing users to customize which columns are included in CSV detailed output format.
Progress
Problem
Previously, CSV output had a fixed column structure that couldn't be customized. Users needed flexibility to:
Info.SynopsisorLevelSolution
Added a new
CsvDetailedColumnsproperty toOutputOptionthat accepts an array of column names. The implementation supports:Configuration Methods
YAML Configuration:
Environment Variable:
Supported Column Types
RuleName,TargetName,TargetType,Outcome,OutcomeReason,Synopsis,RecommendationInfo.Annotations,Tag, andFieldusing dotted notationKey Features
Examples
Before (fixed output):
After (configurable):
Implementation Details
CsvOutputWriterto use configurable columns with default fallbackFixes #1165.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.