-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
docs: Documenting support for --filter in hcl commands
#5010
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughUpdated filter documentation to mark Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
5d4f36a to
e97200a
Compare
4785b77 to
30de841
Compare
30de841 to
ca2abbe
Compare
ca2abbe to
9a4bd40
Compare
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.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs-starlight/src/data/flags/filter.mdx (1)
20-20: Update experimental feature note to reflect newly supported commands.Line 20 states the filter flag is only available in
find,list, andruncommands, but the examples on lines 31–32 and the supported commands list on lines 119–120 document support forhcl fmtandhcl validate. Update this line to be consistent with the rest of the documentation.Apply this diff to fix the inconsistency:
-Currently, the `--filter` flag is available in the `find`, `list`, and `run` commands. +Currently, the `--filter` flag is available in the `find`, `list`, `run`, `hcl fmt`, and `hcl validate` commands.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
docs-starlight/src/content/docs/03-features/18-filter.mdx(2 hunks)docs-starlight/src/data/commands/hcl/fmt.mdx(1 hunks)docs-starlight/src/data/commands/hcl/validate.mdx(1 hunks)docs-starlight/src/data/flags/filter.mdx(2 hunks)docs-starlight/src/data/flags/hcl-fmt-filter.mdx(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
docs-starlight/**/*.md*
⚙️ CodeRabbit configuration file
Review the documentation for clarity, grammar, and spelling. Make sure that the documentation is easy to understand and follow. There is currently a migration underway from the Jekyll based documentation in
docsto the Starlight + Astro based documentation indocs-starlight. Make sure that thedocs-starlightdocumentation is accurate and up-to-date with thedocsdocumentation, and that any difference between them results in an improvement in thedocs-starlightdocumentation.
Files:
docs-starlight/src/data/flags/hcl-fmt-filter.mdxdocs-starlight/src/data/commands/hcl/fmt.mdxdocs-starlight/src/data/commands/hcl/validate.mdxdocs-starlight/src/content/docs/03-features/18-filter.mdxdocs-starlight/src/data/flags/filter.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: license_check / License Check
- GitHub Check: lint / lint
- GitHub Check: Pull Request has non-contributor approval
- GitHub Check: build-and-test
🔇 Additional comments (8)
docs-starlight/src/data/commands/hcl/fmt.mdx (1)
15-15: Good – flag reference is correctly positioned.The addition of
hcl-fmt-filteris properly placed in the flags list and aligns with the broader filter documentation updates.docs-starlight/src/data/commands/hcl/validate.mdx (1)
15-15: Good – standard filter flag correctly referenced for validate command.The
filterflag is appropriately included for thehcl validatecommand.docs-starlight/src/content/docs/03-features/18-filter.mdx (2)
23-23: Good – filter command support is clearly listed.The update properly includes
hcl fmtandhcl validatein the list of commands supporting the--filterflag.
321-322: Good – implementation status correctly reflects documented support.The checklist properly marks
hcl fmtandhcl validateas implemented with the--filterflag.docs-starlight/src/data/flags/filter.mdx (2)
31-32: Clear usage examples correctly demonstrate hcl fmt and hcl validate support.The examples effectively show how to use
--filterwith the newly supported HCL commands.
122-124: Good – planned releases section correctly reflects current implementation status.The simplification to only include
dag graphas a planned feature is appropriate given the new support forhcl fmtandhcl validate.docs-starlight/src/data/flags/hcl-fmt-filter.mdx (2)
23-34: Excellent – filter behavior limitations are clearly documented.The note effectively explains that
hcl fmtuses path-based filtering only, with clear examples of supported and unsupported patterns. This helps users understand the important difference from other commands.
36-88: Examples are well-organized and clearly demonstrate filtering capabilities.The usage section effectively progresses from basic to advanced patterns, with all examples appropriately constrained to path-based filtering as documented in the limitations note. Examples are clear, practical, and follow good documentation practices.
|
|
||
| Examples below will omit the `--experiment filter-flag` flag for brevity. | ||
|
|
||
| Currently, the `--filter` flag is available in the `find`, `list`, and `run` commands. |
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.
🧩 Analysis chain
Clarify or update the experimental feature note to avoid confusion.
This file documents filter support for hcl fmt specifically, but line 20 states the filter flag is only available in find, list, and run commands. This is contradictory since the entire file documents hcl fmt filter usage.
Consider either:
- Updating line 20 to reflect that filters are now available in
find,list,run,hcl fmt, andhcl validate, OR - Removing or adjusting this statement since it's a flag-specific documentation file
Verify the relationship between the hcl-fmt-filter flag (referenced in fmt.mdx) and the usage documented in this file to clarify whether this documentation applies to the standard --filter flag or the --hcl-fmt-filter flag specifically.
---
🏁 Script executed:
```shell
#!/bin/bash
# Read the hcl-fmt-filter.mdx file to verify the actual content
cat docs-starlight/src/data/flags/hcl-fmt-filter.mdx
Length of output: 2667
🏁 Script executed:
#!/bin/bash
# Search for fmt.mdx to check how it references the filter flag
find docs-starlight -name "fmt.mdx" -type f -exec cat {} \;Length of output: 783
🏁 Script executed:
#!/bin/bash
# Search for references to "hcl-fmt-filter" and "--filter" in documentation
rg -n "hcl-fmt-filter|--filter" docs-starlight/src/data/flags/ -A 2 -B 2Length of output: 10667
🏁 Script executed:
#!/bin/bash
# Check for other filter documentation files to understand the broader context
find docs-starlight/src/data/flags -name "*filter*" -type fLength of output: 89
Update line 20 to reflect actual filter support in hcl fmt.
Line 20 contradicts the rest of the file. It states the --filter flag is "available in the find, list, and run commands" only, but the entire file documents hcl fmt filter usage with multiple examples. This is an outdated copy-paste error from the generic filter documentation.
Update line 20 to:
Currently, the `--filter` flag is available in the `find`, `list`, `run`, `hcl fmt`, and `hcl validate` commands.
Or remove it entirely since this is a specialized documentation page for hcl fmt filter support and the statement is now inaccurate.
🤖 Prompt for AI Agents
In docs-starlight/src/data/flags/hcl-fmt-filter.mdx around line 20, the sentence
about which commands support the `--filter` flag is outdated and contradicts the
rest of the page; update line 20 to read: "Currently, the `--filter` flag is
available in the `find`, `list`, `run`, `hcl fmt`, and `hcl validate` commands."
Alternatively, if you prefer the page to focus solely on `hcl fmt`, remove the
line entirely so no inaccurate generic support statement remains.
9a4bd40 to
cb39153
Compare
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
docs-starlight/src/data/flags/hcl-fmt-filter.mdx (1)
1-5: Consider making the frontmatter description more context-specific.The
description: "Filter configurations using a flexible query language"in the frontmatter is generic and may mislead users into expecting attribute-based filtering (liketype=unit). Since the content note clarifies this, a more specific description would improve discoverability—for example:"Filter HCL files to format using path-based queries".Consider updating the YAML description:
--- name: filter -description: Filter configurations using a flexible query language +description: Filter HCL files to format using path-based queries type: list(string) ---This makes the scope clearer at the metadata level and aligns with the file's focused purpose.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
docs-starlight/src/content/docs/03-features/18-filter.mdx(2 hunks)docs-starlight/src/data/commands/hcl/fmt.mdx(1 hunks)docs-starlight/src/data/commands/hcl/validate.mdx(1 hunks)docs-starlight/src/data/flags/filter.mdx(2 hunks)docs-starlight/src/data/flags/hcl-fmt-filter.mdx(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- docs-starlight/src/data/commands/hcl/fmt.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
- docs-starlight/src/data/commands/hcl/validate.mdx
🧰 Additional context used
📓 Path-based instructions (1)
docs-starlight/**/*.md*
⚙️ CodeRabbit configuration file
Review the documentation for clarity, grammar, and spelling. Make sure that the documentation is easy to understand and follow. There is currently a migration underway from the Jekyll based documentation in
docsto the Starlight + Astro based documentation indocs-starlight. Make sure that thedocs-starlightdocumentation is accurate and up-to-date with thedocsdocumentation, and that any difference between them results in an improvement in thedocs-starlightdocumentation.
Files:
docs-starlight/src/content/docs/03-features/18-filter.mdxdocs-starlight/src/data/flags/filter.mdxdocs-starlight/src/data/flags/hcl-fmt-filter.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: license_check / License Check
- GitHub Check: lint / lint
- GitHub Check: build-and-test
- GitHub Check: Pull Request has non-contributor approval
🔇 Additional comments (4)
docs-starlight/src/data/flags/filter.mdx (1)
29-30: ✓ Good additions to supported commands and examples.The new examples for
hcl fmtandhcl validatefollow the established format and are consistent with the existing command examples. The future plans have been correctly updated to reflect current support and adddag graphas planned.Also applies to: 117-121
docs-starlight/src/data/flags/hcl-fmt-filter.mdx (1)
21-32: ✓ Excellent behavioral note clarifying filter limitations for hcl fmt.The
<Aside>note clearly explains thathcl fmtfilters HCL files, not configurations, and that only path-based filtering is supported. The concrete examples of what works and what doesn't prevent user confusion.docs-starlight/src/content/docs/03-features/18-filter.mdx (2)
23-23: ✓ Clear update to supported commands list.Line 23 accurately reflects that
--filteris now available across five commands. The ordering and phrasing are consistent with the detailed flag documentation.
321-322: ✓ Correct implementation status for hcl fmt and hcl validate.The checkboxes are correctly marked as
[x]to indicate these commands now support--filter, moving them from planned to implemented. This is consistent with the expanded support documented elsewhere in the PR.
Description
Documenting support for
--filterinhclcommands.TODOs
Read the Gruntwork contribution guidelines.
Release Notes (draft)
Added / Removed / Updated [X].
Migration Guide
Summary by CodeRabbit
--filterflag docs to includehcl fmtandhcl validatehcl fmtfilter doc with examples and note about requiring the filter-flag experiment; clarifies only path-based filtering applieshcl fmtandhcl validateas implemented (previously planned) and updated command referencedag graph)