diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bac256ab..233ab2cf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -47,6 +47,7 @@ jobs: # Monitor code coverage and TODO/FIXME-type comments health-score: + name: Health score needs: lint-test runs-on: macos-latest steps: @@ -55,6 +56,8 @@ jobs: uses: actions/setup-go@v5.4.0 with: go-version: "1.24.2" + - name: Check spelling + uses: crate-ci/typos@v1.31.1 - name: Report health score uses: slackapi/slack-health-score@v0.1.1 with: diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 00000000..acfb4186 --- /dev/null +++ b/.typos.toml @@ -0,0 +1,20 @@ +# Copyright 2022-2025 Salesforce, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[default] +extend-ignore-identifiers-re = [ + "alle", + "groupe", + "UE1", +] diff --git a/cmd/auth/login.go b/cmd/auth/login.go index 4d03329b..b021cc81 100644 --- a/cmd/auth/login.go +++ b/cmd/auth/login.go @@ -47,7 +47,7 @@ func NewLoginCommand(clients *shared.ClientFactory) *cobra.Command { Example: style.ExampleCommandsf([]style.ExampleCommand{ {Command: "auth login", Meaning: "Login to a Slack account with prompts"}, {Command: "auth login --no-prompt", Meaning: "Login to a Slack account without prompts, this returns a ticket"}, - {Command: "auth login --challenge 6d0a31c9 --ticket ISQWLiZT0OtMLO3YWNTJO0...", Meaning: "Complete login using ticket and challenge code"}, + {Command: "auth login --challenge 6d0a31c9 --ticket ISQWLiZT0tOMLO3YWNTJO0...", Meaning: "Complete login using ticket and challenge code"}, {Command: "auth login --token xoxp-...", Meaning: "Login with a user token"}, }), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/cmd/auth/token.go b/cmd/auth/token.go index bdf99c46..4a59a041 100644 --- a/cmd/auth/token.go +++ b/cmd/auth/token.go @@ -30,7 +30,7 @@ func NewTokenCommand(clients *shared.ClientFactory) *cobra.Command { Example: style.ExampleCommandsf([]style.ExampleCommand{ {Command: "auth token", Meaning: "Create a service token with prompts"}, {Command: "auth token --no-prompt", Meaning: "Gather a service token without prompts, this returns a ticket"}, - {Command: "auth token --challenge 6d0a31c9 --ticket ISQWLiZT0OtMLO3YWNTJO0...", Meaning: "Complete authentication using a ticket and challenge code"}, + {Command: "auth token --challenge 6d0a31c9 --ticket ISQWLiZT0tOMLO3YWNTJO0...", Meaning: "Complete authentication using a ticket and challenge code"}, }), RunE: func(cmd *cobra.Command, args []string) error { serviceTokenFlag = true diff --git a/docs/reference/commands/slack_auth_login.md b/docs/reference/commands/slack_auth_login.md index bb481242..99b498a4 100644 --- a/docs/reference/commands/slack_auth_login.md +++ b/docs/reference/commands/slack_auth_login.md @@ -20,7 +20,7 @@ $ slack auth login $ slack auth login --no-prompt # Complete login using ticket and challenge code -$ slack auth login --challenge 6d0a31c9 --ticket ISQWLiZT0OtMLO3YWNTJO0... +$ slack auth login --challenge 6d0a31c9 --ticket ISQWLiZT0tOMLO3YWNTJO0... # Login with a user token $ slack auth login --token xoxp-... diff --git a/docs/reference/commands/slack_auth_token.md b/docs/reference/commands/slack_auth_token.md index ccc99d23..6253fffc 100644 --- a/docs/reference/commands/slack_auth_token.md +++ b/docs/reference/commands/slack_auth_token.md @@ -20,7 +20,7 @@ $ slack auth token $ slack auth token --no-prompt # Complete authentication using a ticket and challenge code -$ slack auth token --challenge 6d0a31c9 --ticket ISQWLiZT0OtMLO3YWNTJO0... +$ slack auth token --challenge 6d0a31c9 --ticket ISQWLiZT0tOMLO3YWNTJO0... ``` ### Options diff --git a/docs/reference/commands/slack_login.md b/docs/reference/commands/slack_login.md index baf06d06..108497b0 100644 --- a/docs/reference/commands/slack_login.md +++ b/docs/reference/commands/slack_login.md @@ -20,7 +20,7 @@ $ slack auth login $ slack auth login --no-prompt # Complete login using ticket and challenge code -$ slack auth login --challenge 6d0a31c9 --ticket ISQWLiZT0OtMLO3YWNTJO0... +$ slack auth login --challenge 6d0a31c9 --ticket ISQWLiZT0tOMLO3YWNTJO0... # Login with a user token $ slack auth login --token xoxp-... diff --git a/internal/goutils/strings.go b/internal/goutils/strings.go index 6feee4dc..e19bd93c 100644 --- a/internal/goutils/strings.go +++ b/internal/goutils/strings.go @@ -155,7 +155,7 @@ func AddLogWhenValExist(title string, val string) string { return "" } -// UpperCaseTrimAll returns a formatted named_entites for trigger ACLs +// UpperCaseTrimAll returns a formatted named_entities for trigger ACLs func UpperCaseTrimAll(namedEntities string) string { return strings.ReplaceAll(strings.ToUpper(namedEntities), " ", "") } diff --git a/internal/iostreams/writer.go b/internal/iostreams/writer.go index 3ed4ebb7..c59ed590 100644 --- a/internal/iostreams/writer.go +++ b/internal/iostreams/writer.go @@ -22,7 +22,7 @@ import ( "github.com/slackapi/slack-cli/internal/style" ) -// Writer contains implementions of io.Writer that log and output provided input +// Writer contains implementations of io.Writer to log and output provided input // // Used over Printer when the Write method is needed while still wanting to have // outputs formatted and directed to the matching stream