# pre-commit

## **What is pre-commit?**

[Pre-commit](https://pre-commit.com/) is a tool that checks your code before you commit it to your repository. Think of it as a friendly assistant that reviews your code and helps catch common mistakes before they become part of your project.

**Why should I use it?**

* Catches mistakes early (before they get into your codebase)
* Keeps code style consistent across your team
* Only checks files you've changed, saving time
* Works with many programming languages
* Easy to set up and share with your team
* Stops commits if it finds problems, helping maintain quality

## Key concept

**Checks (Hooks)**\
Pre-commit runs checks on your code before each commit. Common checks include:

* Fixing code formatting
* Finding potential errors
* Checking for security issues
* Making sure files aren't too large
* Looking for common mistakes

## **Setup**

All the checks are listed in a simple configuration file `.pre-commit-config.yaml` at the root of your project . You can choose which checks you want to run and how they should work.

### **Running**

Once set up, pre-commit automatically runs whenever you try to commit code. It will:

* Look at the files you've changed
* Run your chosen checks
* Either allow the commit (if everything passes) or show you what needs to be fixed


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.paradime.io/app-help/integrations/pre-commit.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
