Add go linter in pre-commit

This commit is contained in:
Gabriel Augendre 2021-08-21 09:48:15 +02:00
parent 46bd3cdbf5
commit 4465be80ea
2 changed files with 6 additions and 9 deletions

View file

@ -1,17 +1,13 @@
exclude: ^data/(curated|raw)_data
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1 rev: v4.0.1
hooks: hooks:
- id: check-ast - id: check-ast
types: [python]
- id: check-json - id: check-json
types: [json]
- id: check-toml - id: check-toml
types: [toml]
- id: check-xml - id: check-xml
types: [xml]
- id: check-yaml - id: check-yaml
types: [yaml]
- id: end-of-file-fixer - id: end-of-file-fixer
- id: check-merge-conflict - id: check-merge-conflict
- id: pretty-format-json - id: pretty-format-json
@ -21,13 +17,15 @@ repos:
- id: trailing-whitespace - id: trailing-whitespace
args: args:
- --markdown-linebreak-ext=md - --markdown-linebreak-ext=md
- repo: https://github.com/timothycrosley/isort - repo: https://github.com/golangci/golangci-lint
rev: v1.42.0
hooks:
- id: golangci-lint
- repo: https://github.com/PyCQA/isort
rev: 5.9.3 rev: 5.9.3
hooks: hooks:
- id: isort - id: isort
types: [python]
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 21.7b0 rev: 21.7b0
hooks: hooks:
- id: black - id: black
types: [python]

View file

@ -153,7 +153,6 @@ func (insee InseeData) String() string {
} }
line = fmt.Sprintf("Vous êtes %s %s, %s en %s probablement en %d.", one, insee.Gender, born, frenchMonth(insee.Month), insee.Year) line = fmt.Sprintf("Vous êtes %s %s, %s en %s probablement en %d.", one, insee.Gender, born, frenchMonth(insee.Month), insee.Year)
result = append(result, line) result = append(result, line)
line = ""
var zoneType string var zoneType string
if insee.Foreign { if insee.Foreign {
zoneType = "ce pays" zoneType = "ce pays"