diff --git a/.vale.ini b/.vale.ini index e836f6ab..e37d5e03 100644 --- a/.vale.ini +++ b/.vale.ini @@ -9,3 +9,4 @@ mdx = md [*.md] BasedOnStyles = Vale, Flanksource, alex +Vale.Spelling=no diff --git a/canary-checker/docs/scripting/gotemplate.mdx b/canary-checker/docs/scripting/gotemplate.mdx index 98b4603d..3fcdf165 100644 --- a/canary-checker/docs/scripting/gotemplate.mdx +++ b/canary-checker/docs/scripting/gotemplate.mdx @@ -172,7 +172,7 @@ See also [`coll.Keys`](#keys). Append a value to the end of a list. -_Note that this function does not change the given list; it always produces a new one._ +_this function does not change the given list; it always produces a new one._ ```go {{ slice 1 1 2 3 | append 5 }} // [1 1 2 3 5] @@ -182,7 +182,7 @@ _Note that this function does not change the given list; it always produces a ne Prepend a value to the beginning of a list. -_Note that this function does not change the given list; it always produces a new one._ +_this function does not change the given list; it always produces a new one._ ```go {{ slice 4 3 2 1 | prepend 5 }} // [5 4 3 2 1] @@ -192,7 +192,7 @@ _Note that this function does not change the given list; it always produces a ne Remove any duplicate values from the list, without changing order. -_Note that this function does not change the given list; it always produces a new one._ +_this function does not change the given list; it always produces a new one._ ```go {{ slice 1 2 3 2 3 4 1 5 | uniq }} // [1 2 3 4 5] @@ -202,7 +202,7 @@ _Note that this function does not change the given list; it always produces a ne Flatten a nested list. Defaults to completely flattening all nested lists, but can be limited with `depth`. -_Note that this function does not change the given list; it always produces a new one._ +_this function does not change the given list; it always produces a new one._ ```go {{ "[[1,2],[],[[3,4],[[[5],6],7]]]" | jsonArray | flatten }} // [1 2 3 4 5 6 7] @@ -213,7 +213,7 @@ _Note that this function does not change the given list; it always produces a ne Reverse a list. -_Note that this function does not change the given list; it always produces a new one._ +_this function does not change the given list; it always produces a new one._ ```go {{ slice 4 3 2 1 | reverse }} // [1 2 3 4] @@ -225,7 +225,7 @@ Sort a given list. Uses the natural sort order if possible. For inputs that are Maps and structs can be sorted by a named key. -_Note that this function does not modify the input._ +_this function does not modify the input._ ```go {{ slice "foo" "bar" "baz" | coll.Sort }} // [bar baz foo] @@ -240,7 +240,7 @@ _Note that this function does not modify the input._ Merge maps together by overriding src with dst. In other words, the src map can be configured the "default" map, whereas the dst map can be configured the "overrides". Many source maps can be provided. Precedence is in left-to-right order. -_Note that this function does not modify the input._ +_this function does not modify the input._ ```go {{ $default := dict "foo" 1 "bar" 2}} @@ -264,7 +264,7 @@ _Note that this function does not modify the input._ Given a map, returns a new map with any entries that have the given keys. All keys are converted to strings. -_Note that this function does not modify the input._ +_this function does not modify the input._ ```go {{ $data := dict "foo" 1 "bar" 2 "baz" 3 }} @@ -280,7 +280,7 @@ Given a map, returns a new map without any entries that have the given keys. All keys are converted to strings. -_Note that this function does not modify the input._ +_this function does not modify the input._ ```go {{ $data := dict "foo" 1 "bar" 2 "baz" 3 }} @@ -307,7 +307,7 @@ Converts a true-ish string to a boolean. Can be used to simplify conditional sta Provides a default value given an empty input. Empty inputs are `0` for numeric types, `""` for strings, `false` for booleans, empty arrays/maps, and `nil`. -Note that this will not provide a default for the case where the input is undefined (i.e. referencing things like `.foo` where there is no `foo` field of `.`), but [`conv.Has`](#has) can be used for that. +this will not provide a default for the case where the input is undefined (i.e. referencing things like `.foo` where there is no `foo` field of `.`), but [`conv.Has`](#has) can be used for that. ```go {{ "" | default "foo" }} // foo @@ -852,7 +852,7 @@ A wrapper for Go's [`filepath.VolumeName`](https://golang.org/pkg/path/filepath/ ## math -Returns the absolute value of a given number. When the input is an integer, the result will be an `int64`, otherwise it will be a `float64`. +Returns the absolute value of a given number. When the input is an integer, the result is `int64`, otherwise it will be a `float64`. ```go {{ math.Abs -3.5 }} {{ math.Abs 3.5 }} {{ math.Abs -42 }} // 3.5 3.5 42 @@ -860,7 +860,7 @@ Returns the absolute value of a given number. When the input is an integer, the ### Add -Adds all given operators. When one of the inputs is a floating-point number, the result will be a `float64`, otherwise it will be an `int64`. +Adds all given operators. When one of the inputs is a floating-point number, the result will be a `float64`, otherwise it is `int64`. ```go {{ math.Add 1 2 3 4 }} {{ math.Add 1.5 2 3 }} // 10 6.5 @@ -1010,7 +1010,7 @@ Returns the nearest integer, rounding half away from zero. ### Seq Return a sequence from `start` to `end`, in steps of `step`. Can handle counting down as well as up, including with negative numbers. -Note that the sequence _may_ not end at `end`, if `end` is not divisible by `step`. +the sequence _may_ not end at `end`, if `end` is not divisible by `step`. ```go {{ range (math.Seq 5) }}{{.}} {{end}} // 1 2 3 4 5 @@ -1019,7 +1019,7 @@ Note that the sequence _may_ not end at `end`, if `end` is not divisible by `ste ### Sub -Subtract the second from the first of the given operators. When one of the inputs is a floating-point number, the result will be a `float64`, otherwise it will be an `int64`. +Subtract the second from the first of the given operators. When one of the inputs is a floating-point number, the result is a `float64`, otherwise it is `int64`. ```go {{ math.Sub 3 1 }} // 2 @@ -1164,7 +1164,7 @@ Pick an element at a random from a given slice or array. Pick a random integer. By default, a number between `0` and `100` (inclusive) is chosen, but this range can be overridden. -Note that the difference between `min` and `max` can not be larger than a 63-bit integer (i.e. the unsigned portion of a 64-bit signed integer). The result is given as an `int64`. +the difference between `min` and `max` can not be larger than a 63-bit integer (i.e. the unsigned portion of a 64-bit signed integer). The result is given as an `int64`. ```go {{ random.Number }} // 55 @@ -1734,7 +1734,7 @@ See also [`test.IsKind`](#iskind) ### ternary -Returns one of two values depending on whether the third is true. Note that the third value does not have to be a boolean - it is converted first by the [`conv.ToBool`](#tobool) function (values like `true`, `1`, `"true"`, `"Yes"`, etc... are considered true). +Returns one of two values depending on whether the third is true. the third value does not have to be a boolean - it is converted first by the [`conv.ToBool`](#tobool) function (values like `true`, `1`, `"true"`, `"Yes"`, etc... are considered true). This is effectively a short-form of the following template: @@ -1848,7 +1848,7 @@ It is shorthand for `time.Now.Sub t`. ### Unix -Returns the local `Time` corresponding to the given Unix time, in seconds since January 1, 1970 UTC. Note that fractional seconds can be used to denote milliseconds, but must be specified as a string, not a floating point number. +Returns the local `Time` corresponding to the given Unix time, in seconds since January 1, 1970 UTC. fractional seconds can be used to denote milliseconds, but must be specified as a string, not a floating point number. _with whole seconds:_ diff --git a/canary-checker/docs/windows.md b/canary-checker/docs/windows.md index cb7f9a5e..97ff8f57 100644 --- a/canary-checker/docs/windows.md +++ b/canary-checker/docs/windows.md @@ -9,18 +9,18 @@ Installing Canary Checker as a Windows service. ## 1. Check prerequisites -In order to run Canary Checker on windows please ensure the following +To run Canary Checker on windows please ensure the following 1. Your Windows machine has access to the internet, if not you can copy the [Powershell Install Script](https://link-url-here.org) , the [Canary Checker Executable](https://link-url-here.org) and the [NSSM tool](https://nssm.cc/release/nssm-2.24.zip) to a local folder. -2. You must be able to execute the powershell install script as a local administrator -3. Canary Checker uses an embedded Postgress DB which requires [Microsoft Visual C++ 2015-2022 Redistributable (x64) - 14.38.33130](https://www.microsoft.com/en-us/Download/confirmation.aspx?id=52685) +2. You must be able to run the powershell install script as a local administrator +3. Canary Checker uses an embedded Postgres DB which requires [Microsoft Visual C++ 2015-2022 Redistributable (x64) - 14.38.33130](https://www.microsoft.com/en-us/Download/confirmation.aspx?id=52685) 4. Canary checker uses port 8080 (can be changed) for the HTTP API and port 6432 for the embedded postgresql server , ensure these ports are free ## 2. Downloading required files -You only need the powershell script below(assuming internet connectivity). Simply place it in the folder you wish to install Canary Checker in. +You only need the powershell script below(assuming internet connectivity), place it in the folder you wish to install Canary Checker in. ```powershell [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 @@ -29,7 +29,7 @@ Invoke-WebRequest -Uri https://github.com/flanksource/canary-checker/blob/master ### (Optional) -If you require a [specific version of Canary Checker](https://github.com/flanksource/canary-checker/releases) or want to build your own to test, simply place the executable in the same folder as the required powershell script above. Otherwise, the powershell install script will simply download the latest release. +If you require a [specific version of Canary Checker](https://github.com/flanksource/canary-checker/releases) or want to build your own to test, place the executable in the same folder as the required powershell script above. Otherwise, the powershell install script will download the latest release. ## 3. Create a canary @@ -56,6 +56,7 @@ To test our canary config without installing it, use the below ``` ## 4. Install Canary Checker as a service + The powershell install script is able to download all requirements , if the windows machine does not have internet access you will need to manually download the [prerequisites](/##-1.-check-prerequisites) and place them in the script folder. ``` @@ -64,4 +65,4 @@ The powershell install script is able to download all requirements , if the wind Note: Add `-httpPort 8081` to change http port (default is 8080) -Note: You can use the ```-operation uninstall``` to remove the service Or ```-operation reinstall``` to overwrite an exiting install +Note: You can use the `-operation uninstall` to remove the service Or `-operation reinstall` to overwrite an exiting install diff --git a/mission-control/docs/partials/_gotemplate.md b/mission-control/docs/partials/_gotemplate.md index d2379e63..dd93358f 100644 --- a/mission-control/docs/partials/_gotemplate.md +++ b/mission-control/docs/partials/_gotemplate.md @@ -4,10 +4,10 @@ Use a shebang (`#!`) line to choose a different shell (`python`, `bash` and `pws ```yaml exec: - script: | - //highlight-next-line - #! pwsh - Get-Items | ConvertTo-JSON + script: | + //highlight-next-line + #! pwsh + Get-Items | ConvertTo-JSON ``` @@ -29,6 +29,7 @@ Alternatively [change the templating delimiters](#changing-templating-delimiters If you are using a YAML multiline string use `|` and not `>` which will strip newlines Instead of: + ```yaml exec: //highlight-next-line @@ -36,7 +37,9 @@ exec: #! pwsh Get-Items | ConvertTo-JSON ``` + Do this: + ```yaml exec: //highlight-next-line @@ -44,8 +47,8 @@ exec: #! pwsh Get-Items | ConvertTo-JSON ``` - +
@@ -61,4 +64,5 @@ exec: Write-Host "{{ $message }}" Write-Host @{ Number = 1; Shape = "Square"; Color = "Blue"} | ConvertTo-JSON ``` +
diff --git a/styles/Flanksource/Units.yml b/styles/Flanksource/Units.yml deleted file mode 100644 index eba568c5..00000000 --- a/styles/Flanksource/Units.yml +++ /dev/null @@ -1,16 +0,0 @@ -extends: existence -message: "Don't spell out the number in '%s'." -link: https://docs.digitalocean.com/style/digitalocean/grammar/numbers -level: error -raw: - - '[a-zA-Z]+\s' -tokens: - - '(?:centi|milli)?meters' - - '(?:kilo)?grams' - - '(?:kilo)?meters' - - '(?:mega)?pixels' - - cm - - inches - - lb - - miles - - pounds diff --git a/styles/Strict/DictateFeelings.yml b/styles/Strict/DictateFeelings.yml deleted file mode 100644 index 4b874edc..00000000 --- a/styles/Strict/DictateFeelings.yml +++ /dev/null @@ -1,17 +0,0 @@ -extends: existence -message: "Don't tell people how they feel with words like '%s'." -link: https://docs.digitalocean.com/style/pdocs/tone#empathize-with-the-reader -ignorecase: false -level: error -action: - name: remove -tokens: - - '[Ee]asy' - - simple - - '[Jj]ust' - - '[Oo]bvious(ly)?' - - '[Ss]imply' - - '[Ee]as(y|ily)' - - '[Oo]f course' - - '[Cc]learly' - - '[Ee]veryone knows' diff --git a/styles/Strict/FutureTense.yml b/styles/Strict/FutureTense.yml deleted file mode 100644 index 01ce8612..00000000 --- a/styles/Strict/FutureTense.yml +++ /dev/null @@ -1,13 +0,0 @@ -extends: existence -message: "Use present tense verbs, not future tense verbs like '%s'. Say '(event) happens' instead of '(event) will happen'." -link: https://docs.digitalocean.com/style/digitalocean/language/verbs -ignorecase: true -level: error -action: - name: remove -tokens: -- will -- shall -- won't -- shan't -- "[A-Za-z]*'ll" diff --git a/styles/Strict/SpaceAfterPeriod.yml b/styles/Strict/SpaceAfterPeriod.yml deleted file mode 100644 index 3ce2eb39..00000000 --- a/styles/Strict/SpaceAfterPeriod.yml +++ /dev/null @@ -1,8 +0,0 @@ -extends: existence -message: "Use one space after periods ('%s')." -link: https://docs.digitalocean.com/style/digitalocean/grammar/periods -level: warning -nonword: true -tokens: - - "[A-Z]?[a-z]+[.?!] {2,}[A-Z][a-z]*" - - "[A-Z]?[a-z]+[.?!][A-Z][a-z]*" diff --git a/styles/ignore/words-with-suggestions.txt b/styles/ignore/words-with-suggestions.txt index 0e6659ad..cc1be9a4 100644 --- a/styles/ignore/words-with-suggestions.txt +++ b/styles/ignore/words-with-suggestions.txt @@ -1,57 +1,172 @@ +agent_id +arn +aws +basepath +bool +boolean +check_id +Shoutrrr Cloudways +component_id +config +config_id +configmap +configs +Rocketchat +jmeter +kubectl +arkade +parent_id +yq +containerd +anyOf +prepends +urlPart +fromAddress +insecure_tls +javascript +expr +tls +hostname +Shoutrrr +splitLines +colorError +colorInfo +titleKey +colorWarn +messageKey +providesApis +consumesApis +topology_id +Filepath +dsq +contentType +correctly? +cpu +CRDs +created_by +cron +Cron +Crossplane +crypto +csv +csv cyberattack cyberattacker cyberattacks +Datadog datapoint datapoints datatype datatypes +Dependabot +dependsOn Digitalocean +dst +Dynatrace +enum +env +envvar +envvar +exists_one +Flanksource +Github +Gitops +gojq +golang +gomplate +gomplate +Gotify +Grafana +http +https +https hyperthread hyperthreaded hyperthreading hyperthreads +Javascript +jq +jq +json +jsonArray +jsonpath +JSONPath +JUnit keypair keypairs knowledgebase knowledgebases +kubernetes +le +lookups +lt mailserver mailservers +Mattermost +maxWidth +metacharacters +millicores +Mul multi-cloud multicore nameserver nameservers +namespace +namespaced nginx nginx's +Ntfy +OAuth +orValue pageview pageviews +playbook_id +postgres +powershell +Powershell +prometheus +protobuf pulldown +Pushbullet ratelimit ratelimited ratelimiting ratelimits +readonly ruleset +Semver +snake_case +squote +src +subcomponentOf +substring +substring +substrings +Svix +templatable +templated timeframe timeframes timeseries timeslot timeslots +toml +tooltip +Trunc +uniq +url +url +urldecode +urlencode +uuid walkthrough walkthroughs webpage webpages webserver webservers -Semver -substring -csv -crypto -jq -src -dst -uniq -bool -url yaml -toml -JSONPath +yamlArray +YAMLArray +Zulip