Skip to content

Commit

Permalink
Merge pull request #31 from smucclaw/tweak-readme
Browse files Browse the repository at this point in the history
README.md: Clarify the pre-commit stuff more
  • Loading branch information
ym-han authored Jun 1, 2024
2 parents bbfaf17 + 402b604 commit ab720a4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ To see what it'll look like, locally: Build the docs site with `mkdocs build`; s

I recommend using [this extension for Markdown linting](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint).

### Pre-commit
### Using pre-commit locally

Using `pre-commit` locally is usually faster than waiting for the GH workflow.

#### To install locally

Expand All @@ -35,22 +37,21 @@ brew install pre-commit

# navigate to this repo
cd internal_docs
# install the git hook scripts
# install the git hook scripts. pre-commit will now run on every commit.
pre-commit install
pre-commit autoupdate # bring the hooks to the latest tag on the default branch
```

> Every time you clone a project using pre-commit, running `pre-commit install` should always be the first thing you do.
See docs at [https://pre-commit.com/](https://pre-commit.com/) for more info.

#### Then, to run the hooks against the files locally
#### To manually run all pre-commit hooks against the files locally

```bash
pre-commit run --all-files
```

This is usually faster than waiting for the GH workflow.

### Why pre commit and markdown linting

Yongming noticed that parts of the site weren't rendering properly because the markdown was not valid. Using precommit and markdown linting should help with that.
Expand Down

0 comments on commit ab720a4

Please # to comment.