Skip to content

Commit baab685

Browse files
committed
Added pre-commit
Signed-off-by: Mario Loriedo <[email protected]>
1 parent 54fe1e0 commit baab685

File tree

4 files changed

+37
-5
lines changed

4 files changed

+37
-5
lines changed

.github/workflows/pre-commit.yml

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

.pre-commit-config.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
exclude: ^vendor/|^test/tools/vendor/
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks.git
5+
rev: v3.4.0
6+
hooks:
7+
- id: end-of-file-fixer
8+
- id: trailing-whitespace
9+
- id: mixed-line-ending
10+
- id: check-byte-order-marker
11+
- id: check-executables-have-shebangs
12+
- id: check-merge-conflict
13+
- id: check-yaml
14+
- repo: https://github.com/codespell-project/codespell
15+
rev: v2.3.0
16+
hooks:
17+
- id: codespell
18+
exclude: go.sum

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ the target process as they run in separate containers.
4545

4646
#### Delete the debugging Pod
4747

48-
Delete the `DevWorkspace` Custom resource to stop the debugging session and cleanup the Kubernetes resources created by
48+
Delete the `DevWorkspace` Custom resource to stop the debugging session and cleanup the Kubernetes resources created by
4949
`kubectl debug-id`:
5050

5151
```bash
5252
TARGET_POD="outyet"
53-
kubectl delete ${TARGET_POD}-dw
53+
kubectl delete ${TARGET_POD}-dw
5454
```
5555

5656
:mega: `kubectl delete pod` doesn't work, the DevWorkspace Operator restarts the Pod.
@@ -64,7 +64,7 @@ Building (and currently installing too) requires [Go](https://go.dev/dl/).
6464

6565
## Installation
6666

67-
To install `kubectl debug-ide` clone this git repository and run `go install`:
67+
To install `kubectl debug-ide` clone this git repository and run `go install`:
6868

6969
```sh
7070
$ go install cmd/kubectl-debug_ide.go
@@ -88,5 +88,5 @@ You can "uninstall" this plugin from kubectl by simply removing it from your PAT
8888
The awesome [sample-cli-plugin](https://github.com/kubernetes/sample-cli-plugin) was used to kick off this plugin.
8989

9090
`kubectl debug-ide` is just a generator of DevWorkspace Custom Resources. The heavy lifting, the Cloud Development
91-
Environment provisioning, is done by the [DevWorkspace Operator](https://github.com/devfile/devworkspace-operator)
91+
Environment provisioning, is done by the [DevWorkspace Operator](https://github.com/devfile/devworkspace-operator)
9292
:heart:. Go check it out!

pkg/debug-ide.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ func (o *DebugIDEOptions) Run() error {
307307
// Convert the DevWorkspace to an Unstructured
308308
obj, err := runtime.DefaultUnstructuredConverter.ToUnstructured(&dw)
309309
if err != nil {
310-
return fmt.Errorf("found error while coverting resource to unstructured err - %v", err)
310+
return fmt.Errorf("found error while converting resource to unstructured err - %v", err)
311311
}
312312
unstructuredResource := &unstructured.Unstructured{Object: obj}
313313

0 commit comments

Comments
 (0)