Skip to content

Commit 0f0b307

Browse files
committed
Simplify CONTRIBUTING.md
1 parent a0e7ce0 commit 0f0b307

File tree

1 file changed

+6
-26
lines changed

1 file changed

+6
-26
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
Hi there! Welcome to the tilesets-cli contributing document. Issues, comments, and pull requests are welcome. Please tag @mapbox/maps-api for any questions or reviews.
44

55
## Installation
6+
67
First, clone the repo and `cd` into the folder:
7-
```shell
8+
9+
```bash
810
# clone
911
git clone [email protected]:mapbox/tilesets-cli.git
1012
cd tilesets-cli
@@ -21,36 +23,14 @@ tilesets --version
2123
```
2224

2325
## Pre-commit hooks
26+
2427
We use [pre-commit hooks](https://pre-commit.com/) to auto-format and validate code before committing. `pre-commit` is included with the `[test]` extras, but you must run:
25-
```
28+
29+
```bash
2630
$ pre-commit install
2731
```
2832
within the repo to have the actions specified in `.pre-commit-config.yaml` registered.
2933

30-
After this, when committing, you'll see:
31-
```
32-
git commit -m 'update version'
33-
black....................................................................Passed
34-
Flake8...................................................................Passed
35-
```
36-
If your pre-commit hooks ran successfully. Note that `black` modifies your code, which means that if there is a syntax error you'll first see something like:
37-
```
38-
git commit -m '{message}'
39-
black....................................................................Failed
40-
hookid: black
41-
42-
Files were modified by this hook. Additional output:
43-
44-
reformatted this/file/was/reformatted.py
45-
All done! ✨ 🍰 ✨
46-
1 file reformatted.
47-
48-
Flake8...................................................................Failed
49-
hookid: flake8
50-
51-
this/file/was/reformatted.py:{line}:{character}: {what was incorrect}
52-
```
53-
After which you can add these changes and commit again. Note that failing pre-commit commands mean that the commit has not taken place: you must commit again!
5434

5535
## Release process
5636

0 commit comments

Comments
 (0)