-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
fix: Correct displaying deprecated flag warnings #3880
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
51c63e1
fix: correct displaying deprecated flag warns
levkohimins 4a10c64
chore: code improvements
levkohimins 2d578bf
chore: code comment
levkohimins aff2bc5
chore: get rid of similar warnings
levkohimins 6b7fc48
chore: code improvements
levkohimins fcea6db
fix: addressed to PR review.
levkohimins File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,101 @@ | ||
// Package commands represents CLI commands. | ||
package commands | ||
|
||
import ( | ||
"github.com/gruntwork-io/terragrunt/cli/commands/info" | ||
"github.com/gruntwork-io/terragrunt/cli/commands/stack" | ||
"github.com/gruntwork-io/terragrunt/options" | ||
|
||
"github.com/gruntwork-io/terragrunt/cli/commands/graph" | ||
"github.com/gruntwork-io/terragrunt/cli/commands/hclvalidate" | ||
helpCmd "github.com/gruntwork-io/terragrunt/cli/commands/help" | ||
versionCmd "github.com/gruntwork-io/terragrunt/cli/commands/version" | ||
|
||
"github.com/gruntwork-io/terragrunt/cli/commands/scaffold" | ||
|
||
awsproviderpatch "github.com/gruntwork-io/terragrunt/cli/commands/aws-provider-patch" | ||
"github.com/gruntwork-io/terragrunt/cli/commands/catalog" | ||
execCmd "github.com/gruntwork-io/terragrunt/cli/commands/exec" | ||
graphdependencies "github.com/gruntwork-io/terragrunt/cli/commands/graph-dependencies" | ||
"github.com/gruntwork-io/terragrunt/cli/commands/hclfmt" | ||
outputmodulegroups "github.com/gruntwork-io/terragrunt/cli/commands/output-module-groups" | ||
renderjson "github.com/gruntwork-io/terragrunt/cli/commands/render-json" | ||
runCmd "github.com/gruntwork-io/terragrunt/cli/commands/run" | ||
runall "github.com/gruntwork-io/terragrunt/cli/commands/run-all" | ||
terragruntinfo "github.com/gruntwork-io/terragrunt/cli/commands/terragrunt-info" | ||
validateinputs "github.com/gruntwork-io/terragrunt/cli/commands/validate-inputs" | ||
"github.com/gruntwork-io/terragrunt/internal/cli" | ||
) | ||
|
||
// Command category names. | ||
const ( | ||
// MainCommandsCategoryName represents primary Terragrunt operations like run, run-all. | ||
MainCommandsCategoryName = "Main commands" | ||
// CatalogCommandsCategoryName represents commands for managing Terragrunt catalogs. | ||
CatalogCommandsCategoryName = "Catalog commands" | ||
// ConfigurationCommandsCategoryName represents commands for managing Terragrunt configurations. | ||
ConfigurationCommandsCategoryName = "Configuration commands" | ||
// ShortcutsCommandsCategoryName represents OpenTofu-specific shortcut commands. | ||
ShortcutsCommandsCategoryName = "OpenTofu shortcuts" | ||
) | ||
|
||
// New returns the set of Terragrunt commands, grouped into categories. | ||
// Categories are ordered in increments of 10 for easy insertion of new categories. | ||
func New(opts *options.TerragruntOptions) cli.Commands { | ||
mainCommands := cli.Commands{ | ||
runCmd.NewCommand(opts), // run | ||
runall.NewCommand(opts), // run-all | ||
stack.NewCommand(opts), // stack | ||
graph.NewCommand(opts), // graph | ||
execCmd.NewCommand(opts), // exec | ||
}.SetCategory( | ||
&cli.Category{ | ||
Name: MainCommandsCategoryName, | ||
Order: 10, //nolint: mnd | ||
}, | ||
) | ||
|
||
catalogCommands := cli.Commands{ | ||
catalog.NewCommand(opts), // catalog | ||
scaffold.NewCommand(opts), // scaffold | ||
}.SetCategory( | ||
&cli.Category{ | ||
Name: CatalogCommandsCategoryName, | ||
Order: 20, //nolint: mnd | ||
}, | ||
) | ||
|
||
configurationCommands := cli.Commands{ | ||
graphdependencies.NewCommand(opts), // graph-dependencies | ||
outputmodulegroups.NewCommand(opts), // output-module-groups | ||
validateinputs.NewCommand(opts), // validate-inputs | ||
hclvalidate.NewCommand(opts), // hclvalidate | ||
hclfmt.NewCommand(opts), // hclfmt | ||
info.NewCommand(opts), // info | ||
terragruntinfo.NewCommand(opts), // terragrunt-info | ||
renderjson.NewCommand(opts), // render-json | ||
helpCmd.NewCommand(opts), // help (hidden) | ||
versionCmd.NewCommand(opts), // version (hidden) | ||
awsproviderpatch.NewCommand(opts), // aws-provider-patch (hidden) | ||
}.SetCategory( | ||
&cli.Category{ | ||
Name: ConfigurationCommandsCategoryName, | ||
Order: 30, //nolint: mnd | ||
}, | ||
) | ||
|
||
shortcutsCommands := NewShortcutsCommands(opts).SetCategory( | ||
&cli.Category{ | ||
Name: ShortcutsCommandsCategoryName, | ||
Order: 40, //nolint: mnd | ||
}, | ||
) | ||
|
||
allCommands := mainCommands. | ||
Merge(catalogCommands...). | ||
Merge(configurationCommands...). | ||
Merge(shortcutsCommands...). | ||
Merge(NewDeprecatedCommands(opts)...) | ||
|
||
return allCommands | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
NIT: We'll forget to update this later.