Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions docs/.style/styles/Coder/BrandNames.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Coder.BrandNames - enforce canonical brand-name casing in prose.

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.

P3 [CRF-6] The PR description's verification section says the rule "flags the 7 instances the cleanup commit fixes." Vale scopes to [*.md] only (.vale.ini line 47); it can only flag the 5 Markdown instances. The 2 manifest.json fixes are manual edits outside Vale's scope. The claim conflates Vale-flagged instances with manually-fixed entries. The correct statement is: Vale flags 5 instances; 2 additional instances in manifest.json are fixed by hand. (Mafu-san)

🤖

#
# Vale's substitution rule applies in prose only; it skips fenced code
# blocks, inline code, and URLs by default. That means `hashicorp/kubernetes`
# (Terraform provider source) and `developer.hashicorp.com` (URL) stay
# untouched. The rule fires on body text and headings where the wrong
# casing appears as a normal word.
#
# Level: error. Each swap targets a brand whose owner publishes a
# canonical casing; "Hashicorp Vault" instead of "HashiCorp Vault" is
# objectively wrong, not a judgment call. The existing-content violation
# count is zero (cleanup landed in the previous commit), so this rule

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.

P3 [CRF-4] "cleanup landed in the previous commit" is a temporal reference that dissolves after merge. After a squash merge, "the previous commit" doesn't exist. After a rebase merge, the SHA changes. The factual claim (violation count is zero) stands on its own. Drop the parenthetical:

# count is zero, so this rule can ship at error from day one.

(Leorio)

🤖

# can ship at error from day one.
#
# Adding a brand: append a key/value to the swap table below and audit
# the docs corpus for the wrong-casing variant. Keep the message template
# unchanged; the `%s` token interpolates the matched (wrong) text.

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.

P2 [CRF-2] The comment says "the %s token interpolates the matched (wrong) text" (singular). The message template has two %s tokens with different semantics: the first interpolates the correct (replacement) form, the second interpolates the matched (wrong) form. A contributor adapting this template or debugging a message that reads backward gets a wrong mental model.

Suggestion:

# unchanged; the first %s interpolates the correct (replacement) text
# and the second interpolates the matched (wrong) text.

(Leorio)

🤖

Comment on lines +1 to +17

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.

P3 [CRF-7] The header comment is 17 lines for 11 lines of config. Roughly half restates identifiers or duplicates content from style-guide.md:

  • Line 1 (Coder.BrandNames - enforce canonical brand-name casing) restates the filename and extends: substitution.
  • Lines 3-7 (substitution scope) duplicate style-guide.md:47.
  • Lines 15-17 (how to add a brand) duplicate style-guide.md:56-58.

The trap (false-positive scope) and why-not-what (error level) carry their weight. Trimmed draft that keeps both:

# substitution rules skip code blocks, inline code, and URLs, so
# provider sources (hashicorp/kubernetes) and URLs are unaffected.
#
# Error from day one: brand casing is objectively right or wrong,
# and existing-content violations are zero.
#
# Adding a brand: append to swap, audit docs for violations.

(Gon)

🤖

extends: substitution
message: "Use '%s' instead of '%s' (brand-name casing)."
link: https://github.com/coder/coder/blob/main/docs/.style/style-guide.md#brand-names
level: error

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.

Note [CRF-12] Worth knowing: make lint/prose uses --no-exit (Makefile:854), so Coder.BrandNames at error level surfaces as a CI annotation but does not fail the build or block merge. The enforcement depends on human reviewers noticing the annotation. This is a system-level constraint from the 391 pre-existing errors in upstream Google rules, not a flaw of this PR. (Pariston)

🤖

ignorecase: false
nonword: false

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.

P4 [CRF-8] No regression fixture for the rule. If someone later breaks the swap YAML or removes an entry, there's no automated check that the rule still fires on known-bad input. The "test" is the absence of violations in the corpus, which is indistinguishable from a broken rule that fires on nothing. Not this PR's debt (no Vale rule test infrastructure exists in the repo), but worth noting as the Coder/ style directory grows. (Bisky)

🤖

action:
name: replace
swap:
Hashicorp: HashiCorp

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.

P3 [CRF-5] The swap table catches Hashicorp and HASHICORP but omits hashicorp (all lowercase). The PR adds HASHICORP defensively despite zero corpus occurrences, but omits hashicorp citing 49 URL/code instances. However, this rule extends: substitution, and Vale's substitution scope already skips fenced code blocks, inline code, and URLs by default (as the comment on lines 3-7 documents). Adding hashicorp: HashiCorp would catch the one case the current table misses (lowercase in prose, which is always wrong for a proper noun) with zero false-positive risk.

The stated fallback (Vale.Spelling, DOCS-187) doesn't exist yet. Until it ships, a contributor who writes "hashicorp" in body text gets no lint signal.

swap:
  hashicorp: HashiCorp
  Hashicorp: HashiCorp
  HASHICORP: HashiCorp

(Zoro P3, Hisoka Note)

🤖

HASHICORP: HashiCorp
19 changes: 9 additions & 10 deletions docs/.style/styles/Coder/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Coder custom Vale rules

Custom Vale rules specific to Coder live here. Each rule is a YAML file
that Vale loads through the `BasedOnStyles = Coder` setting in the
repo-root `.vale.ini`.
Custom Vale rules specific to Coder live here.
Each rule is a YAML file that Vale loads through the `BasedOnStyles = Coder` setting in the repo-root `.vale.ini`.

This directory is intentionally empty for now. Follow-up PRs add rules
incrementally. Planned starter rules:
Active rules ship as YAML files in this directory.
See the matching sections in `docs/.style/style-guide.md` for the user-facing policy each rule enforces.
Follow-up PRs add rules incrementally.
Planned coverage:

- Dev Container terminology
- HashiCorp casing
- Limit "we"
- Limit `we`
- Setup vs set up, Quickstart casing
- Next steps vs Learn more
- Vale substitution rule scaffold

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.

Nit [CRF-9] "Vale substitution rule scaffold" is stale or ambiguous. BrandNames.yml shipped in this PR as a substitution rule. A contributor reading this planned-coverage list would reasonably wonder what scaffold work remains. Remove the bullet or rename it to distinguish it from the rule that just shipped. (Gon)

🤖

Expand All @@ -28,9 +28,8 @@ incrementally. Planned starter rules:
- The rule is objectively correct (typo, brand-name casing, banned
substitution).
- The existing-content violation count for the rule reaches zero.
4. A follow-up PR will add a parity CI check that verifies every rule
here has a matching section in `style-guide.md`. Add the section in
the same PR as the rule.
4. A follow-up PR adds a parity CI check that verifies every rule here has a matching section in `style-guide.md`.
Add the section in the same PR as the rule.

## Reference

Expand Down
3 changes: 1 addition & 2 deletions docs/admin/integrations/multiple-kube-clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ Alternatively, you can authenticate with remote clusters with ServiceAccount
tokens. Coder can store these secrets on your behalf with
[managed Terraform variables](../templates/extending-templates/variables.md).

Alternatively, these could also be fetched from Kubernetes secrets or even
[Hashicorp Vault](https://registry.terraform.io/providers/hashicorp/vault/latest/docs/data-sources/generic_secret).
Alternatively, these could also be fetched from Kubernetes secrets or even [HashiCorp Vault](https://registry.terraform.io/providers/hashicorp/vault/latest/docs/data-sources/generic_secret).

This guide assumes you have a `coder-workspaces` namespace on your remote
cluster. Change the namespace accordingly.
Expand Down
3 changes: 1 addition & 2 deletions docs/admin/integrations/opentofu.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ Coder deployments support any custom Terraform binary, including
[OpenTofu](https://opentofu.org/docs/) - an open source alternative to
Terraform.

You can read more about OpenTofu and Hashicorp's licensing in our
[blog post](https://coder.com/blog/hashicorp-license) on the Terraform licensing changes.
You can read more about OpenTofu and HashiCorp's licensing in our [blog post](https://coder.com/blog/hashicorp-license) on the Terraform licensing changes.

## Using a custom Terraform binary

Expand Down
10 changes: 3 additions & 7 deletions docs/admin/templates/extending-templates/workspace-tags.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,9 @@ Passing template tags in from other data sources or resources is not permitted.

### HCL syntax

When importing the template version with `coder_workspace_tags`, the Coder
provisioner server extracts raw partial queries for each workspace tag and
stores them in the database. During workspace build time, the Coder server uses
the [Hashicorp HCL library](https://github.com/hashicorp/hcl) to evaluate these
raw queries on-the-fly without processing the entire Terraform template. This
evaluation is simpler but also limited in terms of available functions,
variables, and references to other resources.
When importing the template version with `coder_workspace_tags`, the Coder provisioner server extracts raw partial queries for each workspace tag and stores them in the database.
During workspace build time, the Coder server uses the [HashiCorp HCL library](https://github.com/hashicorp/hcl) to evaluate these raw queries on-the-fly without processing the entire Terraform template.
This evaluation is simpler but also limited in terms of available functions, variables, and references to other resources.

#### Supported syntax

Expand Down
10 changes: 3 additions & 7 deletions docs/admin/templates/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,9 @@ underlying infrastructure that all Coder workspaces run on.

## Learn the concepts

While templates are written in standard Terraform, it's important to learn the
Coder-specific concepts behind templates. The best way to learn the concepts is
by
[creating a basic template from scratch](../../tutorials/template-from-scratch.md).
If you are unfamiliar with Terraform, see
[Hashicorp's Tutorials](https://developer.hashicorp.com/terraform/tutorials) for
common cloud providers.
While templates are written in standard Terraform, it's important to learn the Coder-specific concepts behind templates.
The best way to learn the concepts is by [creating a basic template from scratch](../../tutorials/template-from-scratch.md).
If you are unfamiliar with Terraform, see [HashiCorp's Tutorials](https://developer.hashicorp.com/terraform/tutorials) for common cloud providers.

## Starter templates

Expand Down
4 changes: 2 additions & 2 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -808,8 +808,8 @@
"path": "./admin/integrations/dx-data-cloud.md"
},
{
"title": "Hashicorp Vault",
"description": "Integrate Coder with Hashicorp Vault",
"title": "HashiCorp Vault",
"description": "Integrate Coder with HashiCorp Vault",
"path": "./admin/integrations/vault.md"
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/template-from-scratch.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ server essentially runs a `terraform apply` every time a workspace is created,
started, or stopped.

> [!TIP]
> Haven't written Terraform before? Check out Hashicorp's
> [Getting Started Guides](https://developer.hashicorp.com/terraform/tutorials).
> Haven't written Terraform before?
> Check out HashiCorp's [Getting Started Guides](https://developer.hashicorp.com/terraform/tutorials).

Here's a simplified diagram that shows the main parts of the template we'll
create:
Expand Down
Loading