代码拉取完成,页面将自动刷新
default_stages: [commit, push]
minimum_pre_commit_version: "1.20.0"
exclude: (^vendor/|^pkg/generated/)
repos:
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.3.5
hooks:
- id: go-fmt
name: Run go fmt against the code
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: trailing-whitespace
- id: detect-private-key
exclude: pkg/scalers/prometheus_scaler_test.go
- id: end-of-file-fixer
- id: check-merge-conflict
- id: mixed-line-ending
- repo: https://github.com/thlorenz/doctoc.git
rev: v2.0.0
hooks:
- id: doctoc
name: Add TOC for md files
files: ^README\.md$|^CONTRIBUTING\.md$
args:
- "--maxlevel"
- "3"
- repo: local
hooks:
- id: language-matters
language: pygrep
name: Check for language that we do not accept as community
description: Please use "deny_list" or "allow_list" instead.
entry: "(?i)(black|white)[_-]?(list|List)"
pass_filenames: true
- id: sort-scalers
name: Check if scalers are sorted in scale_handler.go
language: system
entry: "bash tools/sort_scalers.sh"
files: .*scale_handler\.go$
- id: validate-changelog
name: Validate Changelog
language: system
entry: "bash hack/validate-changelog.sh"
pass_filenames: false
- id: golangci-lint
language: golang
name: Run golangci against the code
entry: golangci-lint run
types: [go]
pass_filenames: false
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。