You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+21-3Lines changed: 21 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
7
- Node.js v20 or later
8
8
- npm v8 or later
9
9
- Git
10
+
- Go 1.21 or later (for CLI development)
10
11
11
12
### Installation
12
13
@@ -21,11 +22,17 @@
21
22
npm install
22
23
```
23
24
24
-
3. Set up Git hooks (optional):
25
+
3. Set up Git hooks (recommended):
25
26
```bash
26
27
npm run precommit
27
28
```
28
29
30
+
4. If working on the Go CLI, set up the Go environment:
31
+
```bash
32
+
cd tools/cli
33
+
make setup
34
+
```
35
+
29
36
This will install Husky, which manages Git hooks for the project. The hooks ensure code quality by automatically running various checks before commits.
30
37
31
38
## Development Workflow
@@ -34,17 +41,28 @@ This will install Husky, which manages Git hooks for the project. The hooks ensu
34
41
35
42
This project uses the following Git hooks:
36
43
37
-
-**pre-commit**: Automatically formats your code using Prettier and runs tests for staged JavaScript files to ensure code quality before each commit.
44
+
-**pre-commit**:
45
+
- Automatically formats your code using Prettier and runs tests for staged JavaScript files
38
46
- If you get the message `hint: The '.husky/pre-commit' hook was ignored because it's not set as executable.` during the commit, you can run `chmod ug+x .husky/*` to make it executable.
47
+
- For Go files, runs formatting, linting, and tests using the project's Makefile
39
48
40
49
### Available Scripts
41
50
51
+
#### JavaScript/Node.js
42
52
-`npm run format` - Format all files with Prettier
43
53
-`npm run format-check` - Check formatting without modifying files
44
54
-`npm run lint-js` - Lint JavaScript files
45
55
-`npm run test` - Run all tests
46
56
47
57
#### IPA specific targets
48
-
49
58
-`npm run gen-ipa-docs` - Generate IPA ruleset documentation (see `./tools` folder for more information)
50
59
-`npm run ipa-validation` - Run OpenAPI validation with Spectral
0 commit comments