Skip to content

Conversation

xoanmm
Copy link
Contributor

@xoanmm xoanmm commented Jan 31, 2022

It's configured pre-commit to improve the development and also avoid commit and push code with errors.

In this PR is also improve the CI introducing the static checks through the mentioned pre-commit once is correctly configured through the file .pre-commit-config.yaml where the hooks are defined.

@xoanmm xoanmm self-assigned this Jan 31, 2022
@xoanmm xoanmm changed the title [SRE-1302] Improve CI and configure pre-commit feat: improve CI and configure pre-commit Jan 31, 2022
@xoanmm xoanmm requested review from a team, lupiuz, rafalbochenski and danielkorytek and removed request for a team February 10, 2022 14:30
Comment on lines +1 to +32
default_stages: [commit, push]
minimum_pre_commit_version: "1.20.0"
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: 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: golangci-lint
language: golang
name: Run golangci against the code
entry: golangci-lint run
types: [go]
pass_filenames: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@xoanmm xoanmm changed the title feat: improve CI and configure pre-commit [SRE-1302] feat: improve CI and configure pre-commit Feb 10, 2022
@xoanmm xoanmm changed the title [SRE-1302] feat: improve CI and configure pre-commit feat: improve CI and configure pre-commit Feb 10, 2022
@xoanmm xoanmm merged commit fc0ada9 into develop Feb 10, 2022
@xoanmm xoanmm deleted the SRE-1302/improve-ci-configure-precommit branch February 10, 2022 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants