fix: skip Include-only directory entries - #36
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7d435c4f69
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| func isLegacyDirectoryConfigFile(path string) bool { | ||
| return hasConfigDirective(path, func(keyword string) bool { | ||
| return keyword != "include" |
There was a problem hiding this comment.
Preserve Include scope when skipping the entry file
When an Include-only entry selects only part of the source tree (for example, Include enabled/*) and another directory contains a config-looking file, this predicate drops the only information describing that selection while filepath.Walk still collects every non-Include config below the source directory. Consequently, conversion succeeds but emits hosts from files OpenSSH would never include; the directory scan must restrict fragments to resolved Include matches rather than treating every descendant as included.
Useful? React with 👍 / 👎.
Summary
IsConfigFileable to recognize Include-only SSH filesconfig+config.d/*layoutVerification
go test ./...go test -race ./...go vet ./...git diff --checkFollow-up to the post-merge P1 review on #32.