| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
- # Exceptions. See /LICENSE for license information.
- # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- # See https://pre-commit.com for more information
- # See https://pre-commit.com/hooks.html for more hooks
- default_language_version:
- python: python3 # Defaults to python2, so override it.
- repos:
- - repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v3.2.0
- hooks:
- - id: check-added-large-files
- - id: check-case-conflict
- - id: check-executables-have-shebangs
- - id: check-merge-conflict
- - id: check-symlinks
- - id: check-yaml
- - id: detect-private-key
- - id: end-of-file-fixer
- - id: mixed-line-ending
- args: ['--fix=lf']
- - id: trailing-whitespace
- - repo: https://github.com/google/pre-commit-tool-hooks
- rev: v1.0.3
- hooks:
- - id: check-copyright
- args:
- - --copyright
- - |+
- Part of the Carbon Language project, under the Apache License v2.0 with LLVM
- Exceptions. See /LICENSE for license information.
- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- exclude: '^src/jekyll/(Gemfile.lock|theme/.*)$'
- - repo: https://github.com/codespell-project/codespell
- rev: v1.17.1
- hooks:
- - id: codespell
- args: ['-I', '.codespell_ignore']
- exclude: '^src/jekyll/Gemfile.lock$'
- - repo: local
- hooks:
- - id: markdown-toc
- name: Update table of contents
- description: Runs https://github.com/jonschlinkert/markdown-toc
- entry: src/scripts/pre_commit_toc.js
- language: node
- additional_dependencies: [markdown-toc]
- files: .*\.md$
- exclude: ^src/jekyll/theme/
- - id: proposal-list
- name: Update list of proposals
- description: Updates the list of proposals in proposals/README.md
- entry: src/scripts/update_proposal_list.py
- language: python
- files: ^proposals/(README|p.*)\.md$
- pass_filenames: false
- # Formatters should be run late so that they can re-format any prior changes.
- - repo: https://github.com/psf/black
- rev: 20.8b1
- hooks:
- - id: black
- - repo: https://github.com/prettier/prettier
- rev: 2.1.1
- hooks:
- - id: prettier
- exclude: ^src/jekyll/theme/
|