Skip to content

Conversation

@tgauth
Copy link
Collaborator

@tgauth tgauth commented Nov 20, 2025

PR Summary

  • update sshd config grammar to use aliasing and handle parsing the following strings:
    • strings without spaces that are potentially comma-separated
    • strings potentially with spaces that are either single-quoted or double-quoted
  • update sshd config grammar logic to support multiple Match criteria

@tgauth tgauth requested a review from Copilot November 20, 2025 22:45
Copilot finished reviewing on behalf of tgauth November 20, 2025 22:47
@tgauth tgauth requested a review from SteveL-MSFT November 20, 2025 22:47
Copy link
Contributor

Copilot AI left a 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 makes the quotedString grammar node visible in the parse tree by removing the underscore prefix from _quotedString to quotedString. This change enables proper differentiation between regular strings and quoted strings when parsing space-separated arguments in SSH server configuration files (e.g., allowgroups admins devs "openssh users").

  • Updated grammar rule from hidden _quotedString to visible quotedString
  • Updated all test expectations to include the quotedString node in parse trees

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
grammars/tree-sitter-ssh-server-config/grammar.js Changed _quotedString to quotedString in both the rule definition and the arguments choice, making the node visible in the parse tree
grammars/tree-sitter-ssh-server-config/test/corpus/valid_expressions.txt Updated 6 test cases to expect quotedString nodes wrapping string nodes in the parse tree output

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue Dec 2, 2025
@SteveL-MSFT SteveL-MSFT removed this pull request from the merge queue due to a manual request Dec 2, 2025
@tgauth tgauth changed the title update sshd config grammar so quotedString node is not hidden update sshd config grammar Dec 2, 2025
@SteveL-MSFT SteveL-MSFT requested a review from Copilot December 2, 2025 20:31
Copilot finished reviewing on behalf of SteveL-MSFT December 2, 2025 20:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue Dec 2, 2025
Merged via the queue into PowerShell:main with commit 6eeef0e Dec 2, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants