All Projects → olist → hulks

olist / hulks

Licence: Apache-2.0 License
Olist custom linting hooks 💚 👽

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to hulks

Husky
Git hooks made easy 🐶 woof!
Stars: ✭ 25,056 (+100124%)
Mutual labels:  hooks, pre-commit
Cohesion
A tool for measuring Python class cohesion.
Stars: ✭ 129 (+416%)
Mutual labels:  lint, quality
Husky.Net
Git hooks made easy with Husky.Net internal task runner! 🐶 It brings the dev-dependency concept to the .NET world!
Stars: ✭ 394 (+1476%)
Mutual labels:  lint, pre-commit
use-bus
React hook to subscribe and dispatch events accros React components
Stars: ✭ 51 (+104%)
Mutual labels:  hooks
learn-react-typescript
Learning React contents with TypeScript (Hooks, Redux)
Stars: ✭ 15 (-40%)
Mutual labels:  hooks
zoov
Use 🐻 Zustand with Module-like api
Stars: ✭ 24 (-4%)
Mutual labels:  hooks
JSONCustomLintr
Library to allow creation, running, and reporting of custom lint rules for JSON files
Stars: ✭ 19 (-24%)
Mutual labels:  lint
dothub
Stop managing your github config like a mere human
Stars: ✭ 14 (-44%)
Mutual labels:  hooks
state inspector
State change & method call logger. A debugging tool for instance variables and method calls.
Stars: ✭ 24 (-4%)
Mutual labels:  hooks
jitm
JITM is an automated tool to bypass the JIT Hooking protection on a .NET sample.
Stars: ✭ 27 (+8%)
Mutual labels:  hooks
react-usemiddleware
React >=16.7 hook, allowing to use standard Redux middleware with useReducer
Stars: ✭ 19 (-24%)
Mutual labels:  hooks
crook
Simple hook management tool made with PHP
Stars: ✭ 60 (+140%)
Mutual labels:  hooks
cli
Command tool of @lint-md, used in ci.
Stars: ✭ 20 (-20%)
Mutual labels:  lint
ue5-style-guide
An attempt to make Unreal Engine 4 projects more consistent
Stars: ✭ 2,892 (+11468%)
Mutual labels:  lint
ph-malhide
Process Hacker 2 hiding from external applications
Stars: ✭ 17 (-32%)
Mutual labels:  hooks
pahout
A pair programming partner for writing better PHP. Pahout means PHP mahout 🐘
Stars: ✭ 43 (+72%)
Mutual labels:  lint
atomic-state
A decentralized state management library for React
Stars: ✭ 54 (+116%)
Mutual labels:  hooks
micro-observables
A simple Observable library that can be used for easy state management in React applications.
Stars: ✭ 78 (+212%)
Mutual labels:  hooks
ansible-later
Another best practice scanner for Ansible roles and playbooks
Stars: ✭ 54 (+116%)
Mutual labels:  lint
pinipig
🚀 Performant webservice framework
Stars: ✭ 25 (+0%)
Mutual labels:  hooks

hulks

CI Build Status


Olist custom pre-commit plugins

Usage

To configure custom pre-commit hooks, create or add an entry in your .pre-commit-config.yaml as follows:

repos:
  - repo: [email protected]:olist/hulks.git
  rev: master
  hooks:
    - id: check-invalid-domains

Update pre-commit plugins:

pre-commit autoupdate

Test the custom hook(s) against all your codebase:

pre-commit run -a -v

The list of available hooks could be found on pre_commit_hooks_file or using setup.py show_hooks command:

python setup.py -q show_hooks

Development

Create an virtualenv using Python 3.6+ and install the development requirements:

pip install -r requirements-dev.txt

Optionally, add the package in your current virtualenv for easier access:

python setup.py develop
# now you should be able to call any hook by the entry name:
# my-hook <files>

To execute the repository tests:

make tests

Creating new hooks

To create a new hook:

  • Copy the example hook: cp hulks/example.py hulks/my_hulk.py
  • Add an entry in .pre-commit-hooks.yaml (more options in pre-commit-documentation)
  • Develop and test your hook following the guidelines below
  • Update CHANGES.rst properly

Guidelines

Keep in mind that all plugins are installed via setup.py script by pre-commit.

The following guides should help us when creating new hooks:

  • Add an entry in .pre-commit-hooks.yaml

    • the name entry should be the hook path (eg hulks.my_hook)
  • Your hook entrypoint is always a function named main

  • Add your hook dependencies in requirements.txt

Testing

To test a newly added hook, you can:

  • Follow these instructions. (you must commit your code before testing)
  • Add the hook to another project .pre-commit-config.yaml. (you must commit your code before testing)
  • Update pre-commit (pre-commit autoupdate)
  • Or simple run python -m hulks.my_new_hook <filenames>.

Release

Check if CHANGES.rst contains the correct version number (follow semver). Create the proper tags with:

make release
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].