Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions DEV-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@

After cloning the repository, set up the pre-commit hook by running the following commands:

`git config --unset core.hooksPath`
To reset the hooks config to git default
First, reset the hooks config to git default:

```sh
git config --unset core.hooksPath
```

Then create and configure the pre-commit hook:

```sh
touch .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
echo '#!/bin/sh\nnode scripts/check-changes.js' > .git/hooks/pre-commit
echo '#!/bin/sh\nnode scripts/check-changes.js' > .git/hooks/pre-commit
```

This hook will run checks before each commit to ensure code quality.
6 changes: 5 additions & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Development
In order to develop Solhint, you'll need:

- [Git](https://git-scm.com/)
- [Node.js](https://nodejs.org/)
- [Node.js](https://nodejs.org/) (version 20 or higher)

### Getting Started

Expand Down Expand Up @@ -48,6 +48,10 @@ passing. If you contribute with a new feature, please add tests for it. To run t

$ npm test

### Setting up Git Hooks

For information on setting up pre-commit hooks, please refer to [DEV-README.md](../DEV-README.md).

Pull Requests
-------------

Expand Down