-
Notifications
You must be signed in to change notification settings - Fork 0
Print configuration when receiving mismatching trigger #177
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
…configuration.rs mod.rs mod.rs errors.rs lib.rs
…ons.rs pattern.rs var.rs var_source.rs
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.
Bug: Unexpected Blank Lines Mar Error Output
The Display implementation for Configuration calls table.printstd() which prints directly to stdout as a side effect during string formatting. Combined with the \n prefixes in print_error()'s println! calls, this produces extra blank lines in error output that don't match the test expectations in the feature files.
src/config/data/configuration.rs#L94-L109
server/src/config/data/configuration.rs
Lines 94 to 109 in cc8afe8
| #[allow(clippy::str_to_string)] | |
| impl Display for Configuration { | |
| fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | |
| let mut table = Table::new(); | |
| table.set_format(*FORMAT_NO_BORDER_LINE_SEPARATOR); | |
| table.add_row(prettytable::row!["TRIGGER", "RUN"]); | |
| for action in &self.actions { | |
| table.add_row(prettytable::row![action.pattern, action.run]); | |
| } | |
| table.printstd(); | |
| f.write_str("Options:\n")?; | |
| f.write_fmt(format_args!("- beforeRun.clearScreen: {}\n", self.options.before_run.clear_screen))?; | |
| Ok(()) | |
| } | |
| } |
# Conflicts: # src/client/trigger.rs
resolves #174