-
Notifications
You must be signed in to change notification settings - Fork 10
Write the first output to :stderr
otherwise it causes the first test to fail
#93
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?
Write the first output to :stderr
otherwise it causes the first test to fail
#93
Conversation
WalkthroughThe changes update the logging behavior in the Elixir CLI modules by redirecting a debug message from standard output to standard error. In addition, one solution file reactivates a previously commented-out block that checks file contents and prints a placeholder message if the scanner is not yet implemented. No changes are made to function signatures or exported entities. 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:
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
CodeRabbit Configuration File (
|
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
🔭 Outside diff range comments (1)
solutions/elixir/01-ry8/diff/lib/main.ex.diff (1)
23-23
: 🛠️ Refactor suggestionRemove placeholder
:ok
as suggested by the commentThe comment already indicates this line should be removed when uncommenting the code above. Since you've now uncommented that code, this placeholder
:ok
should be removed.- :ok # Remove this when you uncomment the code above, it's just a placeholder for the compiler
🧹 Nitpick comments (2)
solutions/elixir/01-ry8/diff/lib/main.ex.diff (2)
7-9
: Consider preserving debug message redirected to stderrUnlike the other files that redirect the debug message to stderr, this change removes the debug message entirely. For consistency across the codebase, consider keeping the debug message but redirecting it to stderr like in the other files.
21-21
: Consider redirecting "EOF null" to stderrSince the PR objective is to write the first output to stderr to fix test failures, and the debug message has been removed, the "EOF null" output is now the first output and it's going to stdout. For consistency with the PR objective, consider redirecting this to stderr as well.
- IO.puts("EOF null") # Placeholder, remove this line when implementing the scanner + IO.puts(:stderr, "EOF null") # Placeholder, remove this line when implementing the scanner
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
compiled_starters/elixir/lib/main.ex
(1 hunks)solutions/elixir/01-ry8/diff/lib/main.ex.diff
(1 hunks)starter_templates/elixir/code/lib/main.ex
(1 hunks)
🔇 Additional comments (3)
starter_templates/elixir/code/lib/main.ex (1)
7-7
: Good change: Redirecting debug output to stderr aligns with PR objectivesRedirecting the debug message to standard error stream is a good practice as it:
- Separates debug/log information from program output
- Aligns with the PR objective of fixing test failures
- Provides consistency with other error messages in the file (lines 20, 25, 29) that already use
:stderr
This change helps tests correctly capture program output without interference from debug messages.
compiled_starters/elixir/lib/main.ex (1)
7-7
: Good change: Redirecting debug output to stderrThis change correctly implements the PR objective by redirecting the debug message to the standard error stream instead of standard output. This is consistent with other error messages in the file and will prevent the debug message from interfering with test expectations.
solutions/elixir/01-ry8/diff/lib/main.ex.diff (1)
18-23
: Good: Activated the scanner implementation placeholderYou've successfully uncommented the placeholder scanner implementation code which will help with testing.
Summary by CodeRabbit
Bug Fixes
New Features