Skip to content

Commit b3a83a8

Browse files
committed
enable spelling linters and fix spelling mistakes
Signed-off-by: Tim Ramlot <[email protected]>
1 parent 214f4d7 commit b3a83a8

File tree

12 files changed

+24
-24
lines changed

12 files changed

+24
-24
lines changed

.golangci.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@ linters:
77
rules:
88
- linters:
99
- bodyclose
10-
- dupword
1110
- errcheck
1211
- errchkjson
1312
- forbidigo
1413
- gocritic
1514
- gosec
1615
- govet
17-
- misspell
1816
- musttag
1917
- nilerr
2018
- noctx

api/datareading.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type DataReadingsPost struct {
1515

1616
// DataReading is the output of a DataGatherer.
1717
type DataReading struct {
18-
// ClusterID is optional as it can be infered from the agent
18+
// ClusterID is optional as it can be inferred from the agent
1919
// token when using basic authentication.
2020
ClusterID string `json:"cluster_id,omitempty"`
2121
DataGatherer string `json:"data-gatherer"`

cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func init() {
4343
// Execute adds all child commands to the root command and sets flags appropriately.
4444
// This is called by main.main(). It only needs to happen once to the rootCmd.
4545
// If the root command or sub-command returns an error, the error message will
46-
// will be logged and the process will exit with status 1.
46+
// be logged and the process will exit with status 1.
4747
func Execute() {
4848
logs.AddFlags(rootCmd.PersistentFlags())
4949
ctx := klog.NewContext(context.Background(), klog.Background())

pkg/agent/config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ func InitAgentCmdFlags(c *cobra.Command, cfg *AgentCmdFlags) {
350350
}
351351

352352
// TLSPKMode controls how to authenticate to TLSPK / Jetstack Secure. Only one
353-
// TLSPKMode may be provided if using using those backends.
353+
// TLSPKMode may be provided if using those backends.
354354
type TLSPKMode string
355355

356356
const (
@@ -738,11 +738,11 @@ func validateCredsAndCreateClient(log logr.Logger, flagCredentialsPath, flagClie
738738
var creds client.Credentials
739739

740740
if flagClientID != "" && flagCredentialsPath != "" {
741-
errs = multierror.Append(errs, fmt.Errorf("--client-id and --credentials-file cannot be used simultanously"))
741+
errs = multierror.Append(errs, fmt.Errorf("--client-id and --credentials-file cannot be used simultaneously"))
742742
break
743743
}
744744
if flagPrivateKeyPath != "" && flagCredentialsPath != "" {
745-
errs = multierror.Append(errs, fmt.Errorf("--private-key-path and --credentials-file cannot be used simultanously"))
745+
errs = multierror.Append(errs, fmt.Errorf("--private-key-path and --credentials-file cannot be used simultaneously"))
746746
break
747747
}
748748
if flagClientID == "" && flagPrivateKeyPath == "" && flagCredentialsPath == "" {

pkg/agent/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ func Test_ValidateAndCombineConfig(t *testing.T) {
634634
assert.Equal(t, true, got.MachineHubMode)
635635
})
636636

637-
t.Run("machinehub + venafi-cloud-keypair-auth should work simultanously", func(t *testing.T) {
637+
t.Run("machinehub + venafi-cloud-keypair-auth should work simultaneously", func(t *testing.T) {
638638
t.Setenv("POD_NAMESPACE", "venafi")
639639
t.Setenv("KUBECONFIG", withFile(t, fakeKubeconfig))
640640
privKeyPath := withFile(t, fakePrivKeyPEM)

pkg/agent/run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func Run(cmd *cobra.Command, args []string) (returnErr error) {
111111
}
112112

113113
// Health check endpoint. Since we haven't figured a good way of knowning
114-
// what "ready" means for the agent, we just return 200 OK inconditionally.
114+
// what "ready" means for the agent, we just return 200 OK unconditionally.
115115
// The goal is to satisfy some Kubernetes distributions, like OpenShift,
116116
// that require a liveness and health probe to be present for each pod.
117117
log.Info("Healthz endpoints enabled", "path", "/healthz")

pkg/client/client_venconn_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ func run_TestVenConnClient_PostDataReadingsWithOptions(ctx context.Context, rest
300300
// sub-test-has-special-chars-and-is-also-super-super-super-super-
301301
//
302302
// Only the last part of the test name is used.
303+
//
304+
// nolint:dupword
303305
func testNameToNamespace(t testing.TB) string {
304306
regex := regexp.MustCompile("[^a-zA-Z0-9-]")
305307

pkg/datagatherer/k8s/dynamic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ func RemoveUnstructuredKeys(excludeKeys []*regexp.Regexp, obj *unstructured.Unst
473473
return
474474
}
475475

476-
// The field may be nil since yaml.Unmarshal's omitempty might not be set on
476+
// The field may be nil since yaml.Unmarshal's omitempty might not be set
477477
// on this struct field.
478478
if annotsRaw == nil {
479479
return

pkg/internal/cyberark/identity/advance_authentication_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func Test_IdentityAdvanceAuthentication(t *testing.T) {
2424
MechanismID: successMechanismID,
2525
SessionID: successSessionID,
2626
TenantID: "foo",
27-
PersistantLogin: true,
27+
PersistentLogin: true,
2828
},
2929

3030
expectedError: nil,
@@ -37,7 +37,7 @@ func Test_IdentityAdvanceAuthentication(t *testing.T) {
3737
MechanismID: successMechanismID,
3838
SessionID: successSessionID,
3939
TenantID: "foo",
40-
PersistantLogin: true,
40+
PersistentLogin: true,
4141
},
4242

4343
expectedError: fmt.Errorf(`got a failure response from request to advance authentication: message="Authentication (login or challenge) has failed. Please try again or contact your system administrator.", error="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:55555555555555555555555555555555"`),
@@ -50,7 +50,7 @@ func Test_IdentityAdvanceAuthentication(t *testing.T) {
5050
MechanismID: successMechanismID,
5151
SessionID: successSessionID,
5252
TenantID: "foo",
53-
PersistantLogin: true,
53+
PersistentLogin: true,
5454
},
5555

5656
expectedError: fmt.Errorf(`got a failure response from request to advance authentication: message="Authentication (login or challenge) has failed. Please try again or contact your system administrator.", error="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:55555555555555555555555555555555"`),
@@ -63,7 +63,7 @@ func Test_IdentityAdvanceAuthentication(t *testing.T) {
6363
MechanismID: "foo",
6464
SessionID: successSessionID,
6565
TenantID: "foo",
66-
PersistantLogin: true,
66+
PersistentLogin: true,
6767
},
6868

6969
expectedError: fmt.Errorf(`got a failure response from request to advance authentication: message="Authentication (login or challenge) has failed. Please try again or contact your system administrator.", error="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:55555555555555555555555555555555"`),
@@ -76,20 +76,20 @@ func Test_IdentityAdvanceAuthentication(t *testing.T) {
7676
MechanismID: successMechanismID,
7777
SessionID: "foo",
7878
TenantID: "foo",
79-
PersistantLogin: true,
79+
PersistentLogin: true,
8080
},
8181

8282
expectedError: fmt.Errorf(`got a failure response from request to advance authentication: message="Authentication (login or challenge) has failed. Please try again or contact your system administrator.", error="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:55555555555555555555555555555555"`),
8383
},
84-
"persistant login not set": {
84+
"persistent login not set": {
8585
username: successUser,
8686
password: []byte(successPassword),
8787
advanceBody: advanceAuthenticationRequestBody{
8888
Action: ActionAnswer,
8989
MechanismID: successMechanismID,
9090
SessionID: successSessionID,
9191
TenantID: "foo",
92-
PersistantLogin: false,
92+
PersistentLogin: false,
9393
},
9494

9595
expectedError: fmt.Errorf("got unexpected status code 403 Forbidden from request to advance authentication in CyberArk Identity API"),

pkg/internal/cyberark/identity/identity.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ type advanceAuthenticationRequestBody struct {
156156
// get the Identity API URL, but we set it anyway to be explicit.
157157
TenantID string `json:"TenantId"`
158158

159-
// PersistantLogin is documented to "[indicate] whether the session should persist after the user
159+
// PersistentLogin is documented to "[indicate] whether the session should persist after the user
160160
// closes the browser"; for service-to-service auth which we're trying to do, we set this to true.
161-
PersistantLogin bool `json:"PersistantLogin"`
161+
PersistentLogin bool `json:"PersistentLogin"`
162162
}
163163

164164
// advanceAuthenticationResponseResult is the specific information returned for a successful AdvanceAuthentication call
@@ -370,7 +370,7 @@ func (c *Client) doStartAuthentication(ctx context.Context, username string) (ad
370370
response.MechanismID = mechanism.MechanismID
371371
response.SessionID = startAuthResponse.Result.SessionID
372372
response.TenantID = c.subdomain
373-
response.PersistantLogin = true
373+
response.PersistentLogin = true
374374

375375
return response, nil
376376
}

0 commit comments

Comments
 (0)