Commit eb56179
authored
fix(policy): ignore dotfile presets from directories (#2679)
Replays the approved functional change from @WuKongAI-CMU in #2525 onto
current main.
Original PR:
- #2525 by @WuKongAI-CMU
Behavior:
- `policy-add --from-dir` ignores hidden dotfile YAML entries while
still applying non-hidden `.yaml`/`.yml` files in lexicographic order.
- Explicit `policy-add --from-file .hidden.yaml` behavior is unchanged
because the `--from-file` path is not filtered.
Replacement rationale:
- #2525 was already approved but is currently blocked by branch/process
state.
- This PR carries the same functional change forward on a clean replay
branch so it can be validated and merged without waiting on the original
branch update.
Validation:
- `git diff --check` passed.
- `npm test -- test/policies.test.ts -t="--from-dir skips hidden dotfile
yaml presets"` passed after installing dependencies and rebuilding the
CLI.
- GitHub checks are being monitored before merge.
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>1 parent e225dfb commit eb56179
2 files changed
Lines changed: 20 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2116 | 2116 | | |
2117 | 2117 | | |
2118 | 2118 | | |
2119 | | - | |
2120 | | - | |
2121 | | - | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
2122 | 2122 | | |
2123 | 2123 | | |
2124 | 2124 | | |
| |||
2161 | 2161 | | |
2162 | 2162 | | |
2163 | 2163 | | |
2164 | | - | |
| 2164 | + | |
| 2165 | + | |
2165 | 2166 | | |
2166 | 2167 | | |
2167 | 2168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1475 | 1475 | | |
1476 | 1476 | | |
1477 | 1477 | | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
1478 | 1493 | | |
1479 | 1494 | | |
1480 | 1495 | | |
| |||
0 commit comments