Skip to content

Commit 19fcf60

Browse files
authored
ci: add typo detection (#3327)
And fix them.
1 parent eb51435 commit 19fcf60

File tree

25 files changed

+63
-30
lines changed

25 files changed

+63
-30
lines changed

.github/workflows/coder.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,22 @@ concurrency:
3030
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
3131

3232
jobs:
33+
typos:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v2
38+
- name: typos-action
39+
uses: crate-ci/typos@v1.0.4
40+
with:
41+
config: .github/workflows/typos.toml
42+
- name: Fix Helper
43+
if: ${{ failure() }}
44+
run: |
45+
echo "::notice:: you can automatically fix typos from your CLI:
46+
cargo install typos-cli
47+
typos -c .github/workflows/typos.toml -w"
48+
3349
changes:
3450
runs-on: ubuntu-latest
3551
outputs:

.github/workflows/typos.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[default.extend-identifiers]
2+
alog = "alog"
3+
Jetbrains = "JetBrains"
4+
IST = "IST"
5+
6+
[default.extend-words]
7+
8+
[files]
9+
extend-exclude = [
10+
"**.svg",
11+
"**.lock",
12+
"go.sum",
13+
"go.mod",
14+
# These files contain base64 strings that confuse the detector
15+
"**XService**.ts",
16+
"**identity.go",
17+
]

agent/agent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ func (a *agent) createCommand(ctx context.Context, rawCommand string, env []stri
402402
// These should override all variables we manually specify.
403403
for envKey, value := range metadata.EnvironmentVariables {
404404
// Expanding environment variables allows for customization
405-
// of the $PATH, among other variables. Customers can prepand
405+
// of the $PATH, among other variables. Customers can prepend
406406
// or append to the $PATH, so allowing expand is required!
407407
cmd.Env = append(cmd.Env, fmt.Sprintf("%s=%s", envKey, os.ExpandEnv(value)))
408408
}

cli/cliui/cliui.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ var Styles = struct {
3434
Placeholder,
3535
Prompt,
3636
FocusedPrompt,
37-
Fuschia,
37+
Fuchsia,
3838
Logo,
3939
Warn,
4040
Wrap lipgloss.Style
@@ -51,7 +51,7 @@ var Styles = struct {
5151
Placeholder: lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "#585858", Dark: "#005fff"}),
5252
Prompt: defaultStyles.Prompt.Foreground(lipgloss.AdaptiveColor{Light: "#9B9B9B", Dark: "#5C5C5C"}),
5353
FocusedPrompt: defaultStyles.FocusedPrompt.Foreground(lipgloss.Color("#651fff")),
54-
Fuschia: defaultStyles.SelectedMenuItem.Copy(),
54+
Fuchsia: defaultStyles.SelectedMenuItem.Copy(),
5555
Logo: defaultStyles.Logo.SetString("Coder"),
5656
Warn: lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "#04B575", Dark: "#ECFD65"}),
5757
Wrap: lipgloss.NewStyle().Width(80),

cli/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ type example struct {
407407
Command string
408408
}
409409

410-
// formatExamples formats the exampels as width wrapped bulletpoint
410+
// formatExamples formats the examples as width wrapped bulletpoint
411411
// descriptions with the command underneath.
412412
func formatExamples(examples ...example) string {
413413
wrap := cliui.Styles.Wrap.Copy()

cli/templates.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func displayTemplates(filterColumns []string, templates ...codersdk.Template) st
7171
template.OrganizationID.String(),
7272
template.Provisioner,
7373
template.ActiveVersionID.String(),
74-
cliui.Styles.Fuschia.Render(fmt.Sprintf("%d developer%s", template.WorkspaceOwnerCount, suffix)),
74+
cliui.Styles.Fuchsia.Render(fmt.Sprintf("%d developer%s", template.WorkspaceOwnerCount, suffix)),
7575
(time.Duration(template.MaxTTLMillis) * time.Millisecond).String(),
7676
(time.Duration(template.MinAutostartIntervalMillis) * time.Millisecond).String(),
7777
})

coderd/audit/generate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# This script facilitates code generation for auditing types. It outputs code
44
# that can be copied and pasted into the audit.AuditableResources table. By
5-
# default, every field is ignored. It is your responsiblity to go through each
5+
# default, every field is ignored. It is your responsibility to go through each
66
# field and document why each field should or should not be audited.
77
#
88
# Usage:

coderd/rbac/policy.rego

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ org = set {
105105

106106
# The allow block is quite simple. Any set with `false` cascades down in levels.
107107
# Authorization looks for any `allow` statement that is true. Multiple can be true!
108-
# Note that the absense of `allow` means "unauthorized".
108+
# Note that the absence of `allow` means "unauthorized".
109109
# An explicit `"allow": true` is required.
110110

111111
# site allow

codersdk/provisionerdaemons.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type ProvisionerDaemon struct {
4141
Provisioners []ProvisionerType `json:"provisioners"`
4242
}
4343

44-
// ProvisionerJobStaus represents the at-time state of a job.
44+
// ProvisionerJobStatus represents the at-time state of a job.
4545
type ProvisionerJobStatus string
4646

4747
// Active returns whether the job is still active or not.

docs/ides.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ support should work:
1212
- Rider
1313
- RubyMine
1414
- WebStorm
15-
- Web IDEs (code-server, JupyterLab, Jetbrains Projector)
15+
- Web IDEs (code-server, JupyterLab, JetBrains Projector)
1616
- Note: These are [configured in the template](./ides/configuring-web-ides.md)
1717

1818
## SSH configuration
@@ -74,6 +74,6 @@ Connection and connect to your Coder workspace.](./ides/configuring-gateway.md)
7474
| 2022.1.4 | Working | Windows clients are unable to connect to Linux workspace |
7575
| 2022.2 RC | Working | Version >= 222.3345.108 |
7676

77-
## Web IDEs (Jupyter, code-server, Jetbrains Projector)
77+
## Web IDEs (Jupyter, code-server, JetBrains Projector)
7878

7979
Web IDEs (code-server, JetBrains Projector, VNC, etc.) are defined in the template. See [configuring IDEs](./ides/configuring-web-ides.md).

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy