-{"$schema":"http://json-schema.org/draft-07/schema","title":"JSON schema for .pre-commit-config.yaml","definitions":{"file_types":{"type":"string","enum":["adobe-illustrator","alpm","apinotes","asar","asciidoc","ash","asm","audio","avif","awk","babelrc","bash","batch","bats","bazel","bazelrc","bib","binary","bitmap","bowerrc","browserslistrc","bzip2","c","c#","c++","c2hs","clojure","clojurescript","cmake","codespellrc","coffee","coveragerc","csh","cson","csproj","css","csslintrc","csv","cuda","cython","dart","dash","def","diff","directory","dockerfile","dockerignore","dtd","editorconfig","edn","ejs","eot","eps","erb","executable","expect","file","fish","flake8","gdscript","gherkin","gif","gitattributes","gitconfig","gitignore","gitlint","gitmodules","go","gotmpl","gpx","graphql","groovy","gyb","gyp","gzip","haskell","hcl","header","hgrc","html","icalendar","icns","icon","idl","idris","image","inc","ini","inx","jade","jar","java","java-properties","javascript","jenkins","jinja","jpeg","jshintrc","json","jsonnet","jsx","jupyter","kml","kotlin","ksh","lean","lektor","lektorproject","less","literate-haskell","lua","mailmap","makefile","manifest","map","markdown","mdx","mention-bot","mib","modulemap","myst","ngdoc","nim","nimble","nix","non-executable","npmignore","objective-c","objective-c++","ocaml","otf","p12","pdbrc","pdf","pem","perl","php","pkgbuild","plain-text","plantuml","plist","png","pofile","powershell","proto","puppet","purescript","pyi","pylintrc","pypirc","pyproj","python","python2","python3","pyz","r","rst","ruby","rust","salt","sass","sbt","scala","scheme","scss","sh","shell","sln","socket","solidity","spec","sql","stylus","svg","swf","swift","swiftdeps","symlink","system-verilog","tar","tcsh","terraform","tex","text","thrift","tiff","toml","ts","tsv","tsx","ttf","twig","twisted","txsprofile","urdf","vb","vbproj","vcxproj","vdx","verilog","vhdl","vim","vue","wav","webp","wheel","wkt","woff","woff2","wsgi","xhtml","xml","xquery","xsd","xsl","yaml","yamllint","yang","yin","zcml","zig","zip","zpt","zsh"]},"meta_repo":{"type":"object","properties":{"repo":{"default":"meta","const":"meta","type":"string"},"hooks":{"type":"array","items":{"type":"object","required":["id"],"properties":{"id":{"type":"string","enum":["check-hooks-apply","check-useless-excludes","identity"]}}}}}},"local_repo":{"type":"object","properties":{"repo":{"default":"local","const":"local","type":"string"},"hooks":{"type":"array","items":{"$ref":"#/definitions/hook_definition","type":"object","required":["id","name","entry","language"]}}}},"uri_repo":{"type":"object","properties":{"repo":{"$comment":"the repository url to git clone from","type":"string","pattern":"^(((ssh)|(http[s]?)://)|(git@)).+"},"rev":{"$comment":"the revision or tag to clone at (previously sha).","type":"string"},"hooks":{"$comment":"A list of hook mappings. See https://pre-commit.com/#pre-commit-configyaml---hooks.","type":"array","items":{"type":"object","$ref":"#/definitions/hook_definition"}}}},"hook_definition":{"type":"object","properties":{"id":{"$comment":"which hook from the repository to use.","type":"string"},"alias":{"$comment":"(optional) allows the hook to be referenced using an additional id when using pre-commit run <hookid>.","type":"string"},"name":{"$comment":"(optional) override the name of the hook - shown during hook execution.","type":"string"},"language":{"$comment":"(optional) Tells pre-commit on how to install the hook. See https://pre-commit.com/#supported-languages","type":"string","enum":["conda","coursier","dart","docker","docker_image","dotnet","fail","golang","node","perl","python","python_venv","r","ruby","rust","swift","pygrep","script","system"]},"language_version":{"$comment":"(optional) override the language version for the hook. See https://pre-commit.com/#overriding-language-version.","type":"string"},"files":{"$comment":"(optional) override the default pattern for files to run on.","type":"string"},"entry":{"$comment":"(optional) Override default command to execute for the hook.","type":"string"},"exclude":{"$comment":"(optional) file exclude pattern.","type":"string"},"types":{"$comment":"(optional) override the default file types to run on. See https://pre-commit.com/#filtering-files-with-types.","type":"array","items":{"type":"string","$ref":"#/definitions/file_types"}},"types_or":{"$comment":"(optional) override the default file types to run on (OR). See Filtering files with types. new in 2.9.0.","type":"array","items":{"type":"string","$ref":"#/definitions/file_types"}},"exclude_types":{"$comment":"(optional) file types to exclude.","type":"array","items":{"type":"string"}},"args":{"$comment":"(optional) list of additional parameters to pass to the hook.","type":"array","items":{"type":"string"}},"stages":{"$comment":"(optional) confines the hook to the commit, merge-commit, push, prepare-commit-msg, commit-msg, post-checkout, post-commit or manual stage. See https://pre-commit.com/#confining-hooks-to-run-at-certain-stages.","type":"array","items":{"type":"string","enum":["commit","merge-commit","push","prepare-commit-msg","commit-msg","post-checkout","post-commit","post-merge","post-rewrite","manual"]}},"additional_dependencies":{"$comment":"(optional) a list of dependencies that will be installed in the environment where this hook gets run. One useful application is to install plugins for hooks such as eslint.","type":"array","items":{"type":"string"}},"always_run":{"$comment":"(optional) if true, this hook will run even if there are no matching files.","type":"boolean"},"verbose":{"$comment":"(optional) if true, forces the output of the hook to be printed even when the hook passes.","type":"boolean"},"log_file":{"$comment":"(optional) if present, the hook output will additionally be written to a file.","type":"string"},"pass_filenames":{"$comment":"(optional) if false, this hook will be called only once without being called for each matching file.","type":"boolean","default":false}}}},"type":"object","properties":{"ci":{"$comment":"pre-commit.ci specific settings. See https://pre-commit.ci/#configuration","type":"object","properties":{"autofix_commit_msg":{"$comment":"custom commit message for PR autofixes","default":"[pre-commit.ci] auto fixes from pre-commit.com hooks\n\nfor more information, see https://pre-commit.ci","type":"string"},"autofix_prs":{"$comment":"whether to autofix pull requests. when disabled, comment \"pre-commit.ci autofix\" on a pull request to manually trigger auto-fixing","default":true,"type":"boolean"},"autoupdate_branch":{"$comment":"branch to send autoupdate PRs to. by default, pre-commit.ci will update the default branch of the repository.","default":"","type":"string"},"autoupdate_commit_msg":{"$comment":"custom commit message for autoupdate PRs","default":"[pre-commit.ci] pre-commit autoupdate","type":"string"},"autoupdate_schedule":{"$comment":"control when the autoupdate runs","type":"string","default":"weekly","enum":["weekly","monthly","quarterly"]},"skip":{"$comment":"which hook ids to be skipped when running under pre-commit.ci","type":"array","items":{"type":"string"}},"submodules":{"$comment":"whether to recursive check out submodules","default":false,"type":"boolean"}}},"repos":{"$comment":"A list of repository mappings. See https://pre-commit.com/#pre-commit-configyaml---repos.","type":"array","items":{"anyOf":[{"$ref":"#/definitions/meta_repo"},{"$ref":"#/definitions/local_repo"},{"$ref":"#/definitions/uri_repo"}]}},"default_language_version":{"$comment":"(optional: default {}) a mapping from language to the default language_version that should be used for that language. This will only override individual hooks that do not set language_version.","type":"object","additionalProperties":{"type":"string"}},"default_stages":{"$comment":"(optional: default (all stages)) a configuration-wide default for the stages property of hooks. This will only override individual hooks that do not set stages.","type":"array","items":{"type":"string"}},"files":{"$comment":"(optional: default '') global file include pattern.","type":"string","default":""},"exclude":{"$comment":"(optional: default ^$) global file exclude pattern.","type":"string","default":"^$"},"fail_fast":{"$comment":"(optional: default false) set to true to have pre-commit stop running hooks after the first failure.","type":"boolean","default":false},"minimum_pre_commit_version":{"$comment":"(optional: default '0') require a minimum version of pre-commit.","type":"string","default":"0"}},"required":["repos"]}
0 commit comments