diff --git a/pre_commit/languages/all.py b/pre_commit/languages/all.py
index be74ffd..a019ddf 100644
--- a/pre_commit/languages/all.py
+++ b/pre_commit/languages/all.py
@@ -2,6 +2,7 @@ from __future__ import unicode_literals
 
 from pre_commit.languages import docker
 from pre_commit.languages import docker_image
+from pre_commit.languages import fail
 from pre_commit.languages import golang
 from pre_commit.languages import node
 from pre_commit.languages import pcre
@@ -54,6 +55,7 @@ from pre_commit.languages import system
 languages = {
     'docker': docker,
     'docker_image': docker_image,
+    'fail': fail,
     'golang': golang,
     'node': node,
     'pcre': pcre,
diff --git a/pre_commit/languages/fail.py b/pre_commit/languages/fail.py
new file mode 100644
index 0000000..c69fcae
--- /dev/null
+++ b/pre_commit/languages/fail.py
@@ -0,0 +1,15 @@
+from __future__ import unicode_literals
+
+from pre_commit.languages import helpers
+
+
+ENVIRONMENT_DIR = None
+get_default_version = helpers.basic_get_default_version
+healthy = helpers.basic_healthy
+install_environment = helpers.no_install
+
+
+def run_hook(prefix, hook, file_args):
+    out = hook['entry'].encode('UTF-8') + b'\n\n'
+    out += b'\n'.join(f.encode('UTF-8') for f in file_args) + b'\n'
+    return 1, out, b''

Create `language: fail` for filename-only checks
For example, it would be useful here:

https://github.com/pytest-dev/pytest/pull/3765/files

v1 could just print the filenames and exit nonzero, potentially with a `--message` option.
diff --git a/tests/repository_test.py b/tests/repository_test.py
index 95506ee..4c76f9a 100644
--- a/tests/repository_test.py
+++ b/tests/repository_test.py
@@ -589,6 +589,29 @@ def test_local_rust_additional_dependencies(store):
     assert _norm_out(ret[1]) == b"Hello World!\n"
 
 
+def test_fail_hooks(store):
+    config = {
+        'repo': 'local',
+        'hooks': [{
+            'id': 'fail',
+            'name': 'fail',
+            'language': 'fail',
+            'entry': 'make sure to name changelogs as .rst!',
+            'files': r'changelog/.*(?<!\.rst)$',
+        }],
+    }
+    repo = Repository.create(config, store)
+    (_, hook), = repo.hooks
+    ret = repo.run_hook(hook, ('changelog/1234.bugfix', 'changelog/wat'))
+    assert ret[0] == 1
+    assert ret[1] == (
+        b'make sure to name changelogs as .rst!\n'
+        b'\n'
+        b'changelog/1234.bugfix\n'
+        b'changelog/wat\n'
+    )
+
+
 def test_reinstall(tempdir_factory, store, log_info_mock):
     path = make_repo(tempdir_factory, 'python_hooks_repo')
     config = make_config_from_repo(path)

pip install -e .[dev]
parse_log_pytest
requirements.txt
coverage pytest pytest-env
apt-get update apt-get install -y gcc
3.6
requirements-dev.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
aspy.yaml==1.3.0
attrs==22.2.0
cached-property==1.5.2
certifi==2021.5.30
cfgv==3.3.1
coverage==6.2
distlib==0.3.9
filelock==3.4.1
flake8==5.0.4
identify==2.4.4
importlib-metadata==4.8.3
importlib-resources==5.4.0
iniconfig==1.1.1
mccabe==0.7.0
mock==5.2.0
nodeenv==1.6.0
packaging==21.3
platformdirs==2.4.0
pluggy==1.0.0
-e git+https://github.com/pre-commit/pre-commit.git@cf691e85c89dbe16dce7e0a729649b2e19d4d9ad#egg=pre_commit
py==1.11.0
pycodestyle==2.9.1
pyflakes==2.5.0
pyparsing==3.1.4
pytest==7.0.1
pytest-env==0.6.2
PyYAML==6.0.1
six==1.17.0
toml==0.10.2
tomli==1.2.3
typing_extensions==4.1.1
virtualenv==20.17.1
zipp==3.6.0

name: pre-commit
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - aspy-yaml==1.3.0
      - attrs==22.2.0
      - cached-property==1.5.2
      - cfgv==3.3.1
      - coverage==6.2
      - distlib==0.3.9
      - filelock==3.4.1
      - flake8==5.0.4
      - identify==2.4.4
      - importlib-metadata==4.8.3
      - importlib-resources==5.4.0
      - iniconfig==1.1.1
      - mccabe==0.7.0
      - mock==5.2.0
      - nodeenv==1.6.0
      - packaging==21.3
      - platformdirs==2.4.0
      - pluggy==1.0.0
      - py==1.11.0
      - pycodestyle==2.9.1
      - pyflakes==2.5.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - pytest-env==0.6.2
      - pyyaml==6.0.1
      - six==1.17.0
      - toml==0.10.2
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - virtualenv==20.17.1
      - zipp==3.6.0
prefix: /opt/conda/envs/pre-commit

tests/repository_test.py::test_fail_hooks
tests/repository_test.py::test_switch_language_versions_doesnt_clobber tests/repository_test.py::test_run_a_ruby_hook tests/repository_test.py::test_run_versioned_ruby_hook tests/repository_test.py::test_run_ruby_hook_with_disable_shared_gems tests/repository_test.py::test_golang_hook tests/repository_test.py::test_rust_hook tests/repository_test.py::test_additional_rust_cli_dependencies_installed[cli:shellharden:3.1.0] tests/repository_test.py::test_additional_rust_cli_dependencies_installed[cli:shellharden] tests/repository_test.py::test_additional_rust_lib_dependencies_installed tests/repository_test.py::test_additional_ruby_dependencies_installed tests/repository_test.py::test_additional_golang_dependencies_installed tests/repository_test.py::test_local_golang_additional_dependencies tests/repository_test.py::test_local_rust_additional_dependencies
tests/repository_test.py::test_python_hook tests/repository_test.py::test_python_hook_default_version tests/repository_test.py::test_python_hook_args_with_spaces tests/repository_test.py::test_python_hook_weird_setup_cfg tests/repository_test.py::test_python_venv tests/repository_test.py::test_versioned_python_hook tests/repository_test.py::test_run_a_node_hook tests/repository_test.py::test_run_versioned_node_hook tests/repository_test.py::test_system_hook_with_spaces tests/repository_test.py::test_missing_executable tests/repository_test.py::test_run_a_script_hook tests/repository_test.py::test_run_hook_with_spaced_args tests/repository_test.py::test_run_hook_with_curly_braced_arguments tests/repository_test.py::TestPygrep::test_grep_hook_matching tests/repository_test.py::TestPygrep::test_grep_hook_case_insensitive tests/repository_test.py::TestPygrep::test_grep_hook_not_matching[nope] tests/repository_test.py::TestPygrep::test_grep_hook_not_matching[foo'bar] tests/repository_test.py::TestPygrep::test_grep_hook_not_matching[^\\[INFO\\]] tests/repository_test.py::TestPCRE::test_grep_hook_matching tests/repository_test.py::TestPCRE::test_grep_hook_case_insensitive tests/repository_test.py::TestPCRE::test_grep_hook_not_matching[nope] tests/repository_test.py::TestPCRE::test_grep_hook_not_matching[foo'bar] tests/repository_test.py::TestPCRE::test_grep_hook_not_matching[^\\[INFO\\]] tests/repository_test.py::TestPCRE::test_pcre_hook_many_files tests/repository_test.py::TestPCRE::test_missing_pcre_support tests/repository_test.py::test_cwd_of_hook tests/repository_test.py::test_lots_of_files tests/repository_test.py::test_venvs tests/repository_test.py::test_additional_dependencies tests/repository_test.py::test_additional_dependencies_roll_forward tests/repository_test.py::test_additional_node_dependencies_installed tests/repository_test.py::test_reinstall tests/repository_test.py::test_control_c_control_c_on_install tests/repository_test.py::test_invalidated_virtualenv tests/repository_test.py::test_really_long_file_paths tests/repository_test.py::test_config_overrides_repo_specifics tests/repository_test.py::test_tags_on_repositories tests/repository_test.py::test_local_repository tests/repository_test.py::test_local_python_repo tests/repository_test.py::test_hook_id_not_present tests/repository_test.py::test_meta_hook_not_present tests/repository_test.py::test_too_new_version tests/repository_test.py::test_versions_ok[0.1.0] tests/repository_test.py::test_versions_ok[1.10.5] tests/repository_test.py::test_manifest_hooks
pre_commit/languages/fail.py pre_commit/languages/all.py
pre_commit/languages/fail.py pre_commit/languages/all.py