8000 Update for hcl tags by tnm · Pull Request #1 · cased/kit · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update for hcl tags #1

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

Merged
merged 1 commit into from
Apr 22, 2025
Merged

Update for hcl tags #1

merged 1 commit into from
Apr 22, 2025

Conversation

tnm
Copy link
Contributor
@tnm tnm commented Apr 22, 2025

This pull request refactors and extends the tagging logic in the queries/hcl/tags.scm file to improve the handling of HCL block types. The changes include reordering and refining block definitions, reintroducing locals and terraform block types, and adding a fallback for generic blocks.

Refinements to block type handling:

  • Updated the resource block definition to replace the generic block capture for better specificity. ([queries/hcl/tags.scmL5-R6](https://github.com/cased/kit/pull/1/files#diff-c49dc889037c2834bee19fb36e2db1389b11c22fd5f5c070a51652d4713f6da4L5-R6))

Reintroduction of specific block types:

  • Reintroduced the locals block type with updated positioning and logic for better clarity and organization. ([queries/hcl/tags.scmR43-R57](https://github.com/cased/kit/pull/1/files#diff-c49dc889037c2834bee19fb36e2db1389b11c22fd5f5c070a51652d4713f6da4R43-R57))
  • Added a new terraform block type to explicitly handle Terraform-specific blocks. ([queries/hcl/tags.scmR43-R57](https://github.com/cased/kit/pull/1/files#diff-c49dc889037c2834bee19fb36e2db1389b11c22fd5f5c070a51652d4713f6da4R43-R57))

Fallback for generic block handling:

  • Introduced a fallback rule to capture any block with just an identifier as a generic block, ensuring no block is left uncaptured. ([queries/hcl/tags.scmR43-R57](https://github.com/cased/kit/pull/1/files#diff-c49dc889037c2834bee19fb36e2db1389b11c22fd5f5c070a51652d4713f6da4R43-R57))

Removal of outdated logic:

  • Removed the old locals block capture logic, replacing it with the updated and more flexible version. ([queries/hcl/tags.scmL21-L26](https://github.com/cased/kit/pull/1/files#diff-c49dc889037c2834bee19fb36e2db1389b11c22fd5f5c070a51652d4713f6da4L21-L26))

@tnm tnm merged commit 2358e7d into main Apr 22, 2025
1 check passed
5D62
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.

1 participant
0