diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index fb41b3f1f2924..dbebc55a43dd7 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -30,6 +30,22 @@ concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: + typos: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: typos-action + uses: crate-ci/typos@v1.0.4 + with: + config: .github/workflows/typos.toml + - name: Fix Helper + if: ${{ failure() }} + run: | + echo "::notice:: you can automatically fix typos from your CLI: + cargo install typos-cli + typos -c .github/workflows/typos.toml -w" + changes: runs-on: ubuntu-latest outputs: diff --git a/.github/workflows/typos.toml b/.github/workflows/typos.toml new file mode 100644 index 0000000000000..1dbe51ff31911 --- /dev/null +++ b/.github/workflows/typos.toml @@ -0,0 +1,17 @@ +[default.extend-identifiers] +alog = "alog" +Jetbrains = "JetBrains" +IST = "IST" + +[default.extend-words] + +[files] +extend-exclude = [ + "**.svg", + "**.lock", + "go.sum", + "go.mod", + # These files contain base64 strings that confuse the detector + "**XService**.ts", + "**identity.go", +] diff --git a/agent/agent.go b/agent/agent.go index a16a4585da58a..6b2e098ca5019 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -402,7 +402,7 @@ func (a *agent) createCommand(ctx context.Context, rawCommand string, env []stri // These should override all variables we manually specify. for envKey, value := range metadata.EnvironmentVariables { // Expanding environment variables allows for customization - // of the $PATH, among other variables. Customers can prepand + // of the $PATH, among other variables. Customers can prepend // or append to the $PATH, so allowing expand is required! cmd.Env = append(cmd.Env, fmt.Sprintf("%s=%s", envKey, os.ExpandEnv(value))) } diff --git a/cli/cliui/cliui.go b/cli/cliui/cliui.go index d99c54b8df5c4..f1c0a13f2cd01 100644 --- a/cli/cliui/cliui.go +++ b/cli/cliui/cliui.go @@ -34,7 +34,7 @@ var Styles = struct { Placeholder, Prompt, FocusedPrompt, - Fuschia, + Fuchsia, Logo, Warn, Wrap lipgloss.Style @@ -51,7 +51,7 @@ var Styles = struct { Placeholder: lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "#585858", Dark: "#005fff"}), Prompt: defaultStyles.Prompt.Foreground(lipgloss.AdaptiveColor{Light: "#9B9B9B", Dark: "#5C5C5C"}), FocusedPrompt: defaultStyles.FocusedPrompt.Foreground(lipgloss.Color("#651fff")), - Fuschia: defaultStyles.SelectedMenuItem.Copy(), + Fuchsia: defaultStyles.SelectedMenuItem.Copy(), Logo: defaultStyles.Logo.SetString("Coder"), Warn: lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "#04B575", Dark: "#ECFD65"}), Wrap: lipgloss.NewStyle().Width(80), diff --git a/cli/root.go b/cli/root.go index 6e7a89b635659..e63a308712f02 100644 --- a/cli/root.go +++ b/cli/root.go @@ -407,7 +407,7 @@ type example struct { Command string } -// formatExamples formats the exampels as width wrapped bulletpoint +// formatExamples formats the examples as width wrapped bulletpoint // descriptions with the command underneath. func formatExamples(examples ...example) string { wrap := cliui.Styles.Wrap.Copy() diff --git a/cli/templates.go b/cli/templates.go index 26b0ee71922c8..43a4ad25271ac 100644 --- a/cli/templates.go +++ b/cli/templates.go @@ -71,7 +71,7 @@ func displayTemplates(filterColumns []string, templates ...codersdk.Template) st template.OrganizationID.String(), template.Provisioner, template.ActiveVersionID.String(), - cliui.Styles.Fuschia.Render(fmt.Sprintf("%d developer%s", template.WorkspaceOwnerCount, suffix)), + cliui.Styles.Fuchsia.Render(fmt.Sprintf("%d developer%s", template.WorkspaceOwnerCount, suffix)), (time.Duration(template.MaxTTLMillis) * time.Millisecond).String(), (time.Duration(template.MinAutostartIntervalMillis) * time.Millisecond).String(), }) diff --git a/coderd/audit/generate.sh b/coderd/audit/generate.sh index 48ba4fa62fa55..7821242b60939 100755 --- a/coderd/audit/generate.sh +++ b/coderd/audit/generate.sh @@ -2,7 +2,7 @@ # This script facilitates code generation for auditing types. It outputs code # that can be copied and pasted into the audit.AuditableResources table. By -# default, every field is ignored. It is your responsiblity to go through each +# default, every field is ignored. It is your responsibility to go through each # field and document why each field should or should not be audited. # # Usage: diff --git a/coderd/rbac/policy.rego b/coderd/rbac/policy.rego index 15d986ca08d32..9e35b827751d7 100644 --- a/coderd/rbac/policy.rego +++ b/coderd/rbac/policy.rego @@ -105,7 +105,7 @@ org = set { # The allow block is quite simple. Any set with `false` cascades down in levels. # Authorization looks for any `allow` statement that is true. Multiple can be true! -# Note that the absense of `allow` means "unauthorized". +# Note that the absence of `allow` means "unauthorized". # An explicit `"allow": true` is required. # site allow diff --git a/codersdk/provisionerdaemons.go b/codersdk/provisionerdaemons.go index 7645cd093f6cf..e71fbec7fbee5 100644 --- a/codersdk/provisionerdaemons.go +++ b/codersdk/provisionerdaemons.go @@ -41,7 +41,7 @@ type ProvisionerDaemon struct { Provisioners []ProvisionerType `json:"provisioners"` } -// ProvisionerJobStaus represents the at-time state of a job. +// ProvisionerJobStatus represents the at-time state of a job. type ProvisionerJobStatus string // Active returns whether the job is still active or not. diff --git a/docs/ides.md b/docs/ides.md index 5fa9fb9544600..5b575a6da02cb 100644 --- a/docs/ides.md +++ b/docs/ides.md @@ -12,7 +12,7 @@ support should work: - Rider - RubyMine - WebStorm -- Web IDEs (code-server, JupyterLab, Jetbrains Projector) +- Web IDEs (code-server, JupyterLab, JetBrains Projector) - Note: These are [configured in the template](./ides/configuring-web-ides.md) ## SSH configuration @@ -74,6 +74,6 @@ Connection and connect to your Coder workspace.](./ides/configuring-gateway.md) | 2022.1.4 | Working | Windows clients are unable to connect to Linux workspace | | 2022.2 RC | Working | Version >= 222.3345.108 | -## Web IDEs (Jupyter, code-server, Jetbrains Projector) +## Web IDEs (Jupyter, code-server, JetBrains Projector) Web IDEs (code-server, JetBrains Projector, VNC, etc.) are defined in the template. See [configuring IDEs](./ides/configuring-web-ides.md). diff --git a/docs/ides/configuring-web-ides.md b/docs/ides/configuring-web-ides.md index 2e588730f58a3..ce325820b8dd7 100644 --- a/docs/ides/configuring-web-ides.md +++ b/docs/ides/configuring-web-ides.md @@ -62,7 +62,7 @@ RUN curl -fsSL https://code-server.dev/install.sh | sh -s -- --version=4.3.0 RUN code-server --install-extension eamodio.gitlens # directly start code-server with the agent's startup_script (see above), -# or use a proccess manager like supervisord +# or use a process manager like supervisord ``` You'll also need to specify a `coder_app` resource related to the agent. This is how code-server is displayed on the workspace page. diff --git a/examples/templates/aws-linux/README.md b/examples/templates/aws-linux/README.md index 9333d41a355b9..eb65f01cd85d8 100644 --- a/examples/templates/aws-linux/README.md +++ b/examples/templates/aws-linux/README.md @@ -42,7 +42,7 @@ instances provisioned by Coder: "Resource": "*" }, { - "Sid": "CoderResouces", + "Sid": "CoderResources", "Effect": "Allow", "Action": [ "ec2:DescribeInstances", diff --git a/examples/templates/aws-windows/README.md b/examples/templates/aws-windows/README.md index 1c21d324bff5c..8582a3ea83ede 100644 --- a/examples/templates/aws-windows/README.md +++ b/examples/templates/aws-windows/README.md @@ -44,7 +44,7 @@ instances provisioned by Coder: "Resource": "*" }, { - "Sid": "CoderResouces", + "Sid": "CoderResources", "Effect": "Allow", "Action": [ "ec2:DescribeInstances", diff --git a/examples/templates/docker-code-server/README.md b/examples/templates/docker-code-server/README.md index efd0230bec456..6d9045ad2d84e 100644 --- a/examples/templates/docker-code-server/README.md +++ b/examples/templates/docker-code-server/README.md @@ -19,7 +19,7 @@ See `params.sample.yaml` for more information. This template has the following predefined parameters: - `docker_host`: Path to (or address of) the Docker socket. - > You can determine the correct value for this by runnning + > You can determine the correct value for this by running > `docker context ls`. - `docker_arch`: Architecture of the host running Docker. This can be `amd64`, `arm64`, or `armv7`. diff --git a/examples/templates/docker-image-builds/main.tf b/examples/templates/docker-image-builds/main.tf index a3cfbeb01d872..c135a09c2112e 100644 --- a/examples/templates/docker-image-builds/main.tf +++ b/examples/templates/docker-image-builds/main.tf @@ -21,7 +21,7 @@ variable "step1_docker_host_warning" { the Coder host, which is not necessarily your local machine. You can specify a different host in the template file and - surpress this warning. + suppress this warning. EOF validation { condition = contains(["Continue using /var/run/docker.sock on the Coder host"], var.step1_docker_host_warning) diff --git a/examples/templates/docker/main.tf b/examples/templates/docker/main.tf index 1fbc191fced6d..1aad84d324f76 100644 --- a/examples/templates/docker/main.tf +++ b/examples/templates/docker/main.tf @@ -21,7 +21,7 @@ variable "step1_docker_host_warning" { the Coder host, which is not necessarily your local machine. You can specify a different host in the template file and - surpress this warning. + suppress this warning. EOF validation { condition = contains(["Continue using /var/run/docker.sock on the Coder host"], var.step1_docker_host_warning) diff --git a/peer/channel.go b/peer/channel.go index d7119d1eafb7d..4945e5d465683 100644 --- a/peer/channel.go +++ b/peer/channel.go @@ -136,7 +136,7 @@ func (c *Channel) init() { c.closeMutex.Unlock() // pion/webrtc will return an io.ErrShortBuffer when a read - // is triggerred with a buffer size less than the chunks written. + // is triggered with a buffer size less than the chunks written. // // This makes sense when considering UDP connections, because // buffering of data that has no transmit guarantees is likely diff --git a/site/site.go b/site/site.go index 8e9528fa6aa71..a436532d7fb69 100644 --- a/site/site.go +++ b/site/site.go @@ -580,13 +580,13 @@ func sha1HashFile(name string) ([]byte, error) { return []byte(hex.EncodeToString(b)), nil } -func extractBin(dest string, r io.Reader) (numExtraced int, err error) { +func extractBin(dest string, r io.Reader) (numExtracted int, err error) { opts := []zstd.DOption{ // Concurrency doesn't help us when decoding the tar and // can actually slow us down. zstd.WithDecoderConcurrency(1), // Ignoring checksums can give a slight performance - // boost but it's probalby not worth the reduced safety. + // boost but it's probably not worth the reduced safety. zstd.IgnoreChecksum(false), // Allow the decoder to use more memory giving us a 2-3x // performance boost. diff --git a/site/site_test.go b/site/site_test.go index 27b6edcbbf527..2061f5c754265 100644 --- a/site/site_test.go +++ b/site/site_test.go @@ -296,7 +296,7 @@ func TestServingBin(t *testing.T) { }, }, { - name: "Serve local fs when embedd fs empty", + name: "Serve local fs when embed fs empty", fs: fstest.MapFS{}, reqs: []req{ {url: "/bin/coder-linux-amd64", wantStatus: http.StatusNotFound}, @@ -304,17 +304,17 @@ func TestServingBin(t *testing.T) { }, }, { - name: "Serve embedd fs", + name: "Serve embed fs", fs: fstest.MapFS{ "bin/GITKEEP": &fstest.MapFile{ Data: []byte(""), }, "bin/coder-linux-amd64": &fstest.MapFile{ - Data: []byte("embedd"), + Data: []byte("embed"), }, }, reqs: []req{ - {url: "/bin/coder-linux-amd64", wantStatus: http.StatusOK, wantBody: []byte("embedd")}, + {url: "/bin/coder-linux-amd64", wantStatus: http.StatusOK, wantBody: []byte("embed")}, {url: "/bin/GITKEEP", wantStatus: http.StatusOK, wantBody: []byte("")}, }, }, diff --git a/site/src/components/Dialog/Dialog.tsx b/site/src/components/Dialog/Dialog.tsx index 39f2dc14394de..ca26dd9fe750e 100644 --- a/site/src/components/Dialog/Dialog.tsx +++ b/site/src/components/Dialog/Dialog.tsx @@ -90,7 +90,7 @@ const typeToColor = (type: ConfirmDialogType): LoadingButtonProps["color"] => { } /** - * Quickly handels most modals actions, some combination of a cancel and confirm button + * Quickly handles most modals actions, some combination of a cancel and confirm button */ export const DialogActionButtons: React.FC = ({ cancelText = "Cancel", diff --git a/site/src/components/Resources/ResourceAvatar.stories.tsx b/site/src/components/Resources/ResourceAvatar.stories.tsx index cf641cba0b6c8..ee6ba30f79b34 100644 --- a/site/src/components/Resources/ResourceAvatar.stories.tsx +++ b/site/src/components/Resources/ResourceAvatar.stories.tsx @@ -28,7 +28,7 @@ NullResource.args = { type: "null_resource", } -export const UnkownResource = Template.bind({}) -UnkownResource.args = { +export const UnknownResource = Template.bind({}) +UnknownResource.args = { type: "noexistentvalue", } diff --git a/site/src/components/TableCellLink/TableCellLink.tsx b/site/src/components/TableCellLink/TableCellLink.tsx index ae23428bc8f18..c7a4ae21a8d52 100644 --- a/site/src/components/TableCellLink/TableCellLink.tsx +++ b/site/src/components/TableCellLink/TableCellLink.tsx @@ -30,7 +30,7 @@ const useStyles = makeStyles((theme) => ({ cell: { // This must override all padding for all rules on a TableCell. // Otherwise, the link will not cover the entire region. - // It's unfortuante to use `!important`, but this seems to be + // It's unfortunate to use `!important`, but this seems to be // a reasonable use-case. padding: "0 !important", }, diff --git a/site/src/components/WorkspaceScheduleButton/WorkspaceScheduleButton.stories.tsx b/site/src/components/WorkspaceScheduleButton/WorkspaceScheduleButton.stories.tsx index 222be67473ac9..82d4990583d04 100644 --- a/site/src/components/WorkspaceScheduleButton/WorkspaceScheduleButton.stories.tsx +++ b/site/src/components/WorkspaceScheduleButton/WorkspaceScheduleButton.stories.tsx @@ -40,7 +40,7 @@ NoTTL.args = { ...Mocks.MockWorkspace, latest_build: { ...Mocks.MockWorkspaceBuild, - // a mannual shutdown has a deadline of '"0001-01-01T00:00:00Z"' + // a manual shutdown has a deadline of '"0001-01-01T00:00:00Z"' // SEE: #1834 deadline: "0001-01-01T00:00:00Z", }, diff --git a/site/webpack.common.ts b/site/webpack.common.ts index ad7a758cca6c4..e482c4e1a5d9d 100644 --- a/site/webpack.common.ts +++ b/site/webpack.common.ts @@ -41,7 +41,7 @@ const dashboardHTMLPluginConfig = new HtmlWebpackPlugin({ export const createCommonWebpackConfig = (options?: { skipTypecheck: boolean }): Configuration => ({ // entry defines each "page" or "chunk". In v1, we have two "pages": // dashboard and terminal. This is desired because the terminal has the xterm - // vendor, and it is undesireable to load all of xterm on a dashboard + // vendor, and it is undesirable to load all of xterm on a dashboard // page load. // // The object key determines the chunk 'name'. This can be used in `output` diff --git a/site/webpack.dev.ts b/site/webpack.dev.ts index c6225f9afe795..cb43015edd7df 100644 --- a/site/webpack.dev.ts +++ b/site/webpack.dev.ts @@ -46,7 +46,7 @@ const config: Configuration = { // webpack-dev-server uses a webSocket to communicate with the browser // for HMR. By setting this to auto://0.0.0.0/ws, we allow the browser - // to set the protocal, hostname and port automatically for us. + // to set the protocol, hostname and port automatically for us. webSocketURL: "auto://0.0.0.0:0/ws", }, devMiddleware: {