Skip to content

flag description should be rendered in markdown - #1068

Merged
Andriy Knysh (aknysh) merged 48 commits into
mainfrom
feature/dev-3053-flags-description-would-be-rendered-with-markdown
Mar 1, 2025
Merged

Andriy Knysh (aknysh) merged 48 commits into
mainfrom
feature/dev-3053-flags-description-would-be-rendered-with-markdown

Conversation

@samtholiya

@samtholiya Sam Tholiya (samtholiya) commented Feb 15, 2025 •

Copy link
Copy Markdown
Contributor

what

  • Flag description should use markdown
  • If we now have a new command we can easily add examples markdown if we add the file in markdown folder with postfix _usage.md. You won't have to do anything the processor will auto assign example. Note: If there is a markdown file for the command and the example mentioned hardcoded. The markdown will take precedence and this is by design to avoid fragmentation of code.

why

  • We should be rendering flags with markdown so that we can add some highlights to the flag description
    image

references

Summary by CodeRabbit

  • Documentation
    • Improved command help texts and usage guidance, offering clearer, more concise explanations.
    • Added comprehensive markdown-based usage examples and reference documentation for various commands, including atmos atlantis generate repo-config, atmos describe affected, and atmos vendor pull.
  • Style
    • Refined formatting for flag descriptions and default values across help outputs for enhanced readability, including the removal of quotes around boolean values and file descriptors.
  • Chore
    • Streamlined inline documentation by removing redundant examples and extraneous formatting, ensuring consistency without altering command functionality.

@mergify mergify Bot added the triage Needs triage label Feb 15, 2025
Comment thread tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes Feb 17, 2025
@mergify mergify Bot removed the triage Needs triage label Feb 17, 2025
@mergify mergify Bot added the triage Needs triage label Feb 17, 2025
@samtholiya
Sam Tholiya (samtholiya) marked this pull request as ready for review February 17, 2025 22:25
@samtholiya
Sam Tholiya (samtholiya) requested a review from a team as a code owner February 17, 2025 22:25
@coderabbitai

coderabbitai Bot commented Feb 17, 2025 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The changes update the Atmos CLI by refining command help texts across many commands. Flag descriptions have been simplified and reformatted (using backticks, HTML entities, and removal of redundant examples) without altering command functionality. In addition, new markdown documentation files have been introduced to provide detailed usage instructions for various commands, and improvements to markdown rendering have been implemented with new helper methods. Minor updates to test snapshots and UI comments are also included.

Changes

File(s) Change Summary
cmd/atlantis_generate_repo_config.go, cmd/aws_eks_update_kubeconfig.go, cmd/cmd_utils.go, cmd/describe.go, cmd/describe_affected.go, cmd/describe_component.go, cmd/describe_dependents.go, cmd/describe_stacks.go, cmd/describe_workflows.go, cmd/helmfile.go, cmd/helmfile_generate_varfile.go, cmd/list_components.go, cmd/list_stacks.go, cmd/list_workflows.go, cmd/pro_lock.go, cmd/root.go, cmd/terraform.go, cmd/terraform_generate_backend.go, cmd/terraform_generate_backends.go, cmd/terraform_generate_varfile.go, cmd/terraform_generate_varfiles.go, cmd/validate_component.go, cmd/validate_stacks.go, cmd/vendor_diff.go, cmd/vendor_pull.go, cmd/workflow.go, cmd/terraform_commands.go Refined CLI help texts across multiple commands by removing examples, standardizing formatting (backticks, HTML entities, removal of quotes), and simplifying flag descriptions without changing underlying functionality.
cmd/markdown/*.md Added and updated markdown documentation files to detail usage instructions and examples for various Atmos commands.
internal/tui/templates/help_printer.go, pkg/ui/markdown/renderer.go, cmd/markdown_help.go Introduced new markdown rendering methods (RenderWithoutWordWrap and RenderAsciiWithoutWordWrap), restructured markdown help integration with embedded files and new constants.
tests/snapshots/*, tests/test-cases/help-and-usage.yaml Updated test snapshots to reflect the revised help outputs (e.g., removal of extraneous quotes) and added an environment variable (ATMOS_VERSION_CHECK_ENABLED: "false") to test cases.
internal/tui/templates/term/term_writer.go Added a clarifying comment regarding the terminal width limit in the responsive writer.

Possibly related PRs

  • Add atmos docs <component> command #751: The changes in the main PR, which focus on enhancing help text for command-line flags in various commands, are related to the retrieved PR that adds functionality for displaying documentation for specific Atmos components, as both involve modifications to command descriptions and user guidance within the CLI.

Suggested reviewers

  • osterman

📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between bf260b9 and 8e92b30.

📒 Files selected for processing (1)
  • cmd/root.go (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • cmd/root.go
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: [localstack] demo-localstack
  • GitHub Check: Acceptance Tests (macos-latest, macos)
  • GitHub Check: Acceptance Tests (windows-latest, windows)
  • GitHub Check: Acceptance Tests (ubuntu-latest, linux)
  • GitHub Check: Summary

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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 or @auto-summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @auto-title 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🔭 Outside diff range comments (3)
tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden (1)

74-75: 🛠️ Refactor suggestion

Escape angle brackets for markdown compatibility.

Replace angle brackets with HTML entities to ensure proper markdown rendering:

-  $ atmos terraform apply <component-name> -s <stack-name>
+  $ atmos terraform apply &lt;component-name&gt; -s &lt;stack-name&gt;
tests/snapshots/TestCLICommands_atmos_helmfile_apply_--help.stdout.golden (1)

3-3: 🛠️ Refactor suggestion

Escape HTML-like syntax in example usage

The <component> syntax in the example usage might need to be escaped for proper markdown rendering, as mentioned in the PR objectives.

Consider escaping the angle brackets:

-Example usage: atmos helmfile apply echo-server -s tenant1-ue2-dev atmos helmfile apply echo-server -s tenant1-ue2-dev --redirect-stderr /dev/stdout
+Example usage: atmos helmfile apply \<component\> -s tenant1-ue2-dev atmos helmfile apply \<component\> -s tenant1-ue2-dev --redirect-stderr /dev/stdout
tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden (1)

74-75: 🛠️ Refactor suggestion

Escape angle brackets in example usage for proper markdown rendering.

Based on the PR objectives to properly render flag descriptions in markdown, the angle brackets in the example usage should be escaped using HTML entities.

Apply this diff to properly escape the angle brackets:

- $ atmos terraform apply <component-name> -s <stack-name>
+ $ atmos terraform apply &lt;component-name&gt; -s &lt;stack-name&gt;
🧹 Nitpick comments (13)
tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden (2)

13-14: Remove excessive empty lines.

A single empty line is sufficient for section separation. Remove the duplicate empty lines to maintain consistent spacing throughout the help text.

Also applies to: 17-18, 28-29, 37-38, 45-46, 52-53, 60-61, 65-66


31-36: Enhance flag descriptions with markdown formatting.

Consider using markdown formatting to improve readability:

-        --append-user-agent string    Sets the TF_APPEND_USER_AGENT environment
-                                      variable to customize the User-Agent
-                                      string in Terraform provider requests.
-                                      Example: 'Atmos/test (Cloud Posse;
-                                      +https://atmos.tools)'. This flag works
-                                      with almost all commands.
+        --append-user-agent string    Sets the `TF_APPEND_USER_AGENT` environment
+                                      variable to customize the User-Agent
+                                      string in Terraform provider requests.
+                                      **Example:** `Atmos/test (Cloud Posse;
+                                      +https://atmos.tools)`. This flag works
+                                      with almost all commands.

Also applies to: 40-44, 48-51, 55-59

tests/snapshots/TestCLICommands_atmos_terraform_--help_alias_subcommand_check.stdout.golden (1)

64-69: LGTM! Added useful flags with clear descriptions.

The new flags enhance user control:

  • --append-user-agent: Allows customization of provider requests
  • --skip-init: Provides optimization by skipping unnecessary initialization

Consider adding examples for the --skip-init flag to match the documentation style of --append-user-agent.

Also applies to: 77-78

tests/snapshots/TestCLICommands_atmos_--help.stdout.golden (3)

41-45: Convert file paths to inline code format using backticks.

For better readability, file paths should be formatted as inline code using backticks.

-                                    descriptor, including '/dev/stdout',
-                                    '/dev/stderr' and '/dev/null' (default
-                                    "/dev/stderr")
+                                    descriptor, including `/dev/stdout`,
+                                    `/dev/stderr` and `/dev/null` (default
+                                    `/dev/stderr`)

49-52: Format log levels as inline code.

Log level options should be formatted as inline code using backticks.

-                                    Debug, Info, Warning, Off. If the log level
-                                    is set to Off, Atmos will not log any
+                                    `Debug`, `Info`, `Warning`, `Off`. If the log level
+                                    is set to `Off`, Atmos will not log any

56-60: Format command example and file paths as inline code.

Command examples and file paths should be formatted as inline code using backticks.

-                                    '/dev/null'): atmos <command>
-                                    --redirect-stderr /dev/stdout
+                                    `/dev/null`): `atmos <command>
+                                    --redirect-stderr /dev/stdout`
tests/snapshots/TestCLICommands_atmos_terraform_--help.stdout.golden (2)

59-64: Format environment variable and example as inline code.

Environment variables and examples should be formatted as inline code using backticks.

-                                      variable to customize the User-Agent
-                                      string in Terraform provider requests.
-                                      Example: 'Atmos/test (Cloud Posse;
-                                      +https://atmos.tools)'. This flag works
+                                      variable `TF_APPEND_USER_AGENT` to customize the User-Agent
+                                      string in Terraform provider requests.
+                                      Example: `Atmos/test (Cloud Posse;
+                                      +https://atmos.tools)`. This flag works

72-73: Format command as inline code.

Commands should be formatted as inline code using backticks.

-                                      Skip running 'terraform init' before
+                                      Skip running `terraform init` before
internal/tui/templates/help_printer.go (1)

124-126: Consider adding line spacing after rendered content.

The rendered content might benefit from consistent line spacing for better readability.

Consider adding a newline after the rendered content:

-    return renderer.Render(content)
+    rendered, err := renderer.Render(content)
+    if err != nil {
+        return "", err
+    }
+    return rendered + "\n", nil
pkg/ui/markdown/renderer.go (2)

57-76: Consider caching the renderer instance.

Creating a new renderer for each call to RenderWithoutWordWrap could be inefficient for repeated calls.

Consider caching the renderer:

+var cachedRenderer *glamour.TermRenderer
+var cachedRendererMutex sync.Mutex

 func (r *Renderer) RenderWithoutWordWrap(content string) (string, error) {
-    out, err := glamour.NewTermRenderer(
-        glamour.WithAutoStyle(),
-        glamour.WithWordWrap(0),
-        glamour.WithColorProfile(r.profile),
-        glamour.WithEmoji(),
-    )
+    cachedRendererMutex.Lock()
+    if cachedRenderer == nil {
+        var err error
+        cachedRenderer, err = glamour.NewTermRenderer(
+            glamour.WithAutoStyle(),
+            glamour.WithWordWrap(0),
+            glamour.WithColorProfile(r.profile),
+            glamour.WithEmoji(),
+        )
+        if err != nil {
+            cachedRendererMutex.Unlock()
+            return "", err
+        }
+    }
+    cachedRendererMutex.Unlock()

113-124: Consider reusing renderer options.

The renderer options are duplicated between RenderAsciiWithoutWordWrap and RenderWithoutWordWrap.

Consider extracting common options:

+func (r *Renderer) getCommonRendererOptions(wordWrap int) []glamour.TermRendererOption {
+    return []glamour.TermRendererOption{
+        glamour.WithWordWrap(wordWrap),
+        glamour.WithColorProfile(r.profile),
+        glamour.WithEmoji(),
+    }
+}
tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_help.stdout.golden (2)

56-58: Improve markdown link formatting in help text.

The Git reference documentation link should be properly formatted as a markdown link for better readability.

-                                     refs/heads/main. Refer to 10.3 Git
-                                     Internals Git
-                                     References https://git-scm.com/book/en/v2/Git-Internals-Git-References
+                                     refs/heads/main. Refer to [10.3 Git Internals - Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)

25-26: Consistent formatting for placeholder values.

The placeholder values in examples should be consistently formatted using HTML entities.

-                                     --components
-                                     <component1>,<component2>
+                                     --components &ltcomponent1&gt,&ltcomponent2&gt

-                                     --repo-path
-                                     <path_to_already_cloned_repo>
+                                     --repo-path &ltpath_to_already_cloned_repo&gt

Also applies to: 67-68

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 034e806 and d98ca6c.

📒 Files selected for processing (50)
  • cmd/atlantis_generate_repo_config.go (1 hunks)
  • cmd/aws_eks_update_kubeconfig.go (3 hunks)
  • cmd/cmd_utils.go (1 hunks)
  • cmd/describe.go (1 hunks)
  • cmd/describe_affected.go (1 hunks)
  • cmd/describe_component.go (1 hunks)
  • cmd/describe_dependents.go (1 hunks)
  • cmd/describe_stacks.go (1 hunks)
  • cmd/describe_workflows.go (1 hunks)
  • cmd/helmfile.go (1 hunks)
  • cmd/helmfile_generate_varfile.go (1 hunks)
  • cmd/list_components.go (1 hunks)
  • cmd/list_stacks.go (2 hunks)
  • cmd/list_workflows.go (1 hunks)
  • cmd/pro_lock.go (1 hunks)
  • cmd/root.go (1 hunks)
  • cmd/terraform.go (1 hunks)
  • cmd/terraform_generate_backend.go (2 hunks)
  • cmd/terraform_generate_backends.go (1 hunks)
  • cmd/terraform_generate_varfile.go (1 hunks)
  • cmd/terraform_generate_varfiles.go (1 hunks)
  • cmd/validate_component.go (2 hunks)
  • cmd/validate_stacks.go (1 hunks)
  • cmd/vendor_diff.go (1 hunks)
  • cmd/vendor_pull.go (1 hunks)
  • cmd/workflow.go (2 hunks)
  • internal/exec/help.go (1 hunks)
  • internal/exec/utils.go (1 hunks)
  • internal/tui/templates/help_printer.go (3 hunks)
  • pkg/ui/markdown/renderer.go (2 hunks)
  • tests/snapshots/TestCLICommands_atmos_--help.stdout.golden (1 hunks)
  • tests/snapshots/TestCLICommands_atmos_about_--help.stdout.golden (1 hunks)
  • tests/snapshots/TestCLICommands_atmos_atlantis_--help.stdout.golden (2 hunks)
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_--help.stdout.golden (2 hunks)
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_help.stdout.golden (2 hunks)
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_--help.stdout.golden (4 hunks)
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_help.stdout.golden (4 hunks)
  • tests/snapshots/TestCLICommands_atmos_atlantis_help.stdout.golden (2 hunks)
  • tests/snapshots/TestCLICommands_atmos_helmfile_--help.stdout.golden (2 hunks)
  • tests/snapshots/TestCLICommands_atmos_helmfile_apply_--help.stdout.golden (1 hunks)
  • tests/snapshots/TestCLICommands_atmos_helmfile_apply_help.stdout.golden (1 hunks)
  • tests/snapshots/TestCLICommands_atmos_helmfile_help.stdout.golden (2 hunks)
  • tests/snapshots/TestCLICommands_atmos_terraform_--help.stdout.golden (2 hunks)
  • tests/snapshots/TestCLICommands_atmos_terraform_--help_alias_subcommand_check.stdout.golden (2 hunks)
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden (2 hunks)
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden (2 hunks)
  • tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden (2 hunks)
  • tests/snapshots/TestCLICommands_atmos_validate_editorconfig_--help.stdout.golden (2 hunks)
  • tests/snapshots/TestCLICommands_atmos_validate_editorconfig_help.stdout.golden (2 hunks)
  • tests/test-cases/help-and-usage.yaml (31 hunks)
✅ Files skipped from review due to trivial changes (27)
  • cmd/describe.go
  • cmd/list_components.go
  • cmd/pro_lock.go
  • cmd/list_workflows.go
  • tests/snapshots/TestCLICommands_atmos_about_--help.stdout.golden
  • cmd/root.go
  • cmd/cmd_utils.go
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_helmfile_help.stdout.golden
  • cmd/atlantis_generate_repo_config.go
  • tests/snapshots/TestCLICommands_atmos_helmfile_--help.stdout.golden
  • cmd/validate_component.go
  • cmd/validate_stacks.go
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_--help.stdout.golden
  • cmd/list_stacks.go
  • cmd/workflow.go
  • cmd/terraform_generate_backend.go
  • internal/exec/utils.go
  • cmd/terraform.go
  • cmd/terraform_generate_backends.go
  • internal/exec/help.go
  • cmd/terraform_generate_varfile.go
  • cmd/terraform_generate_varfiles.go
  • tests/test-cases/help-and-usage.yaml
  • cmd/describe_dependents.go
  • cmd/vendor_diff.go
  • cmd/describe_component.go
🧰 Additional context used
🧠 Learnings (10)
📓 Common learnings
Learnt from: samtholiya
PR: cloudposse/atmos#955
File: tests/snapshots/TestCLICommands_atmos_validate_editorconfig_--help.stdout.golden:0-0
Timestamp: 2025-01-19T15:49:15.593Z
Learning: In future commits, the help text for Atmos CLI commands should be limited to only show component and stack parameters for commands that actually use them. This applies to the example usage section in command help text.
cmd/helmfile_generate_varfile.go (1)
Learnt from: Listener430
PR: cloudposse/atmos#825
File: internal/exec/helmfile_generate_varfile.go:28-31
Timestamp: 2024-12-07T16:16:13.038Z
Learning: In `internal/exec/helmfile_generate_varfile.go`, the `--help` command (`./atmos helmfile generate varfile --help`) works correctly without requiring stack configurations, and the only change needed was to make `ProcessCommandLineArgs` exportable by capitalizing its name.
tests/snapshots/TestCLICommands_atmos_helmfile_apply_--help.stdout.golden (1)
Learnt from: samtholiya
PR: cloudposse/atmos#955
File: tests/snapshots/TestCLICommands_atmos_validate_editorconfig_--help.stdout.golden:0-0
Timestamp: 2025-01-19T15:49:15.593Z
Learning: In future commits, the help text for Atmos CLI commands should be limited to only show component and stack parameters for commands that actually use them. This applies to the example usage section in command help text.
tests/snapshots/TestCLICommands_atmos_atlantis_generate_--help.stdout.golden (1)
Learnt from: samtholiya
PR: cloudposse/atmos#955
File: tests/snapshots/TestCLICommands_atmos_validate_editorconfig_--help.stdout.golden:0-0
Timestamp: 2025-01-19T15:49:15.593Z
Learning: In future commits, the help text for Atmos CLI commands should be limited to only show component and stack parameters for commands that actually use them. This applies to the example usage section in command help text.
tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_help.stdout.golden (1)
Learnt from: samtholiya
PR: cloudposse/atmos#955
File: tests/snapshots/TestCLICommands_atmos_validate_editorconfig_--help.stdout.golden:0-0
Timestamp: 2025-01-19T15:49:15.593Z
Learning: In future commits, the help text for Atmos CLI commands should be limited to only show component and stack parameters for commands that actually use them. This applies to the example usage section in command help text.
tests/snapshots/TestCLICommands_atmos_--help.stdout.golden (1)
Learnt from: samtholiya
PR: cloudposse/atmos#955
File: tests/snapshots/TestCLICommands_atmos_validate_editorconfig_--help.stdout.golden:0-0
Timestamp: 2025-01-19T15:49:15.593Z
Learning: In future commits, the help text for Atmos CLI commands should be limited to only show component and stack parameters for commands that actually use them. This applies to the example usage section in command help text.
tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden (1)
Learnt from: samtholiya
PR: cloudposse/atmos#955
File: tests/snapshots/TestCLICommands_atmos_validate_editorconfig_--help.stdout.golden:0-0
Timestamp: 2025-01-19T15:49:15.593Z
Learning: In future commits, the help text for Atmos CLI commands should be limited to only show component and stack parameters for commands that actually use them. This applies to the example usage section in command help text.
tests/snapshots/TestCLICommands_atmos_terraform_--help.stdout.golden (1)
Learnt from: samtholiya
PR: cloudposse/atmos#955
File: tests/snapshots/TestCLICommands_atmos_validate_editorconfig_--help.stdout.golden:0-0
Timestamp: 2025-01-19T15:49:15.593Z
Learning: In future commits, the help text for Atmos CLI commands should be limited to only show component and stack parameters for commands that actually use them. This applies to the example usage section in command help text.
tests/snapshots/TestCLICommands_atmos_validate_editorconfig_help.stdout.golden (1)
Learnt from: samtholiya
PR: cloudposse/atmos#955
File: tests/snapshots/TestCLICommands_atmos_validate_editorconfig_--help.stdout.golden:0-0
Timestamp: 2025-01-19T15:49:15.593Z
Learning: In future commits, the help text for Atmos CLI commands should be limited to only show component and stack parameters for commands that actually use them. This applies to the example usage section in command help text.
tests/snapshots/TestCLICommands_atmos_validate_editorconfig_--help.stdout.golden (1)
Learnt from: samtholiya
PR: cloudposse/atmos#955
File: tests/snapshots/TestCLICommands_atmos_validate_editorconfig_--help.stdout.golden:0-0
Timestamp: 2025-01-19T15:49:15.593Z
Learning: In future commits, the help text for Atmos CLI commands should be limited to only show component and stack parameters for commands that actually use them. This applies to the example usage section in command help text.
🪛 golangci-lint (1.62.2)
cmd/vendor_pull.go

31-31: Error return value of vendorPullCmd.RegisterFlagCompletionFunc is not checked

(errcheck)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Summary
🔇 Additional comments (25)
tests/snapshots/TestCLICommands_atmos_validate_editorconfig_help.stdout.golden (2)

12-13: LGTM! The empty lines improve readability.

The added empty lines create better visual separation between flag descriptions, making the help text more readable.

Also applies to: 17-18, 22-23, 27-28, 32-33, 37-38, 42-43, 47-48, 52-53, 57-58, 62-63, 67-68, 72-73, 77-78, 91-92, 98-99


1-108: LGTM! The help text structure is well-organized.

The help text follows a clear structure with:

  • Command description
  • Usage example
  • Flags section with well-formatted descriptions
  • Global flags section with comprehensive logging configuration

The content is appropriately scoped for the editorconfig validation command, aligning with the previous learning about showing only relevant parameters.

tests/snapshots/TestCLICommands_atmos_atlantis_help.stdout.golden (2)

18-19: Well done on the formatting improvements!

The added blank lines enhance readability and create better visual separation between sections, which aligns with the PR's markdown rendering objectives.

Also applies to: 31-32, 38-39


26-46: Excellent documentation of global flags!

The global flags section is well-structured with:

  • Clear descriptions of each flag's purpose
  • Proper formatting and consistent style
  • Practical examples for the redirect-stderr flag
  • No unnecessary component/stack parameters (aligns with previous feedback)
tests/snapshots/TestCLICommands_atmos_validate_editorconfig_--help.stdout.golden (2)

12-13: LGTM! The added spacing improves readability.

The extra newlines between flag descriptions make the help text more visually appealing and easier to scan.

Also applies to: 17-18, 22-23, 27-28, 32-33, 37-38, 42-43, 47-48, 52-53, 57-58, 62-63, 67-68, 72-73, 77-78, 91-92, 98-99


1-111: LGTM! Help text aligns with previous feedback.

The command's help text correctly focuses on editorconfig-specific flags without including irrelevant component or stack parameters, as suggested in the retrieved learning.

tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden (2)

56-57: LGTM! Improved readability with consistent spacing.

The added empty lines create better visual separation between different sections of the help text.

Also applies to: 65-66, 69-70, 74-75, 88-89, 95-96


105-108: LGTM! Example usage is clear and relevant.

The example usage correctly demonstrates the required component and stack parameters, which are essential for this command.

tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden (1)

72-75: Example usage looks good!

The example correctly demonstrates the use of component and stack parameters, which are relevant for the terraform apply command.

tests/snapshots/TestCLICommands_atmos_terraform_--help_alias_subcommand_check.stdout.golden (4)

61-62: LGTM! Improved readability with consistent spacing.

The added blank lines create clear visual separation between sections, making the help text more readable.

Also applies to: 70-71, 74-75, 79-80


52-53: LGTM! Added helpful aliases for common commands.

The new aliases ta and tp provide convenient shortcuts for frequently used terraform commands (apply and plan), improving developer productivity.


88-108: LGTM! Added comprehensive logging controls.

The new global flags provide excellent logging control:

  • --logs-file: Flexible log output destination with support for standard file descriptors
  • --logs-level: Various logging levels with clear defaults
  • --redirect-stderr: Error redirection capabilities

112-113: Verify example's applicability.

Based on previous feedback, ensure that component and stack parameters are only shown in examples for commands that actually use them.

Please confirm that all subcommands under atmos terraform require both component and stack parameters.

tests/snapshots/TestCLICommands_atmos_atlantis_--help.stdout.golden (1)

18-46: Well-structured help text with clear flag descriptions!

The formatting and organization of the help text is clean and consistent. The new logging flags are well-documented with clear descriptions and examples.

tests/snapshots/TestCLICommands_atmos_atlantis_generate_--help.stdout.golden (1)

20-25: Clean and consistent flag description formatting!

The removal of unnecessary quotes and hyphens improves markdown rendering while maintaining clarity.

tests/snapshots/TestCLICommands_atmos_helmfile_apply_help.stdout.golden (1)

1-53: Identical to previous file

This file is identical to TestCLICommands_atmos_helmfile_apply_--help.stdout.golden.

tests/snapshots/TestCLICommands_atmos_terraform_--help.stdout.golden (1)

83-87: Format global flags consistently with main command.

Apply the same markdown formatting to global flags as suggested for the main command.

Also applies to: 91-94, 98-102

cmd/helmfile.go (1)

22-22: LGTM! Improved markdown rendering.

The HTML entity encoding ensures proper rendering of angle brackets in the help text.

cmd/describe_workflows.go (1)

33-34: LGTM! Enhanced help text formatting.

The changes improve markdown rendering and maintain consistency:

  • HTML entities for angle brackets
  • Backticks for default values
cmd/helmfile_generate_varfile.go (1)

31-33: LGTM! Consistent help text formatting.

The changes improve markdown rendering while maintaining the command's functionality.

cmd/describe_stacks.go (1)

33-40: LGTM! Comprehensive help text improvements.

The changes enhance markdown rendering across multiple flags:

  • HTML entities for angle brackets
  • Backticks for code-like elements
  • Consistent formatting with other commands
cmd/aws_eks_update_kubeconfig.go (2)

13-13: LGTM! Help text formatting improvements look good.

The changes consistently replace angle brackets with HTML entities and add backticks for code terms, improving markdown rendering.

Also applies to: 18-18, 27-27, 30-30


47-54: LGTM! Flag descriptions are properly formatted.

The flag descriptions now use HTML entities for placeholders, ensuring proper markdown rendering.

cmd/describe_affected.go (1)

31-44: LGTM! Help text formatting is consistent and clear.

The changes improve readability by:

  • Using HTML entities for placeholders
  • Converting links to markdown format
  • Adding backticks around code terms
cmd/vendor_pull.go (1)

30-30: LGTM! HTML entities are consistently used in flag descriptions.

The help text for all flags consistently uses HTML entities (&ltcomponent&gt) for placeholder values, which will render correctly in markdown.

Also applies to: 32-32, 34-34, 35-35

Comment thread tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden
Comment thread internal/tui/templates/help_printer.go
Comment thread cmd/vendor_pull.go
Comment thread tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden Outdated
Comment thread cmd/atlantis_generate_repo_config.go Outdated
Comment thread cmd/atlantis_generate_repo_config.go Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
internal/tui/templates/help_printer.go (1)

75-78: ⚠️ Potential issue

Add error logging for renderer initialization.

The early return on renderer creation error silently fails without logging the error. This could make debugging difficult.

Add error logging before the return:

 if err != nil {
+    log.Printf("Error creating markdown renderer: %v", err)
     return
 }
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between d98ca6c and 3f22358.

📒 Files selected for processing (13)
  • cmd/terraform_commands.go (1 hunks)
  • internal/tui/templates/help_printer.go (3 hunks)
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_--help.stdout.golden (1 hunks)
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_help.stdout.golden (1 hunks)
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_--help.stdout.golden (3 hunks)
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_help.stdout.golden (3 hunks)
  • tests/snapshots/TestCLICommands_atmos_helmfile_--help.stdout.golden (1 hunks)
  • tests/snapshots/TestCLICommands_atmos_helmfile_help.stdout.golden (1 hunks)
  • tests/snapshots/TestCLICommands_atmos_terraform_--help.stdout.golden (1 hunks)
  • tests/snapshots/TestCLICommands_atmos_terraform_--help_alias_subcommand_check.stdout.golden (1 hunks)
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden (2 hunks)
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden (2 hunks)
  • tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden (1 hunks)
✅ Files skipped from review due to trivial changes (3)
  • tests/snapshots/TestCLICommands_atmos_terraform_--help_alias_subcommand_check.stdout.golden
  • cmd/terraform_commands.go
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden
🚧 Files skipped from review as they are similar to previous changes (9)
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_helmfile_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_helmfile_help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_terraform_--help.stdout.golden
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Build (windows-latest, windows)
  • GitHub Check: Summary
🔇 Additional comments (1)
internal/tui/templates/help_printer.go (1)

8-9: LGTM! Strong imports for markdown rendering.

The new imports provide the necessary functionality for markdown rendering of flag descriptions.

Comment thread internal/tui/templates/help_printer.go

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3f22358 and a67e7f0.

📒 Files selected for processing (20)
  • cmd/root.go (1 hunks)
  • tests/snapshots/TestCLICommands_atmos_--help.stdout.golden (1 hunks)
  • tests/snapshots/TestCLICommands_atmos_about_--help.stdout.golden (1 hunks)
  • tests/snapshots/TestCLICommands_atmos_atlantis_--help.stdout.golden (1 hunks)
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_--help.stdout.golden (2 hunks)
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_help.stdout.golden (2 hunks)
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_--help.stdout.golden (3 hunks)
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_help.stdout.golden (3 hunks)
  • tests/snapshots/TestCLICommands_atmos_atlantis_help.stdout.golden (1 hunks)
  • tests/snapshots/TestCLICommands_atmos_helmfile_--help.stdout.golden (1 hunks)
  • tests/snapshots/TestCLICommands_atmos_helmfile_apply_--help.stdout.golden (1 hunks)
  • tests/snapshots/TestCLICommands_atmos_helmfile_apply_help.stdout.golden (1 hunks)
  • tests/snapshots/TestCLICommands_atmos_helmfile_help.stdout.golden (1 hunks)
  • tests/snapshots/TestCLICommands_atmos_terraform_--help.stdout.golden (2 hunks)
  • tests/snapshots/TestCLICommands_atmos_terraform_--help_alias_subcommand_check.stdout.golden (2 hunks)
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden (1 hunks)
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden (1 hunks)
  • tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden (2 hunks)
  • tests/snapshots/TestCLICommands_atmos_validate_editorconfig_--help.stdout.golden (1 hunks)
  • tests/snapshots/TestCLICommands_atmos_validate_editorconfig_help.stdout.golden (1 hunks)
✅ Files skipped from review due to trivial changes (6)
  • tests/snapshots/TestCLICommands_atmos_atlantis_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_atlantis_help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_validate_editorconfig_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_helmfile_apply_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_helmfile_apply_help.stdout.golden
🚧 Files skipped from review as they are similar to previous changes (12)
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_helmfile_help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_helmfile_--help.stdout.golden
  • cmd/root.go
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_terraform_--help_alias_subcommand_check.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_terraform_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_atlantis_generate_repo-config_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden
🧰 Additional context used
🧠 Learnings (2)
tests/snapshots/TestCLICommands_atmos_about_--help.stdout.golden (2)
Learnt from: samtholiya
PR: cloudposse/atmos#955
File: tests/snapshots/TestCLICommands_atmos_validate_editorconfig_--help.stdout.golden:0-0
Timestamp: 2025-01-19T15:49:15.593Z
Learning: In future commits, the help text for Atmos CLI commands should be limited to only show component and stack parameters for commands that actually use them. This applies to the example usage section in command help text.
Learnt from: samtholiya
PR: cloudposse/atmos#1068
File: tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden:59-64
Timestamp: 2025-02-18T13:13:11.497Z
Learning: For Atmos CLI help text, angle brackets in command examples and flag descriptions should be escaped using HTML entities (e.g., `&lt;component&gt;`) rather than converted to backticks or other markdown formatting.
tests/snapshots/TestCLICommands_atmos_validate_editorconfig_help.stdout.golden (2)
Learnt from: samtholiya
PR: cloudposse/atmos#955
File: tests/snapshots/TestCLICommands_atmos_validate_editorconfig_--help.stdout.golden:0-0
Timestamp: 2025-01-19T15:49:15.593Z
Learning: In future commits, the help text for Atmos CLI commands should be limited to only show component and stack parameters for commands that actually use them. This applies to the example usage section in command help text.
Learnt from: samtholiya
PR: cloudposse/atmos#1068
File: tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden:59-64
Timestamp: 2025-02-18T13:13:11.497Z
Learning: For Atmos CLI help text, angle brackets in command examples and flag descriptions should be escaped using HTML entities (e.g., `&lt;component&gt;`) rather than converted to backticks or other markdown formatting.
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Build (windows-latest, windows)
  • GitHub Check: Analyze (go)
  • GitHub Check: Summary
🔇 Additional comments (3)
tests/snapshots/TestCLICommands_atmos_validate_editorconfig_help.stdout.golden (2)

60-61: LGTM! Improved readability of file descriptors.

The removal of single quotes around file descriptors makes the help text cleaner and more readable.


69-69: LGTM! Consistent formatting of file descriptors.

The changes maintain consistency with the formatting style used in other flag descriptions.

Also applies to: 72-72

tests/snapshots/TestCLICommands_atmos_about_--help.stdout.golden (1)

18-19: LGTM! Clean and consistent file descriptor formatting.

The removal of single quotes around file descriptors makes the help text cleaner and more consistent.

Comment thread tests/snapshots/TestCLICommands_atmos_about_--help.stdout.golden Outdated
@samtholiya
Sam Tholiya (samtholiya) force-pushed the feature/dev-3053-flags-description-would-be-rendered-with-markdown branch from a67e7f0 to f7c253c Compare February 19, 2025 05:43
coderabbitai[bot]
coderabbitai Bot previously approved these changes Feb 19, 2025
@mergify mergify Bot removed the triage Needs triage label Feb 19, 2025
Comment thread cmd/describe_stacks.go Outdated
Comment thread cmd/list_components.go Outdated
@mergify mergify Bot added the conflict This PR has conflicts label Feb 26, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 (29)
cmd/markdown/atmos_helmfile_generate_varfile_usage.md (1)

1-2: Clear and Concise Flag Description

The description clearly explains the functionality: generating a variables file for a Helmfile component within a given stack. As a minor nitpick, consider whether using an em dash for enumerations adds value, though the hyphen is totally acceptable in Markdown list formatting.

🧰 Tools
🪛 LanguageTool

[typographical] ~1-~1: Consider using an em dash in dialogues and enumerations.
Context: - Generate a variables file for the speci...

(DASH_RULE)

cmd/markdown/atmos_list_workflows_usage.md (6)

1-2: Typographical Suggestion for Bullet List Item
The bullet point "- List workflows" is clear, but consider using an en dash or em dash for a polished typographical style if desired.

🧰 Tools
🪛 LanguageTool

[typographical] ~1-~1: Consider using an em dash in dialogues and enumerations.
Context: - List workflows ``` $ atmos list workf...

(DASH_RULE)


4-5: Enhance Code Block Readability
The example command is accurate. For improved syntax highlighting in various editors, consider specifying a language (e.g., shell) for the code block.


10-11: Improve Example Command Formatting
The command $ atmos list workflows -f <file> is correctly shown. Adding a language hint (e.g., shell) to the code fence could further enhance its clarity.


13-14: Refinement of Output Format Description
The bullet "- Output format (table, json, csv)" is informative. For even greater clarity, consider standardizing the punctuation or listing the formats inline (e.g., “table, json, csv”) consistently.


16-17: JSON Output Command Example Clarity
The command example for JSON output is accurate. Similar to earlier suggestions, specifying a language for the fenced code block (e.g., shell) is recommended for consistency.


22-23: Accurate CSV Command Example
The CSV command example is correctly formatted and free from the previously noted extraneous quote. For consistency with other code blocks, consider adding a shell language indicator.

cmd/markdown/atmos_list_components_usage.md (4)

1-2: Clarify the section title with a header.

The bullet list item “- List components” clearly indicates the functionality, but consider using a markdown header (for example, # List components) to improve clarity and consistency across documentation files.

🧰 Tools
🪛 LanguageTool

[typographical] ~1-~1: Consider using an em dash in dialogues and enumerations.
Context: - List components ``` $ atmos list comp...

(DASH_RULE)


3-5: Enhance code block clarity with language specification.

The command example is well presented; however, adding a language identifier (e.g., ```shell) at the start of the code block could improve syntax highlighting and readability.


7-8: Expand on the filtering description.

“List components filter by stack” is succinct but could benefit from a brief explanatory note on when to use the stack filter. This additional context would enhance user understanding.


9-11: Apply language hints to the second code block.

Similar to the first code block, consider specifying the language (e.g., ```shell) to assist with syntax highlighting for the command example "atmos list components -s ".

cmd/markdown/atmos_workflow_usage.md (8)

1-2: Bullet Point Style Improvement

Consider replacing the en dash with a standard markdown list marker (e.g. -) for consistency and improved rendering across various markdown processors.

-– Use interactive UI
+ - Use interactive UI
🧰 Tools
🪛 LanguageTool

[typographical] ~1-~1: Consider using an em dash in dialogues and enumerations.
Context: – Use interactive UI ``` $ atmos workfl...

(DASH_RULE)


3-5: Specify Language for Fenced Code Block

Add a language identifier (e.g. bash) to the fenced code block to enable syntax highlighting and comply with markdownlint guidelines.

-```
+```bash
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

3-3: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


4-4: Dollar signs used before commands without showing output
null

(MD014, commands-show-output)


7-8: Bullet Point Formatting Consistency

For the bullet describing the workflow execution, please use a hyphen (-) instead of an en dash.

-– Execute a workflow
+ - Execute a workflow

9-11: Annotate Fenced Code Block with Language

Include a language annotation (for example, bash) in this fenced code block to improve readability and provide proper syntax highlighting.

-```
+```bash
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

9-9: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


10-10: Dollar signs used before commands without showing output
null

(MD014, commands-show-output)


13-14: Standardize Bullet List Marker

Replace the en dash with a hyphen (-) for the "Execute with stack override" bullet point to keep the list style consistent.

-– Execute with stack override
+ - Execute with stack override

15-17: Enhance Code Block Formatting

Specify a language (e.g., bash) for this fenced code block to adhere to markdown conventions and enable syntax highlighting.

-```
+```bash
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

15-15: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


16-16: Dollar signs used before commands without showing output
null

(MD014, commands-show-output)


19-20: Improve Bullet List Consistency

Standardize the bullet marker by using a hyphen (-) instead of an en dash for the "Resume from specific step" item.

-– Resume from specific step
+ - Resume from specific step

21-23: Enhance Code Block Annotation

Add a language specifier (such as bash) in this fenced code block to facilitate syntax highlighting and meet markdown best practices.

-```
+```bash
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

21-21: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


22-22: Dollar signs used before commands without showing output
null

(MD014, commands-show-output)

cmd/markdown/atmos_atlantis_generate_repo_config_usage.md (3)

1-3: Bullet Formatting Enhancement:
The introductory bullet text is clear; however, consider using an em dash (—) instead of a regular hyphen if that aligns with your style guide for improved typographic presentation.

🧰 Tools
🪛 LanguageTool

[typographical] ~1-~1: Consider using an em dash in dialogues and enumerations.
Context: - Generate Atlantis projects for the spec...

(DASH_RULE)


21-25: Grammar Improvement Suggested:
The bullet "Use to clone target" reads a bit awkwardly. Consider revising it to "Used to clone target" or even "For cloning the target repository" for better clarity and grammatical correctness.

🧰 Tools
🪛 LanguageTool

[grammar] ~21-~21: Did you mean to write ‘used to’?
Context: ...rate repo-config --affected-only - Use to clone target $ atmos atlantis ...

(USE_TO_NP)


45-49: Minor Formatting Note on Verbose Command:
The verbose output example is well-presented; however, there is a minor extra space between the "$" and "atmos". Removing the extra space will ensure cleaner formatting.

cmd/markdown/atmos_describe_config_usage.md (2)

1-1: Typographic Consistency: Consider Using an En‐Dash for Enumerations
Instead of a plain hyphen, consider using an en‐dash (–) in list items for improved typographic quality.

🧰 Tools
🪛 LanguageTool

[typographical] ~1-~1: Consider using an em dash in dialogues and enumerations.
Context: - Get config in desired format ``` $ at...

(DASH_RULE)


3-5: Enhance Code Block Readability: Specify the Shell Language
To improve syntax highlighting and readability, change the fenced code block delimiters from “” to “shell”. For example:

-```
+```shell
cmd/markdown/atmos_describe_component_usage.md (2)

3-29: Enhance Code Block Readability: Specify the Shell Language
Adding a language identifier (such as "shell") to fenced code blocks will enhance readability by enabling proper syntax highlighting. Please update all occurrences of “” that wrap command examples to “shell”. For instance:

-```
+```shell
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

3-3: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


4-4: Dollar signs used before commands without showing output
null

(MD014, commands-show-output)


9-9: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


10-10: Dollar signs used before commands without showing output
null

(MD014, commands-show-output)


15-15: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


16-16: Dollar signs used before commands without showing output
null

(MD014, commands-show-output)


21-21: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


22-22: Dollar signs used before commands without showing output
null

(MD014, commands-show-output)


27-27: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


28-28: Dollar signs used before commands without showing output
null

(MD014, commands-show-output)


4-29: Style Note: Evaluate the Use of a Leading "$" in Command Examples
The "$" prefix is traditionally used to denote a shell prompt. Verify that its inclusion is intentional and that it doesn’t inadvertently suggest command output. If not required, you might consider removing it for clarity.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

4-4: Dollar signs used before commands without showing output
null

(MD014, commands-show-output)


9-9: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


10-10: Dollar signs used before commands without showing output
null

(MD014, commands-show-output)


15-15: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


16-16: Dollar signs used before commands without showing output
null

(MD014, commands-show-output)


21-21: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


22-22: Dollar signs used before commands without showing output
null

(MD014, commands-show-output)


27-27: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


28-28: Dollar signs used before commands without showing output
null

(MD014, commands-show-output)

cmd/markdown/atmos_describe_affected_usage.md (3)

1-1: Typographic Consistency: Consider Using an En‐Dash for Enumerations
For a consistent and polished appearance, consider replacing the hyphen in the introductory list item with an en‐dash (–).

🧰 Tools
🪛 LanguageTool

[typographical] ~1-~1: Consider using an em dash in dialogues and enumerations.
Context: - Specify Filesystem path to the already ...

(DASH_RULE)


3-95: Enhance Code Block Readability: Specify the Shell Language
Across the document, adding a language identifier (like "shell") to fenced code blocks will improve syntax highlighting and the overall clarity of command examples. Please update each fenced block accordingly. For example:

-```
+```shell

4-95: Style Note: Assess the Use of Leading "$" in Command Examples
The convention of prefixing commands with "$" denotes a shell prompt. Review whether its inclusion is necessary to avoid any potential confusion about expected output; remove it if it does not serve the intended purpose.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between fa6ae14 and 2cd465c.

📒 Files selected for processing (8)
  • cmd/markdown/atmos_atlantis_generate_repo_config_usage.md (1 hunks)
  • cmd/markdown/atmos_describe_affected_usage.md (1 hunks)
  • cmd/markdown/atmos_describe_component_usage.md (1 hunks)
  • cmd/markdown/atmos_describe_config_usage.md (1 hunks)
  • cmd/markdown/atmos_helmfile_generate_varfile_usage.md (1 hunks)
  • cmd/markdown/atmos_list_components_usage.md (1 hunks)
  • cmd/markdown/atmos_list_workflows_usage.md (1 hunks)
  • cmd/markdown/atmos_workflow_usage.md (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: samtholiya
PR: cloudposse/atmos#955
File: tests/snapshots/TestCLICommands_atmos_validate_editorconfig_--help.stdout.golden:0-0
Timestamp: 2025-01-19T15:49:15.593Z
Learning: In future commits, the help text for Atmos CLI commands should be limited to only show component and stack parameters for commands that actually use them. This applies to the example usage section in command help text.
🪛 LanguageTool
cmd/markdown/atmos_workflow_usage.md

[typographical] ~6-~6: Consider using an em dash in dialogues and enumerations.
Context: ...eractive UI $ atmos workflow – Execute a workflow ``` $ atmos workfl...

(DASH_RULE)


[typographical] ~12-~12: Consider using an em dash in dialogues and enumerations.
Context: ...flow --file – Execute with stack override $ atm...

(DASH_RULE)


[typographical] ~18-~18: Consider using an em dash in dialogues and enumerations.
Context: ...ame> --file --stack – Resume from specific step $ atmos...

(DASH_RULE)

cmd/markdown/atmos_atlantis_generate_repo_config_usage.md

[typographical] ~1-~1: Consider using an em dash in dialogues and enumerations.
Context: - Generate Atlantis projects for the spec...

(DASH_RULE)


[grammar] ~21-~21: Did you mean to write ‘used to’?
Context: ...rate repo-config --affected-only - Use to clone target $ atmos atlantis ...

(USE_TO_NP)

cmd/markdown/atmos_describe_affected_usage.md

[typographical] ~1-~1: Consider using an em dash in dialogues and enumerations.
Context: - Specify Filesystem path to the already ...

(DASH_RULE)

cmd/markdown/atmos_describe_component_usage.md

[typographical] ~1-~1: Consider using an em dash in dialogues and enumerations.
Context: - The output format ``` $ atmos describ...

(DASH_RULE)

cmd/markdown/atmos_describe_config_usage.md

[typographical] ~1-~1: Consider using an em dash in dialogues and enumerations.
Context: - Get config in desired format ``` $ at...

(DASH_RULE)

cmd/markdown/atmos_helmfile_generate_varfile_usage.md

[typographical] ~1-~1: Consider using an em dash in dialogues and enumerations.
Context: - Generate a variables file for the speci...

(DASH_RULE)

cmd/markdown/atmos_list_components_usage.md

[typographical] ~1-~1: Consider using an em dash in dialogues and enumerations.
Context: - List components ``` $ atmos list comp...

(DASH_RULE)

cmd/markdown/atmos_list_workflows_usage.md

[typographical] ~1-~1: Consider using an em dash in dialogues and enumerations.
Context: - List workflows ``` $ atmos list workf...

(DASH_RULE)

🪛 markdownlint-cli2 (0.17.2)
cmd/markdown/atmos_workflow_usage.md

3-3: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


4-4: Dollar signs used before commands without showing output
null

(MD014, commands-show-output)


9-9: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


10-10: Dollar signs used before commands without showing output
null

(MD014, commands-show-output)


15-15: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


16-16: Dollar signs used before commands without showing output
null

(MD014, commands-show-output)

cmd/markdown/atmos_describe_component_usage.md

3-3: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


4-4: Dollar signs used before commands without showing output
null

(MD014, commands-show-output)


9-9: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


10-10: Dollar signs used before commands without showing output
null

(MD014, commands-show-output)


15-15: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


16-16: Dollar signs used before commands without showing output
null

(MD014, commands-show-output)


21-21: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


22-22: Dollar signs used before commands without showing output
null

(MD014, commands-show-output)


27-27: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


28-28: Dollar signs used before commands without showing output
null

(MD014, commands-show-output)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Summary
🔇 Additional comments (12)
cmd/markdown/atmos_helmfile_generate_varfile_usage.md (1)

4-5: Well-Formatted Command Usage Example

The command usage example is presented in a dedicated code block and adheres to the expected syntax. This formatting aligns well with the PR objective of rendering flag descriptions in Markdown and helps maintain consistency with other examples.

cmd/markdown/atmos_list_workflows_usage.md (3)

7-8: Clear Description for Filtering Workflows
The description "- Filter workflows by file" is concise and effectively communicates its purpose.


19-20: CSV Delimiter Description
The bullet point "- Delimiter for csv output" clearly informs the user about CSV delimiter customization. No changes necessary here.


1-24: Overall Documentation Quality
The new atmos_list_workflows_usage.md file offers clear, markdown-formatted usage examples for the atmos list workflows command, including options for filtering, output formatting, and CSV delimiter specification. This implementation aligns well with the PR objectives of improving flag description readability via markdown. Great job!

🧰 Tools
🪛 LanguageTool

[typographical] ~1-~1: Consider using an em dash in dialogues and enumerations.
Context: - List workflows ``` $ atmos list workf...

(DASH_RULE)

cmd/markdown/atmos_atlantis_generate_repo_config_usage.md (8)

4-8: Clear and Comprehensive Stack Examples:
The command examples for generating Atlantis projects for stacks are well-documented. They clearly illustrate multiple usage scenarios with comma-separated values.


10-14: Consistent Components Example:
The example for generating projects based on specified components mirrors the style used in the stacks examples. This consistency aids readability and user understanding.


15-19: Clear Affected-Only Example:
The example demonstrating the use of the --affected-only flag is straightforward and effectively conveys its purpose.


27-31: Good Clarity on Repo Path:
The description and example for specifying the filesystem path to an already cloned target repository are clear and concise.


33-37: Clear Git Reference Example:
The example for using the --ref flag to compare branches via a Git reference is both neat and informative.


39-43: SHA Example is Clear:
The command example demonstrating the use of the --sha flag is explicit and the inclusion of a sample SHA helps illustrate its usage effectively.


51-55: SSH Key Example is Clear:
The instructions and example for specifying the PEM-encoded private key for cloning private repositories via SSH are clear and easy to follow.


57-61: Detailed Encryption Password Example:
The command example for providing an encryption password for a PEM-encoded private key is detailed and consistent with the rest of the documentation.

@mergify mergify Bot removed the conflict This PR has conflicts label Feb 26, 2025
coderabbitai[bot]
coderabbitai Bot previously approved these changes Feb 27, 2025
Comment thread cmd/aws_eks_update_kubeconfig.go Outdated
Comment thread cmd/aws_eks_update_kubeconfig.go Outdated
Comment thread cmd/describe_stacks.go Outdated
@mergify

mergify Bot commented Feb 28, 2025

Copy link
Copy Markdown
Contributor

Warning

This PR exceeds the recommended limit of 1,000 lines.

Large PRs are difficult to review and may be rejected due to their size.

Please verify that this PR does not address multiple issues.
Consider refactoring it into smaller, more focused PRs to facilitate a smoother review process.

Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <erik@cloudposse.com>
Sam Tholiya (samtholiya) and others added 3 commits March 1, 2025 12:55
Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <erik@cloudposse.com>
Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <erik@cloudposse.com>

@aknysh Andriy Knysh (aknysh) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aknysh
Andriy Knysh (aknysh) merged commit 9586061 into main Mar 1, 2025
@aknysh
Andriy Knysh (aknysh) deleted the feature/dev-3053-flags-description-would-be-rendered-with-markdown branch March 1, 2025 18:48
@github-actions

github-actions Bot commented Mar 1, 2025

Copy link
Copy Markdown

These changes were released in v1.165.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor New features that do not break anything

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants