Skip to content

Commit

Permalink
Fix build 0.5.1 (#29)
Browse files Browse the repository at this point in the history
* Embellish pre-commit hooks config.
* Prevent linting GoReleaser ldflags.
  • Loading branch information
jlucktay authored Aug 23, 2019
1 parent 1ffd3c5 commit 2ddbfda
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 16 deletions.
65 changes: 50 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
#
# TL;DR setup:
#
# 1. brew install pre-commit
Expand All @@ -6,19 +9,51 @@
fail_fast: true

repos:
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
hooks:
- id: check-json
- id: end-of-file-fixer
- id: no-commit-to-branch
args: [ '--branch', 'master' ]
- id: pretty-format-json
args: [ '--autofix' ]
- id: trailing-whitespace
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
# Prevent giant files from being committed
- id: check-added-large-files
# Forbid files which have a UTF-8 byte-order marker
- id: check-byte-order-marker
# Check for files that would conflict in case-insensitive filesystems
- id: check-case-conflict
# Ensures that (non-binary) executables have a shebang.
- id: check-executables-have-shebangs
# This hook checks json files for parseable syntax.
- id: check-json
# Check for files that contain merge conflict strings.
- id: check-merge-conflict
# Checks for symlinks which do not point to anything.
- id: check-symlinks
# This hook checks toml files for parseable syntax.
- id: check-toml
# This hook checks xml files for parseable syntax.
- id: check-xml
# This hook checks yaml files for parseable syntax.
- id: check-yaml
# Detects *your* aws credentials from the aws cli credentials file
- id: detect-aws-credentials
# Detects the presence of private keys
- id: detect-private-key
# Ensures that a file is either empty, or ends with one newline.
- id: end-of-file-fixer
# Replaces or checks mixed line ending
- id: mixed-line-ending
# Don't commit to branch
- id: no-commit-to-branch
args: ["--branch", "master"]
# This hook sets a standard for formatting JSON files.
- id: pretty-format-json
args: ["--autofix"]
# Sorts simple YAML files which consist only of top-level keys, preserving comments and blocks.
- id: sort-simple-yaml
# This hook trims trailing whitespace.
- id: trailing-whitespace

- repo: git://github.com/golangci/golangci-lint
rev: v1.17.1
hooks:
- id: golangci-lint
args: [ '--enable-all' ]
# https://github.com/golangci/golangci-lint/blob/master/.pre-commit-hooks.yaml
- repo: git://github.com/golangci/golangci-lint
rev: v1.17.1
hooks:
- id: golangci-lint
args: ["--enable-all"]
2 changes: 1 addition & 1 deletion cmd/stack/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
)

// Take ldflags from GoReleaser
//nolint
var (
//nolint
version, commit, date, builtBy string
)

Expand Down

0 comments on commit 2ddbfda

Please sign in to comment.