mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-04 16:04:30 -06:00
33 lines
914 B
Python
33 lines
914 B
Python
|
|
from pre_commit.languages import node
|
|
from pre_commit.languages import python
|
|
from pre_commit.languages import ruby
|
|
|
|
# A language implements the following two functions in its module:
|
|
#
|
|
# def install_environment(repo_cmd_runner):
|
|
# """Installs a repository in the given repository. Note that the current
|
|
# working directory will already be inside the repository.
|
|
#
|
|
# Args:
|
|
# repo_cmd_runner - `PrefixedCommandRunner` bound to the repository.
|
|
# """
|
|
#
|
|
# def run_hook(repo_cmd_runner, hook, file_args):
|
|
# """Runs a hook and returns the returncode and output of running that hook.
|
|
#
|
|
# Args:
|
|
# repo_cmd_runner - `PrefixedCommandRunner` bound to the repository.
|
|
# hook - Hook dictionary
|
|
# file_args - The files to be run
|
|
#
|
|
# Returns:
|
|
# (returncode, stdout, stderr)
|
|
# """
|
|
|
|
languages = {
|
|
'node': node,
|
|
'python': python,
|
|
'ruby': ruby,
|
|
}
|