{"repo":"pre-commit/pre-commit-hooks","free":true,"listed":false,"github":"https://github.com/pre-commit/pre-commit-hooks","clone":"git clone https://github.com/pre-commit/pre-commit-hooks.git","description":"Some out-of-the-box hooks for pre-commit","language":"Python","stars":6661,"topics":["pre-commit","python","linter","refactoring","git"],"license":"MIT","category":"dev-tools","readme_excerpt":"pre-commit-hooks ================ Some out-of-the-box hooks for pre-commit. See also: https://github.com/pre-commit/pre-commit Using pre-commit-hooks with pre-commit Add this to your .pre-commit-config.yaml Hooks available check-added-large-files Prevent giant files from being committed. - Specify what is \"too large\" with args: ['--maxkb=123'] (default=500kB). - Limits checked files to those indicated as staged for addition by git. - If git-lfs is installed, lfs files will be skipped (requires git-lfs =2.2.1 ) - --enforce-all - Check all listed files not just those staged for addition. check-ast Simply check whether files parse as valid python. check-builtin-literals Require literal syntax when initializing empty or zero Python builtin types. - Allows calling constructors with positional arguments (e.g., list('abc') ). - Allows calling constructors from the builtins ( builtin ) namespace ( builtins.list() ). - Ignore this requirement for specific builtin types with --ignore=type1,type2,… . - Forbid dict keyword syntax with --no-allow-dict-kwargs . check-case-conflict Check for files with names that would conflict on a case-insensitive filesystem like MacOS HFS+ or Windows FAT. check-executables-have-shebangs Checks that non-binary executables have a proper shebang. check-illegal-windows-names Check for files that cannot be created on Windows. check-json Attempts to load all json files to verify syntax. check-merge-conflict Check for files that contain merge conflict strings. ","default_branch":null,"files":null,"tree":[],"storefront":"/r/pre-commit","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/pre-commit/pre-commit-hooks/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}