-
Notifications
You must be signed in to change notification settings - Fork 33
feat(cli): support multiple output formats via --formats flag #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
defabea to
f6e9562
Compare
51ce9d3 to
97fca6d
Compare
Update rubocop todo file with latest offense counts and configurations
97fca6d to
174f70d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for multiple output formats (JSON, HTML, console) through a new --formats CLI flag, allowing users to generate one or more report types in a single run.
Key Changes:
- Introduced
--formatsflag to CLI with support for comma-separated format values (json, html, console) - Added parsing logic to convert format strings to symbols and store in
Skunk::Config - Updated documentation to explain CLI and programmatic format configuration
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| lib/skunk/cli/options/argv.rb | Adds --formats flag parser that accepts comma-separated formats and stores them in Config |
| test/lib/skunk/cli/options/argv_test.rb | Adds test coverage for the new --formats option parsing |
| test/lib/skunk/commands/help_test.rb | Updates help text to include the new --formats flag |
| README.md | Documents CLI flag usage and programmatic configuration for output formats |
| CHANGELOG.md | Records the new feature addition |
| .rubocop_todo.yml | Updates RuboCop offense counts and removes resolved line length violations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
etagwerker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuanVqz Changes look good, I just added one comment related to default
lib/skunk/cli/options/argv.rb
Outdated
| self.output_filename = filename | ||
| end | ||
|
|
||
| opts.on("-f", "--formats json,html,console", Array, "Output formats: json,html,console") do |list| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any way to tell that the default is console here?
Add test case to verify default console format when no --formats option is provided
ad47093 to
633f011
Compare
etagwerker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuanVqz Unfortunately now I'm getting non-deterministic failures from the test suite and it seems to be related to these changes.
https://gist.github.com/etagwerker/9ac9d8e20b5f5a4789b5fe263946c211
1 or 2 out of 10 test executions will fail with something like that.
Could you please take a look?
Context
We added support to
JSON, andHTMLreports.Done When
We can generate those reports with the
--formatsflag