-
-
Notifications
You must be signed in to change notification settings - Fork 124
autoring: add -q option #1944
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?
autoring: add -q option #1944
Conversation
WalkthroughA quiet mode feature was introduced to the command-line tool by adding a Changes
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
tools/authoring/authoring.cc (1)
93-510
: Consider refactoring the main function to reduce complexity.The static analysis correctly identifies that the
main
function has high cyclomatic complexity (now 59, threshold 9). While the quiet mode additions are justified, consider extracting logical sections into separate functions to improve maintainability.Potential refactoring opportunities:
- Extract JSON parsing and validation logic
- Extract file processing and compression logic
- Extract ISO structure creation logic
This would make the code more modular and easier to test while reducing the complexity of the main function.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
tools/authoring/authoring.cc
(6 hunks)
🧰 Additional context used
🪛 GitHub Check: CodeScene Cloud Delta Analysis (main)
tools/authoring/authoring.cc
[warning] 99-383: ❌ Getting worse: Complex Method
main increases in cyclomatic complexity from 55 to 59, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
[warning] 99-383: ❌ Getting worse: Complex Method
main increases in cyclomatic complexity from 55 to 59, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
⏰ Context from checks skipped due to timeout of 90000ms (11)
- GitHub Check: pcsx-redux (aarch64-linux)
- GitHub Check: pcsx-redux (x86_64-linux)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: build-openbios
- GitHub Check: macos-build-and-test-toolchain
- GitHub Check: coverage
- GitHub Check: aur-build
- GitHub Check: asan
- GitHub Check: cross-arm64
- GitHub Check: toolchain
- GitHub Check: build
🔇 Additional comments (6)
tools/authoring/authoring.cc (6)
99-99
: Command line parsing looks correct.The quiet flag is properly parsed from the command line arguments using the consistent pattern with other flags.
111-111
: Help text accurately describes the new option.The help text clearly indicates that
-q
will "only print errors", which correctly describes the quiet mode behavior.
204-206
: Informational output correctly suppressed in quiet mode.The index size information is appropriately wrapped with the quiet flag check, maintaining the intended behavior of only showing errors when quiet mode is enabled.
226-229
: Executable information output properly controlled.Both executable size and location information are correctly wrapped with quiet flag checks, ensuring consistency with the quiet mode implementation.
365-371
: File processing details appropriately silenced.The detailed file processing information (original size, compressed size, compression method, sector offset) is properly wrapped with the quiet flag check, which is important since this can be quite verbose during the build process.
381-383
: Final summary output correctly controlled.The total processed files count is appropriately wrapped with the quiet flag check, completing the consistent implementation of quiet mode throughout the tool.
Currently authoring prints a lot of stuff during ISO build process which adds a lot of noise between build runs.
This adds option to only print errors when "-q" is specified and print nothing when ISO build succeeds.