diff --git a/tasks/website/src/linter/cli.rs b/tasks/website/src/linter/cli.rs index 1a25299a0d481..95b560e9da33e 100644 --- a/tasks/website/src/linter/cli.rs +++ b/tasks/website/src/linter/cli.rs @@ -29,7 +29,7 @@ fn generate_cli() -> String { // Hack usage line let markdown = markdown.replacen("**Usage**:", "## Usage\n", 1); - markdown + let markdown = markdown .split('\n') .flat_map(|line| { // Hack the bug on the line containing `###` @@ -50,5 +50,12 @@ fn generate_cli() -> String { } }) .collect::>() - .join("\n") + .join("\n"); + + // Add note about .gitignore only being respected inside Git repositories + // This note should appear after the ignore options and before "Handle Warnings" + markdown.replace( + "\n\n## Handle Warnings\n", + "\n\n> [!NOTE]\n> `.gitignore` is only respected inside a Git repository.\n\n## Handle Warnings\n" + ) } diff --git a/tasks/website/src/linter/snapshots/cli.snap b/tasks/website/src/linter/snapshots/cli.snap index 42d6618136455..c536c2eac821e 100644 --- a/tasks/website/src/linter/snapshots/cli.snap +++ b/tasks/website/src/linter/snapshots/cli.snap @@ -101,6 +101,9 @@ Arguments: +> [!NOTE] +> `.gitignore` is only respected inside a Git repository. + ## Handle Warnings - **` --quiet`** — Disable reporting on warnings, only errors are reported