Skip to content

chore: hclfmt hclvalidate validate-inputs as deprecated commands (minor fixes)#4199

Merged
lev-ok merged 8 commits intomainfrom
feat/strict-control-deprecated-hcl-commands
Apr 22, 2025
Merged

chore: hclfmt hclvalidate validate-inputs as deprecated commands (minor fixes)#4199
lev-ok merged 8 commits intomainfrom
feat/strict-control-deprecated-hcl-commands

Conversation

@lev-ok
Copy link
Copy Markdown
Contributor

@lev-ok lev-ok commented Apr 22, 2025

Description

Minor fixes of the already merged PR #4196

TODOs

Read the Gruntwork contribution guidelines.

  • Update the docs.
  • Run the relevant tests successfully, including pre-commit checks.
  • Ensure any 3rd party code adheres with our license policy or delete this line if its not applicable.
  • Include release notes. If this PR is backward incompatible, include a migration guide.

Release Notes (draft)

Added / Removed / Updated [X].

Migration Guide

Summary by CodeRabbit

  • Documentation
    • Improved clarity in comments and descriptions related to deprecated command controls, specifically indicating their relevance to the CLI Redesign.
    • Corrected the deprecated environment variable name for the HCL format command to ensure accurate legacy environment variable recognition.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
terragrunt-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2025 6:22pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 22, 2025

📝 Walkthrough

Walkthrough

This update makes two targeted documentation and metadata corrections. First, it fixes the deprecated environment variable name associated with the stdin flag in the HCL format command, changing it from "hclfmt-diff" to the correct "hclfmt-stdin". Second, it clarifies the description and comment for the CLIRedesign control, specifying that it prevents the use of commands deprecated as part of the CLI Redesign, rather than deprecated commands in general. No functional or logic changes are introduced.

Changes

File(s) Change Summary
cli/commands/hcl/format/cli.go Corrected the deprecated environment variable for the stdin flag from "hclfmt-diff" to "hclfmt-stdin".
internal/strict/controls/controls.go Updated the comment and description for the CLIRedesign control to clarify it concerns CLI Redesign deprecations.

Possibly related PRs

Suggested reviewers

  • denis256
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@lev-ok lev-ok marked this pull request as ready for review April 22, 2025 18:22
@lev-ok lev-ok requested review from denis256 and yhakbar as code owners April 22, 2025 18:22
@lev-ok lev-ok changed the title chore: hclfmt hclvalidate validate-inputs as deprecated commands (minor fixes) chore: hclfmt hclvalidate validate-inputs as deprecated commands (minor fixes) Apr 22, 2025
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a 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 (2)
internal/strict/controls/controls.go (2)

63-63: Fix capitalization and punctuation in error string
Lint rule error-strings requires error messages to start lowercase and omit trailing punctuation. Update the Error field accordingly.
Example diff:

- Error: errors.Errorf("Reading inputs from dependencies is no longer supported. To acquire values from dependencies, use outputs."),
+ Error: errors.Errorf("reading inputs from dependencies is no longer supported; use outputs"),
🧰 Tools
🪛 GitHub Actions: Strict Lint

[error] 63-63: revive: error-strings: error strings should not be capitalized or end with punctuation or a newline


71-71: Fix capitalization and punctuation in error string
Apply the same lint rule to the bootstrap error message.
Example diff:

- Error: errors.Errorf("Bootstrap backend for remote state by default is no longer supported. Use `--backend-bootstrap` flag instead."),
+ Error: errors.Errorf("bootstrap backend for remote state by default is no longer supported; use `--backend-bootstrap` flag instead"),
🧰 Tools
🪛 GitHub Actions: Strict Lint

[error] 71-71: revive: error-strings: error strings should not be capitalized or end with punctuation or a newline

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5a320e3 and 728968b.

📒 Files selected for processing (2)
  • cli/commands/hcl/format/cli.go (1 hunks)
  • internal/strict/controls/controls.go (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.go`: Review the Go code for quality and correctness. Make sure that the Go code follows best practices, is performant, and is easy to understand and maintain.

**/*.go: Review the Go code for quality and correctness. Make sure that the Go code follows best practices, is performant, and is easy to understand and maintain.

  • cli/commands/hcl/format/cli.go
  • internal/strict/controls/controls.go
🪛 GitHub Actions: Strict Lint
internal/strict/controls/controls.go

[error] 63-63: revive: error-strings: error strings should not be capitalized or end with punctuation or a newline


[error] 71-71: revive: error-strings: error strings should not be capitalized or end with punctuation or a newline

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: Build (linux/386)
  • GitHub Check: Build (linux/amd64)
  • GitHub Check: Test (ubuntu)
  • GitHub Check: Test (macos)
  • GitHub Check: Test (windows)
  • GitHub Check: build-and-test
  • GitHub Check: Pull Request has non-contributor approval
🔇 Additional comments (3)
internal/strict/controls/controls.go (2)

47-48: Clarify CLI redesign control comment
The comment now correctly scopes CLIRedesign to deprecations from the CLI Redesign, improving precision without affecting behavior.


105-107: Update CLI redesign control description
The Description field now explicitly states it's for commands deprecated as part of the CLI Redesign, aligning the documentation with the intended constraint.

cli/commands/hcl/format/cli.go (1)

73-75: Correct deprecated env var for stdin flag
The deprecated environment variable and names for the stdin flag have been updated from "hclfmt-diff" to "hclfmt-stdin", ensuring the legacy TG_HCLFMT_STDIN and its flag names are properly recognized. This aligns with the intended deprecation policy.

@lev-ok lev-ok merged commit e42957e into main Apr 22, 2025
19 of 22 checks passed
@lev-ok lev-ok deleted the feat/strict-control-deprecated-hcl-commands branch April 22, 2025 21:58
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.

4 participants