| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- # 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.3.0
- hooks:
- - id: check-added-large-files
- - id: check-case-conflict
- - id: check-executables-have-shebangs
- - id: check-merge-conflict
- - id: check-symlinks
- exclude: '^website/jekyll/site/_includes$'
- - 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.1.1
- 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: '^(website/(firebase/.firebaserc|jekyll/(Gemfile.lock|theme/.*))|.bazelversion|compile_flags.txt|.*\.def)$'
- - id: check-google-doc-style
- - id: markdown-toc
- - repo: https://github.com/codespell-project/codespell
- rev: v1.17.1
- hooks:
- - id: codespell
- args: ['-I', '.codespell_ignore']
- exclude: '^website/jekyll/Gemfile.lock$'
- - repo: local
- hooks:
- - id: proposal-list
- name: Update list of proposals
- description: Updates the list of proposals in proposals/README.md
- entry: proposals/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/pre-commit
- rev: v2.1.2
- hooks:
- - id: prettier
- exclude: ^website/jekyll/theme/
- # Run linters last, as formatters and other checks may fix issues.
- - repo: https://gitlab.com/PyCQA/flake8
- rev: 3.8.4
- hooks:
- - id: flake8
- # We fully exclude fuzzer corpus directories as they are generated binary data.
- exclude: '^(.*/fuzzer_corpus/.*)$'
|