Skip to content

Commit 533f4cf

Browse files
Vale for prose checking (nhs-england-tools#135)
<!-- markdownlint-disable-next-line first-line-heading --> ## Description [Vale](https://vale.sh/) is a tool for performing a certain set of style checks, which this PR introduces for markdown files only. Vale can scan code comments, but as an initial validation we should limit the scope. WIP for the moment while I sort out github action integration. ## Context We want to be sure that our documentation is consistent and readable. ## Type of changes - [ ] Refactoring (non-breaking change) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would change existing functionality) - [ ] Bug fix (non-breaking change which fixes an issue) ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [x] I am familiar with the [contributing guidelines](../docs/CONTRIBUTING.md) - [x] I have followed the code style of the project - [ ] I have added tests to cover my changes - [x] I have updated the documentation accordingly - [ ] This PR is a result of pair or mob programming --- ## Sensitive Information Declaration To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including [PII (Personal Identifiable Information) / PID (Personal Identifiable Data)](https://digital.nhs.uk/data-and-information/keeping-data-safe-and-benefitting-the-public) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter. - [x] I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes. --------- Co-authored-by: Dan Stefaniuk <[email protected]>
1 parent c869280 commit 533f4cf

22 files changed

+203
-63
lines changed

.github/SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ You can report vulnerabilities here: [https://www.ncsc.gov.uk/information/vulner
3232

3333
## General Security Enquiries
3434

35-
If you have general enquiries regarding our cyber security, please reach out to us at [[email protected]]([email protected])
35+
If you have general enquiries regarding our cybersecurity, please reach out to us at [[email protected]]([email protected])
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: "Check English usage"
2+
description: "Check English usage"
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: "Check English usage"
7+
shell: bash
8+
run: |
9+
check=branch ./scripts/githooks/check-english-usage.sh

.github/workflows/stage-1-commit.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,17 @@ jobs:
6666
fetch-depth: 0 # Full history is needed to compare branches
6767
- name: "Check markdown format"
6868
uses: ./.github/actions/check-markdown-format
69+
lint-prose:
70+
name: "Check English usage"
71+
runs-on: ubuntu-latest
72+
timeout-minutes: 2
73+
steps:
74+
- name: "Checkout code"
75+
uses: actions/checkout@v4
76+
with:
77+
fetch-depth: 0 # Full history is needed to compare branches
78+
- name: "Check English usage"
79+
uses: ./.github/actions/lint-prose
6980
lint-terraform:
7081
name: "Lint Terraform"
7182
runs-on: ubuntu-latest

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ cd nhs-england-tools/repository-template
4545

4646
The following software packages, or their equivalents, are expected to be installed and configured:
4747

48-
- [docker](https://www.docker.com/) container runtime or a compatible tool, e.g. [podman](https://podman.io/),
48+
- [Docker](https://www.docker.com/) container runtime or a compatible tool, e.g. [Podman](https://podman.io/),
4949
- [asdf](https://asdf-vm.com/) version manager,
5050
- [GNU make](https://www.gnu.org/software/make/) 3.82 or later,
5151
- [GNU coreutils](https://www.gnu.org/software/coreutils/) and [GNU binutils](https://www.gnu.org/software/binutils/) may be required to build dependencies like Python, which may need to be compiled during installation. For macOS users, this has been scripted and automated by the `dotfiles` project; please see this [script](https://github.com/nhs-england-tools/dotfiles/blob/main/assets/20-install-base-packages.macos.sh) for details,
5252
- [Python](https://www.python.org/) required to run Git hooks,
53-
- [jq](https://jqlang.github.io/jq/) a lightweight and flexible command-line JSON processor.
53+
- [`jq`](https://jqlang.github.io/jq/) a lightweight and flexible command-line JSON processor.
5454

5555
> [!NOTE]<br>
56-
> The version of GNU make available by default on macOS is earlier than 3.82. You will need to upgrade it or certain `make` tasks will fail. On macOS, you will need [homebrew](https://brew.sh/) installed, then to install `make`, like so:
56+
> The version of GNU make available by default on macOS is earlier than 3.82. You will need to upgrade it or certain `make` tasks will fail. On macOS, you will need [Homebrew](https://brew.sh/) installed, then to install `make`, like so:
5757
>
5858
> ```shell
5959
> brew install make

docs/adr/ADR-001_Use_git_hook_and_GitHub_action_to_check_the_editorconfig_compliance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ This option is an extension built upon option 2a.
106106
- Pros
107107
- Usage of a GitHub native functionality
108108
- Cons
109-
- Reliance on the GitHub DSL (coding in yaml) may lead to less portable solution
109+
- Reliance on the GitHub DSL (coding in YAML) may lead to less portable solution
110110
- Implementation of the functionality has to be duplicated for the git hook
111111

112112
### Outcome

docs/adr/ADR-002_Scan_repository_for_hardcoded_secrets.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ADR-002: Scan repository for hardcoded secrets
1+
# ADR-002: Scan repository for hard-coded secrets
22

33
>| | |
44
>| ------------ | ------------------------------------------------------------- |
@@ -10,7 +10,7 @@
1010
1111
---
1212

13-
- [ADR-002: Scan repository for hardcoded secrets](#adr-002-scan-repository-for-hardcoded-secrets)
13+
- [ADR-002: Scan repository for hard-coded secrets](#adr-002-scan-repository-for-hard-coded-secrets)
1414
- [Context](#context)
1515
- [Decision](#decision)
1616
- [Assumptions](#assumptions)
@@ -42,7 +42,7 @@ Within NHS England, we are observing an adoption of the `gitleaks` tool, which i
4242

4343
There are three options presented in this decision record.
4444

45-
1. [git-secrets](https://github.com/awslabs/git-secrets)
45+
1. [Git-secrets](https://github.com/awslabs/git-secrets)
4646

4747
- Repository metadata
4848
- Contributions
@@ -66,9 +66,9 @@ There are three options presented in this decision record.
6666
- Cons
6767
- Rules and exclusion patterns are not easy to manage as no comments or metadata are allowed in the definition
6868
- No pre-backed Docker image
69-
- Activity of the repo has dropped (last commit a while ago)
69+
- Activity of the repository has dropped (last commit a while ago)
7070

71-
2. [trufflehog](https://github.com/trufflesecurity/trufflehog)
71+
2. [Trufflehog](https://github.com/trufflesecurity/trufflehog)
7272

7373
- Repository metadata
7474
- Contributions
@@ -93,7 +93,7 @@ There are three options presented in this decision record.
9393
- Cons
9494
- [AGPL-3.0](https://choosealicense.com/licenses/agpl-3.0/) licence comes with conditions
9595

96-
3. [gitleaks](https://github.com/gitleaks/gitleaks)
96+
3. [Gitleaks](https://github.com/gitleaks/gitleaks)
9797

9898
- Repository metadata
9999

docs/adr/ADR-XXX_Agree_CICD_pipeline_structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Requirements:
5555

5656
### Assumptions
5757

58-
Summarise the underlying assumptions in the environment in which you make the decision. This could be related to technology changes, forecast of the monetary and non-monetary costs, further delivery commitments, impactful external drivers etc., and any known unknowns that translate to risks.
58+
Summarise the underlying assumptions in the environment in which you make the decision. This could be related to technology changes, forecast of the monetary and non-monetary costs, further delivery commitments, impact from external drivers etc., and any known unknowns that translate to risks.
5959

6060
### Drivers
6161

docs/adr/ADR-nnn_Any_Decision_Record_Template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Describe the context and the problem statement. Is there a relationship to other
3232

3333
### Assumptions
3434

35-
Summarise the underlying assumptions in the environment in which you make the decision. This could be related to technology changes, forecast of the monetary and non-monetary costs, further delivery commitments, impactful external drivers etc., and any known unknowns that translate to risks.
35+
Summarise the underlying assumptions in the environment in which you make the decision. This could be related to technology changes, forecast of the monetary and non-monetary costs, further delivery commitments, impact from external drivers etc., and any known unknowns that translate to risks.
3636

3737
### Drivers
3838

docs/adr/assets/ADR-003/examples/nodejs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ $ yarn start
2626
...
2727
```
2828
29-
See the [example (main.ts)](./main.ts) implementation. This script has been written to illustrate the concept in a clear and simple way. It is not a production ready code.
29+
See the [example (`main.ts`)](./main.ts) implementation. This script has been written to illustrate the concept in a clear and simple way. It is not a production ready code.

docs/developer-guides/Bash_and_Make.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ VERBOSE=1 scripts/shellscript-linter.sh
140140
141141
### Scripts
142142
143-
Most scripts provided with this repository template can utilise tools installed on your `PATH` if they are available or run them from within a Docker container. To force a script to use Docker, the `FORCE_USE_DOCKER` variable is provided. This feature increases configurability of the development environment, allowing you to use custom tooling by default if present on the command-line path. Here is an example of how to use it:
143+
Most scripts provided with this repository template can use tools installed on your `PATH` if they are available or run them from within a Docker container. To force a script to use Docker, the `FORCE_USE_DOCKER` variable is provided. This feature allows you to use custom tooling if it is present on the command-line path. Here is how to use it:
144144
145145
```shell
146146
FORCE_USE_DOCKER=1 scripts/shellscript-linter.sh

0 commit comments

Comments
 (0)