-
Notifications
You must be signed in to change notification settings - Fork 45
sshdconfig: add tracing and update constants #958
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
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 JSON tracing functionality to the sshdconfig tool and updates SSH configuration constants and parsing logic. The changes implement structured logging similar to the registry implementation and expand the list of supported SSH configuration keywords.
- Adds JSON-formatted tracing with stderr output for better observability
- Updates SSH keyword constants to include more multi-argument and repeatable keywords
- Enhances parser validation and adds support for quoted strings with spaces
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
sshdconfig/src/main.rs | Adds tracing initialization and structured logging with debug statements |
sshdconfig/src/util.rs | Implements enable_tracing() function for JSON-formatted logging setup |
sshdconfig/src/parser.rs | Adds debug logging, multi-arg validation, and string trimming |
sshdconfig/src/metadata.rs | Expands MULTI_ARG_KEYWORDS and REPEATABLE_KEYWORDS constants |
sshdconfig/src/get.rs | Adds debug logging to get operations |
sshdconfig/Cargo.toml | Updates tracing-subscriber with additional features |
sshdconfig/locales/en-us.toml | Adds new error messages and reorganizes existing ones |
sshdconfig/tests/defaultshell.tests.ps1 | Updates tests to parse JSON tracing output |
tree-sitter-ssh-server-config/test/corpus/valid_expressions.txt | Adds test case for repeatable keyword parsing |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
I noticed in local builds this message:
Building tree-sitter-ssh-server-config ... for current
Warning: rule empty_line is just a `seq` or `choice` rule with a single element. This is unnecessary.
Do you want to fix that in this PR as well?
Command::Get { setting } => invoke_get(setting), | ||
Command::Set { input } => invoke_set(input), | ||
Command::Export => { | ||
debug!("Export command"); |
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.
should i18n all strings
PR Summary