Skip to content

Commit

Permalink
Update to the latest spellcheck GH Action
Browse files Browse the repository at this point in the history
Also sync the configs

Signed-off-by: Tim Smith <[email protected]>
  • Loading branch information
tas50 committed Sep 29, 2023
1 parent 9a127ce commit 4be8a29
Show file tree
Hide file tree
Showing 15 changed files with 68 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .github/actions/spelling/advice.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ If items relate to a ...

File paths are Perl 5 Regular Expressions - you can [test](https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files.

`^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md](../tree/HEAD/README.md) (on whichever branch you're using).
`^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude README.md (on whichever branch you're using).

- well-formed pattern.

Expand Down
32 changes: 1 addition & 31 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
@@ -1,32 +1,2 @@
alices
apiextensions
APIV
base64data
cainjection
certmanager
CERTMANAGER
clusterserviceversion
crdkustomizecainjectionpatch
crdkustomizeresource
crdkustomizewebhookpatch
crds
customresourcedefinitions
fullname
healthz
KMGTPE
kubebuilder
kustomization
kustomize
kustomizeconfig
logtostderr
manifestskustomizesamples
MGTPE
mondoooperatorconfig
nindent
numk
readyz
selfsigned
servicemonitors
subjectaccessreviews
webhookcainjection
wordpress
openssl
49 changes: 44 additions & 5 deletions .github/actions/spelling/line_forbidden.patterns
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Detect common combinations of valid words that are in fact invalid.
# Detect common combinations of valid words that are in fact invalid.
# Useful for brand capitalizations

#
# Our Terms
#

# s.b. Mondoo Platform
\sMondoo platform\b

# s.b. Compliance Hub
\scompliance hub\b
\sCompliance hubplatform\b

#
# Industry Terms
#
Expand Down Expand Up @@ -36,6 +47,20 @@
# Product Names
#

# s.b. Jira
\bJIRA\b

# s.b. MariaDB
\bMaria DB\b
\bmariaDB\b
# \bmariaDb\b causes failures in MQL queries

# s.b. PostgreSQL
\bPostgreSql\b

# s.b. Firefox
\bFireFox\b

# s.b. CentOS
\bCentos\b
\bCent OS\b
Expand Down Expand Up @@ -76,6 +101,7 @@

# s.b. Red Hat
\bRedHat\b
\bRedhat\b

# s.b. AlmaLinux
\bAlma Linux\b
Expand All @@ -88,11 +114,16 @@

# s.b. CircleCI
\bCircleCi\b
\bCircle CI\b

# s.b. AppArmor
\bApparmor\b
\bApp Armor\b

# s.b. SELinux
\bSeLinux\b
\bSelinux\b

# s.b. InSpec
\b[Ii]nspec\b

Expand Down Expand Up @@ -133,7 +164,7 @@
\bGroup Policy object\b

#
# VMware Product
# VMware Products
#

# s.b. VMware
Expand All @@ -144,6 +175,10 @@
\bVcenter\b
\bVCenter\b

# s.b. vSphere
\bVsphere\b
\bVSphere\b

# s.b. ESXi
\bEsxi\b

Expand Down Expand Up @@ -177,10 +212,9 @@
\bCloudsearch\b

# s.b. CloudShell
# we can't check for Cloud Shell since that's what Azure calls it
\bCloudshell\b
\bCloud Shell\b
\bcloudshell\b
\bcloud shell\b
# cloudshell results in false positives

# s.b. CloudTrail
\bCloudtrail\b
Expand Down Expand Up @@ -364,6 +398,9 @@
# Azure Products
#

# s.b. Azure Pipelines
\bAzure DevOps Pipelines\b

# s.b. Key Vault
\bKey vault\b
\bKeyVault\b
Expand Down Expand Up @@ -403,6 +440,8 @@

# s.b. Cosmos DB
\bCosmosDB\b
\bCosmoDB\b
\bCosmo DB\b

# s.b. SignalR Service
\bSignalR service\b
Expand Down
2 changes: 0 additions & 2 deletions .github/actions/spelling/only.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
\.md$
\.yaml$

5 changes: 5 additions & 0 deletions .github/actions/spelling/patterns.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,8 @@ uid:\s.*$

# mac user dir path
\/Users\/\S*

# AWS Token, ID access key, etc
aws_session_token\s+\=(\s+)?.+
aws_access_key_id\s+\=(\s+)?.+
aws_secret_access_key\s+\=(\s+)?.+
1 change: 1 addition & 0 deletions .github/actions/spelling/reject.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
ad-hoc
^attache$
benefitting
occurences?
Expand Down
7 changes: 4 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 2
updates:
- package-ecosystem: gomod
Expand All @@ -11,7 +12,7 @@ updates:
- dependency-name: k8s.io/apimachinery
- dependency-name: k8s.io/client-go
- dependency-name: k8s.io/api
- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: github-actions
directory: /
schedule:
interval: "weekly"
interval: weekly
7 changes: 4 additions & 3 deletions .github/workflows/spell-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ jobs:
steps:
- name: check-spelling
id: spelling
uses: check-spelling/[email protected].21
uses: check-spelling/[email protected].22
with:
disable_checks: noisy-file
suppress_push_for_open_pull_request: 1
checkout: true
post_comment: 0
dictionary_source_prefixes: '{"mondoo": "https://raw.githubusercontent.com/mondoohq/spellcheck-dictionary/main/", "cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220816/dictionaries/"}'
dictionary_source_prefixes: '{"mondoo": "https://raw.githubusercontent.com/mondoohq/spellcheck-dictionary/main/", "cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/"}'
extra_dictionaries:
cspell:aws/aws.txt
cspell:filetypes/filetypes.txt
Expand All @@ -47,7 +48,7 @@ jobs:
if: (success() || failure()) && needs.spelling.outputs.followup
steps:
- name: comment
uses: check-spelling/[email protected].21
uses: check-spelling/[email protected].22
with:
checkout: true
task: ${{ needs.spelling.outputs.followup }}
2 changes: 1 addition & 1 deletion api/v1alpha2/mondoooperatorconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type MondooOperatorConfigSpec struct {
Metrics Metrics `json:"metrics,omitempty"`
// Allows skipping Image resolution from upstream repository
SkipContainerResolution bool `json:"skipContainerResolution,omitempty"`
// HttpProxy specifies a proxy to use for HTTP requests to the Mondoo platform.
// HttpProxy specifies a proxy to use for HTTP requests to the Mondoo Platform.
HttpProxy *string `json:"httpProxy,omitempty"`
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
properties:
httpProxy:
description: HttpProxy specifies a proxy to use for HTTP requests to
the Mondoo platform.
Mondoo Platform.
type: string
metrics:
description: Metrics controls the enabling/disabling of metrics report
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/k8s.mondoo.com_mondoooperatorconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec:
properties:
httpProxy:
description: HttpProxy specifies a proxy to use for HTTP requests
to the Mondoo platform.
to the Mondoo Platform.
type: string
metrics:
description: Metrics controls the enabling/disabling of metrics report
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/mondoo/token_exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func CreateServiceAccountFromToken(ctx context.Context, kubeClient client.Client

claims, ok := token.Claims.(jwt.MapClaims)
if !ok {
err := fmt.Errorf("failed to type asesrt claims from token")
err := fmt.Errorf("failed to type assert claims from token")
log.Error(err, "failed to extract claim")
return err
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/utils/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ func TestFiltering(t *testing.T) {
expectedResult: true,
},
{
name: "explictly excluded",
name: "explicitly excluded",
input: "test-namespace",
excludedList: []string{"test-namespace"},
expectedResult: false,
},
{
name: "explictly included",
name: "explicitly included",
input: "test-namespace",
includedList: []string{"test-namespace"},
expectedResult: true,
Expand Down
2 changes: 1 addition & 1 deletion tests/framework/nexus/api/policy/policy.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/framework/nexus/api/policy/policy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ message Asset {
string runtime = 38;
// Asset FQDN, when present
string fqdn = 39;
// ManagedBy for clients to "claim" responsbility for asset
// ManagedBy for clients to "claim" responsibility for asset
string managed_by = 40;
}

Expand Down

0 comments on commit 4be8a29

Please sign in to comment.