mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Added here: - .pre-commit-config.yaml - docs/project/contribution_tools.md - src/scripts/pre-commit-toc.js - CONTRIBUTING.md - proposals/* (just to switch TOC formats) The rest consists of auto-generated fixes. The switch from doctoc to markdown-toc is because doctoc wants to put a TOC in every file, whereas markdown-toc only does it if you have an insertion point. Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
34 lines
1.0 KiB
YAML
34 lines
1.0 KiB
YAML
# See https://pre-commit.com for more information
|
|
# See https://pre-commit.com/hooks.html for more hooks
|
|
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v2.4.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: local
|
|
hooks:
|
|
- id: markdown-toc
|
|
name: markdown-toc
|
|
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/
|
|
# Prettier should be run late so that it can re-format any prior changes.
|
|
- repo: https://github.com/prettier/prettier
|
|
rev: 2.0.5
|
|
hooks:
|
|
- id: prettier
|
|
exclude: ^src/jekyll/theme/
|