Skip to content

Add --pretty-print option for profile resolution output#193

Merged
david-waltermire merged 1 commit intodevelopfrom
feature/pretty-print-xml
Dec 10, 2025
Merged

Add --pretty-print option for profile resolution output#193
david-waltermire merged 1 commit intodevelopfrom
feature/pretty-print-xml

Conversation

@david-waltermire
Copy link
Contributor

Summary

This PR adds a --pretty-print command-line option for the resolve-profile command, enabling formatted output for XML, JSON, and YAML files.

  • Added PrettyPrinter utility class for formatting output files in various formats
  • Added --pretty-print CLI option to AbstractResolveCommand
  • Added unit tests for the PrettyPrinter utility
  • Added CLI integration tests for pretty-print functionality

Attribution

This feature was originally contributed by Mahesh Kumar Gaddam (@ermahesh) in usnistgov/oscal-cli#295.

Related Issues

Test plan

  • Unit tests for PrettyPrinter utility class (7 tests)
  • CLI integration tests for --pretty-print option with XML, JSON, and YAML output (3 tests)
  • All existing tests continue to pass

This feature enables formatted XML, JSON, and YAML output for the
resolve-profile command, improving readability of the generated files.

- Added PrettyPrinter utility class for formatting output files
- Added --pretty-print CLI option to AbstractResolveCommand
- Added unit tests for the PrettyPrinter utility
- Added CLI integration tests for pretty-print functionality

Original contribution by Mahesh Kumar Gaddam (ermahesh)
Based on usnistgov/oscal-cli#295
Addresses usnistgov/oscal-cli#268
@coderabbitai
Copy link

coderabbitai bot commented Dec 5, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/pretty-print-xml

Comment @coderabbitai help to get the list of available commands and usage tips.

@david-waltermire david-waltermire merged commit fc3e5b3 into develop Dec 10, 2025
5 checks passed
@david-waltermire david-waltermire added this to the v2.6.0 milestone Dec 10, 2025
@david-waltermire david-waltermire moved this from To Triage to Done in Spec and Tooling Work Board Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants