mirror of https://github.com/hashicorp/consul
Browse Source
pro-tip: you can skip this check with `git commit --no-verify` to overridepull/19671/head
Semir Patel
1 year ago
committed by
GitHub
3 changed files with 97 additions and 3 deletions
@ -0,0 +1,39 @@
|
||||
# Copyright (c) HashiCorp, Inc. |
||||
# SPDX-License-Identifier: BUSL-1.1 |
||||
|
||||
# See https://pre-commit.com for more information |
||||
# See https://pre-commit.com/hooks.html for more hooks |
||||
repos: |
||||
- repo: https://github.com/tekwizely/pre-commit-golang |
||||
rev: v1.0.0-rc.1 |
||||
hooks: |
||||
# Formats go imports into deterministic sections |
||||
# `pre-commit run gci` to run in isolation |
||||
- id: my-cmd |
||||
name: gci |
||||
# skip all generated go files |
||||
exclude: | |
||||
(?x)( |
||||
^proto-public/| |
||||
^proto/| |
||||
^agent/xds/z_xds_packages\.go$| |
||||
^testing/deployer/topology/default_versions\.go$| |
||||
\.deepcopy\.go$| |
||||
\.gen\.go$| |
||||
\.pb\.go$| |
||||
\.pb\.binary\.go$| |
||||
generated_funcs\.go$| |
||||
_generated_test\.go$| |
||||
mock_.+\.go$ |
||||
) |
||||
args: |
||||
- "gci" |
||||
- "write" |
||||
- "--section" |
||||
- "standard" |
||||
- "--section" |
||||
- "default" |
||||
- "--section" |
||||
- "prefix(github.com/hashicorp/)" |
||||
- "--section" |
||||
- "prefix(github.com/hashicorp/consul/)" |
Loading…
Reference in new issue