Skip to content

Commit c607a6d

Browse files
authored
chore: pre-commit updates (#1665)
Add a workflow that runs the pre-commit jobs to cover the case where a developer hasn't opted into pre-commit. Also add the conventional commit message hook and enable more golang linters. The commits also tidies up the markdown files that had line length issues. Signed-off-by: Maryam Tahhan <[email protected]>
1 parent 859d9bf commit c607a6d

File tree

6 files changed

+27
-5
lines changed

6 files changed

+27
-5
lines changed

.commitlintrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = { extends: ['@commitlint/config-conventional'] };

.github/workflows/pre-commit.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: pre-commit
2+
3+
on: # yamllint disable-line rule:truthy
4+
pull_request:
5+
6+
jobs:
7+
pre-commit:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- uses: actions/setup-python@v3
12+
- uses: pre-commit/[email protected]

.pre-commit-config.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,10 @@ repos:
3131
rev: v1.59.1
3232
hooks:
3333
- id: golangci-lint
34+
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
35+
rev: v9.16.0
36+
hooks:
37+
- id: commitlint
38+
stages: [commit-msg]
39+
additional_dependencies: ['@commitlint/config-conventional'] # yamllint disable-line rule:quoted-strings
3440
exclude: ^vendor/.*|^_output/.*|^bpf/include/.*|^local-dev-cluster/.*

e2e/tools/validator/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ pip install .
3030

3131
- Configure and Generate `validator.yaml` file
3232

33-
- Create the `validator.yaml` file based on the [validator.yaml.sample](validator.yaml.sample) template provided.
33+
- Create the `validator.yaml` file based on the
34+
[validator.yaml.sample](validator.yaml.sample) template provided.
3435
- Adjust the configuration according to your environment and requirements.
3536

3637
- Run the validator

manifests/compose/validation/README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ target deploys the following
3232

3333
### Usage
3434

35-
To allow access to the VM from the Prometheus container running on the host, `virt-net` must be created using the following command:
35+
To allow access to the VM from the Prometheus container running on the host,
36+
`virt-net` must be created using the following command:
3637

3738
- Check the Virtual Bridge Interface:
3839

@@ -44,15 +45,17 @@ To allow access to the VM from the Prometheus container running on the host, `vi
4445

4546
- Create the Docker Network:
4647

47-
Use the `inet` address from the previous step to create the Docker Network with `macvlan` driver. Replace `<subnet>` with appropriate value.
48+
Use the `inet` address from the previous step to create the Docker Network with
49+
`macvlan` driver. Replace `<subnet>` with appropriate value.
4850

4951
```sh
5052
docker network create --driver=macvlan --subnet=<subnet>/24 -o parent=virbr0 virt-net
5153
```
5254

5355
- Start the Services:
5456

55-
Navigate to appropriate directory, set the `VM_IP` environment variable, and bring up the services:
57+
Navigate to appropriate directory, set the `VM_IP` environment variable, and bring
58+
up the services:
5659

5760
```sh
5861
cd manifests/compose/validation/metal

manifests/compose/validation/dockerfiles/Dockerfile.scaphandre

-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ FROM hubblo/scaphandre:latest
33

44
# Install only curl
55
RUN apt-get update && apt-get install -y curl
6-

0 commit comments

Comments
 (0)