Skip to content

fix: rename oscal --out flag to --output for consistency#496

Merged
eddie-knight merged 1 commit intoossf:mainfrom
liketosweep:fix-oscal-flag
Apr 9, 2026
Merged

fix: rename oscal --out flag to --output for consistency#496
eddie-knight merged 1 commit intoossf:mainfrom
liketosweep:fix-oscal-flag

Conversation

@liketosweep
Copy link
Copy Markdown
Contributor

fix: rename oscal command's --out flag to --output


Problem

The oscal command uses --out as its output file flag, while the compile command
uses --output for the same purpose. This inconsistency forces users to remember
different flag names for the same operation depending on which command they are using.


Root Cause

The oscal and compile commands were implemented without a shared flag naming
convention, causing the same logical argument — the output file path — to be named
differently across the two commands.


Fix

  • Renamed flag in cmd/oscal.go from "out" to "output" in the StringVarP call
  • Shorthand -o remains unchanged, preserving backward compatibility
  • Updated README.md to reflect the new --output flag
  • Confirmed no other files reference the old --out flag

Result

  • go build passes with no errors
  • --output generates valid OSCAL JSON output successfully
  • --out correctly returns ERROR: unknown flag: --out confirming removal
  • -o shorthand continues to work as expected

Fixes #282

Copy link
Copy Markdown
Contributor

@funnelfiasco funnelfiasco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this!

@eddie-knight eddie-knight merged commit db25032 into ossf:main Apr 9, 2026
5 checks passed
@liketosweep
Copy link
Copy Markdown
Contributor Author

Thanks for the quick reviews and for merging! Glad I could help out.

@liketosweep liketosweep deleted the fix-oscal-flag branch April 9, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

oscal command uses inconsistent output file argument

3 participants