Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality. Learn more β
Top 23 pre-commit Open-Source Projects
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
pyupgrade
A tool (and pre-commit hook) to automatically upgrade syntax for newer versions of the language.
-
talisman
Using a pre-commit hook, Talisman validates the outgoing changeset for things that look suspicious β such as tokens, passwords, and private keys.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
Husky.Net
Git hooks made easy with Husky.Net internal task runner! πΆ It brings the dev-dependency concept to the .NET world!
-
FastAPI-Backend-Template
A backend project template with FastAPI, PostgreSQL with asynchronous SQLAlchemy 2.0, Alembic for asynchronous database migration, and Docker. (by Aeternalis-Ingenium)
-
conventional-pre-commit
A pre-commit hook that checks commit messages for Conventional Commits formatting
-
check-jsonschema
A CLI and set of pre-commit hooks for jsonschema validation with built-in support for GitHub Workflows, Renovate, Azure Pipelines, and more!
-
cookiecutter-fastapi-backend
:cookie: Cookiecutter template to build and deploy fastapi backends..batteries included
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Reading Biome doc I also switched from husky to lefthook.
Project mention: How to setup Black and pre-commit in python for auto text-formatting on commit | dev.to | 2024-03-29Today we are going to look at how to setup Black (a python code formatter) and pre-commit (a package for handling git hooks in python) to automatically format you code on commit.
Project mention: Implementing Quality Checks In Your Git Workflow With Hooks and pre-commit | dev.to | 2023-12-13# See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v3.2.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-toml - id: check-added-large-files - repo: local hooks: - id: tox lint name: tox-validation entry: pdm run tox -e test,lint language: system files: ^src\/.+py$|pyproject.toml|^tests\/.+py$ types_or: [python, toml] pass_filenames: false - id: tox docs name: tox-docs language: system entry: pdm run tox -e docs types_or: [python, rst, toml] files: ^src\/.+py$|pyproject.toml|^docs\/ pass_filenames: false - repo: https://github.com/pdm-project/pdm rev: 2.10.4 # a PDM release exposing the hook hooks: - id: pdm-lock-check - repo: https://github.com/jumanjihouse/pre-commit-hooks rev: 3.0.0 hooks: - id: markdownlint
Project mention: A Tale of Two Kitchens - Hypermodernizing Your Python Code Base | dev.to | 2023-11-12pyupgrade and flynt are examples of tools that modify your code base from earlier python versions into the newest python syntax, rewriting all string formats into f-strings and similar things.
It's been a while since I looked, but pre-commit hooks (like talisman) would be the only way to prevent secrets from being committed/pushed. Server-side hooks are generally not supported on hosted repos (e.g. github, azure devops) since it's basically arbitrary code execution from the host's perspective.
#.pre-commit-config.yaml repos: - repo: https://github.com/dnephin/pre-commit-golang rev: master hooks: - id: go-fmt - id: go-vet - id: go-imports - id: go-mod-tidy
I use Husky.net to hook in dotnet format on changed files.
Project mention: Automate Python Linting and Code Style Enforcement with Ruff and GitHub Actions | dev.to | 2023-07-22
Project mention: Fast, Declarative, Reproduble and Composable Developer Environments Using Nix | news.ycombinator.com | 2024-04-12> Good luck getting answers on those questions other than "read the source code" and then followed by "no, not that source code, this branch here".
I experienced a similar situation last week with git-hooks.nix[1], a pre-commit integration for Nix.
I wanted to run biome[2] checks on my repository during pre-push so I wrote a custom hook because git-hooks.nix has pre-defined integrations with prettier and rome, but not biome.
Or that's what I thought. I eventually found out that the rome hook is actually referred as "rome" everywhere but calls biome instead[3]. This wasn't documented anywhere, so I opened an issue[4] suggesting to rename the hook to "biome" and keep the former for backwards compatibility reasons.
As of today, this has been acknowledged by one of the maintainers, whose sole feedback has been to "thumb down" the issue.
TL;DR: It's not just the documentation, but also the code not doing what you would expect. It also seems there's no means to improve the situation other than just forking the project since there's also clearly some kind of communication problem.
[1] https://github.com/cachix/git-hooks.nix
[[language]] name = "python" roots = ["pyproject.toml"] formatter = { command = "black", args = ["--quiet", "-"] } language-server = { command = "pyright-langserver", args = ["--stdio"] } config = {} auto-format = true [[language]] name = "rust" auto-format = true # [[language]] # name = "typescript" # auto-format = true # formatter = { command = "prettier", args = ["--parser", "typescript"]} # # pass format options according to https://github.com/typescript-language-server/typescript-language-server#workspacedidchangeconfiguration omitting the "[language].format." prefix. # config = { format = { "semicolons" = "insert", "insertSpaceBeforeFunctionParenthesis" = true } } [[language]] name = "tsx" formatter = { command = 'prettier', args = ["--parser", "typescript"] } auto-format = true [[language]] name = "javascript" auto-format = true formatter = { command = 'npx', args = ["prettier", "--config", ".prettierrc", "--parser", "javascript"] } # formatter = { command = "prettier", args = ["--parser", "javascript"]} [[language]] name = "css" formatter = { command = 'prettier', args = ["--parser", "css"] } [[language]] name = "markdown" # https://github.com/executablebooks/mdformat formatter = { command = "mdformat", args = ["-"] } [[language]] name = "json" formatter = { command = "prettier", args = ["--parser", "json"] } [[language]] name = "toml" auto-format = true # https://github.com/bd82/toml-tools/tree/master/packages/prettier-plugin-toml formatter = { command = "prettier", args = ["--parser", "toml"] } [[language]] name = "yaml" indent = { tab-width = 2, unit = " " } formatter = { command = "prettier", args = ["--parser", "yaml"] } [[language]] name = "astro" scope = "source.astro" injection-regex = "astro" file-types = ["astro"] roots = ["package.json", "astro.config.mjs"] language-server = { command = "astro-ls", args = ["--stdio"] } config = { "typescript" = { serverPath = "/Users/matteostara/.nvm/versions/node/v18.16.0/bin/typescript-language-server" }, "environment" = "node" }
For example I want to reject poorly formatted commit messages with https://github.com/compilerla/conventional-pre-commit
Project mention: Which is your favourite or go-to YouTube channel for being up-to-date on Python? | /r/Python | 2023-05-05He made yesqa and pyupgrade (among others), and also works on flake8. His main job is for https://sentry.io/.
Project mention: Template for Cython + Poetry + PoetryDynamicVersioning + GithubActions + CIBuildWheel | /r/Python | 2023-06-08
pre-commit related posts
- Fast, Declarative, Reproduble and Composable Developer Environments Using Nix
- How to setup Black and pre-commit in python for auto text-formatting on commit
- Implementing Quality Checks In Your Git Workflow With Hooks and pre-commit
- Como adicionar hooks aos commits de seu projeto utilizando Husky
- EmacsConf Live Now
- Git: fu** the history!
- [Tool Anouncement] github-distributed-owners - A tool for managing GitHub CODEOWNERS using OWNERS files distributed throughout your code base. Especially helpful for monorepos / multi-team repos
-
A note from our sponsor - InfluxDB
www.influxdata.com | 29 Apr 2024
Index
What are some of the best open-source pre-commit projects? This list will help you:
Project | Stars | |
---|---|---|
1 | husky | 31,590 |
2 | pre-commit | 12,049 |
3 | pre-commit-hooks | 4,874 |
4 | pyupgrade | 3,326 |
5 | pre-commit-terraform | 2,996 |
6 | talisman | 1,836 |
7 | simple-git-hooks | 1,210 |
8 | nbQA | 967 |
9 | reorder-python-imports | 709 |
10 | pre-commit-golang | 632 |
11 | nn-template | 614 |
12 | Husky.Net | 590 |
13 | FastAPI-Backend-Template | 557 |
14 | git-hooks.nix | 444 |
15 | action | 410 |
16 | mdformat | 349 |
17 | conventional-pre-commit | 284 |
18 | yesqa | 257 |
19 | python-template | 231 |
20 | autohooks | 183 |
21 | check-jsonschema | 176 |
22 | pre-commit-rust | 151 |
23 | cookiecutter-fastapi-backend | 105 |
Sponsored