Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
264 changes: 264 additions & 0 deletions .bindown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
systems:
- darwin/amd64
- linux/amd64
dependencies:
gofumpt:
template: origin#gofumpt
vars:
version: 0.5.0
golangci-lint:
template: origin#golangci-lint
vars:
version: 1.51.2
goreleaser:
template: origin#goreleaser
vars:
version: 1.18.2
handcrafted:
template: origin#handcrafted
vars:
version: 0.0.0
semver-next:
template: origin#semver-next
vars:
version: 0.12.2
shellcheck:
template: origin#shellcheck
vars:
version: 0.9.0
templates:
benchdiff:
url: https://github.com/WillAbides/benchdiff/releases/download/v{{.version}}/benchdiff_{{.version}}_{{.os}}_{{.arch}}.tar.gz
required_vars:
- version
systems:
- darwin/amd64
- linux/386
- linux/amd64
gofumpt:
url: https://github.com/mvdan/gofumpt/releases/download/v{{.version}}/gofumpt_v{{.version}}_{{.os}}_{{.arch}}{{.suffix}}
archive_path: gofumpt_v{{.version}}_{{.os}}_{{.arch}}{{.suffix}}
bin: gofumpt{{.suffix}}
vars:
suffix: ""
required_vars:
- version
overrides:
- matcher:
os:
- windows
dependency:
vars:
suffix: .exe
origin#gofumpt:
homepage: https://github.com/mvdan/gofumpt
description: A stricter gofmt
url: https://github.com/mvdan/gofumpt/releases/download/v{{.version}}/gofumpt_v{{.version}}_{{.os}}_{{.arch}}{{.urlSuffix}}
archive_path: gofumpt_v{{.version}}_{{.os}}_{{.arch}}{{.urlSuffix}}
bin: gofumpt
vars:
archivePathSuffix: ""
urlSuffix: ""
required_vars:
- version
overrides:
- matcher:
os:
- windows
dependency:
vars:
urlSuffix: .exe
systems:
- darwin/amd64
- darwin/arm64
- linux/386
- linux/amd64
- linux/arm64
- windows/386
- windows/amd64
origin#golangci-lint:
homepage: https://github.com/golangci/golangci-lint
description: Fast linters Runner for Go
url: https://github.com/golangci/golangci-lint/releases/download/v{{.version}}/golangci-lint-{{.version}}-{{.os}}-{{.arch}}{{.urlSuffix}}
archive_path: golangci-lint-{{.version}}-{{.os}}-{{.arch}}/golangci-lint{{.archivePathSuffix}}
bin: golangci-lint
vars:
archivePathSuffix: ""
urlSuffix: .tar.gz
required_vars:
- version
overrides:
- matcher:
os:
- windows
dependency:
vars:
archivePathSuffix: .exe
urlSuffix: .zip
systems:
- darwin/amd64
- darwin/arm64
- freebsd/386
- freebsd/amd64
- linux/386
- linux/amd64
- linux/arm64
- linux/loong64
- linux/mips64
- linux/mips64le
- linux/ppc64le
- linux/riscv64
- linux/s390x
- netbsd/386
- netbsd/amd64
- windows/386
- windows/amd64
- windows/arm64
origin#goreleaser:
homepage: https://github.com/goreleaser/goreleaser
description: Deliver Go binaries as fast and easily as possible
url: https://github.com/goreleaser/goreleaser/releases/download/v{{.version}}/goreleaser_{{.os}}_{{.arch}}{{.urlSuffix}}
archive_path: goreleaser{{.archivePathSuffix}}
bin: goreleaser
vars:
archivePathSuffix: ""
urlSuffix: .tar.gz
required_vars:
- version
overrides:
- matcher:
os:
- windows
dependency:
vars:
archivePathSuffix: .exe
urlSuffix: .zip
substitutions:
arch:
"386": i386
amd64: x86_64
os:
windows: Windows
substitutions:
arch:
"386": i386
amd64: x86_64
os:
darwin: Darwin
linux: Linux
systems:
- darwin/amd64
- darwin/arm64
- linux/386
- linux/amd64
- linux/arm64
- linux/ppc64
- windows/386
- windows/amd64
- windows/arm64
origin#handcrafted:
homepage: https://github.com/willabides/handcrafted
description: lists non-generated go files in a package
url: https://github.com/WillAbides/handcrafted/releases/download/v{{.version}}/handcrafted_{{.version}}_{{.os}}_{{.arch}}{{.urlSuffix}}
archive_path: handcrafted{{.archivePathSuffix}}
bin: handcrafted
vars:
archivePathSuffix: ""
urlSuffix: .tar.gz
required_vars:
- version
overrides:
- matcher:
os:
- windows
dependency:
vars:
archivePathSuffix: .exe
systems:
- darwin/amd64
- darwin/arm64
- linux/386
- linux/amd64
- linux/arm64
- windows/386
- windows/amd64
- windows/arm64
origin#semver-next:
homepage: https://github.com/WillAbides/semver-next
url: https://github.com/WillAbides/semver-next/releases/download/v{{.version}}/semver-next_{{.version}}_{{.os}}_{{.arch}}{{.urlSuffix}}
archive_path: semver-next{{.archivePathSuffix}}
bin: semver-next
vars:
archivePathSuffix: ""
urlSuffix: .tar.gz
required_vars:
- version
overrides:
- matcher:
os:
- windows
dependency:
vars:
archivePathSuffix: .exe
systems:
- darwin/amd64
- darwin/arm64
- linux/386
- linux/amd64
- linux/arm64
- windows/386
- windows/amd64
- windows/arm64
origin#shellcheck:
homepage: https://github.com/koalaman/shellcheck
description: ShellCheck, a static analysis tool for shell scripts
url: https://github.com/koalaman/shellcheck/releases/download/v{{.version}}/shellcheck-v{{.version}}.{{.os}}.{{.arch}}{{.urlSuffix}}
archive_path: shellcheck-v{{.version}}/shellcheck{{.archivePathSuffix}}
bin: shellcheck
vars:
archivePathSuffix: ""
urlSuffix: .tar.xz
required_vars:
- version
overrides:
- matcher:
os:
- windows
dependency:
url: https://github.com/koalaman/shellcheck/releases/download/v{{.version}}/shellcheck-v{{.version}}.zip
archive_path: shellcheck.exe
- matcher:
arch:
- arm64
os:
- darwin
dependency:
substitutions:
arch:
arm64: x86_64
substitutions:
arch:
amd64: x86_64
arm64: aarch64
systems:
- darwin/amd64
- darwin/arm64
- linux/amd64
- linux/arm64
- windows/amd64
template_sources:
benchdiff: https://raw.githubusercontent.com/WillAbides/benchdiff/main/bindown.yml
origin: https://raw.githubusercontent.com/WillAbides/bindown-templates/master/bindown.yml
url_checksums:
https://github.com/WillAbides/handcrafted/releases/download/v0.0.0/handcrafted_0.0.0_darwin_amd64.tar.gz: df5dbf9c8b282d8209a8baddfe3410c5b3ace87bdce808fce0a0d49356c9ff4d
https://github.com/WillAbides/handcrafted/releases/download/v0.0.0/handcrafted_0.0.0_linux_amd64.tar.gz: 1a7885a9854d2455dce1be3bc19f2d61a61ebdc99e2a98e4969ab1965c2a64ad
https://github.com/WillAbides/semver-next/releases/download/v0.12.2/semver-next_0.12.2_darwin_amd64.tar.gz: 2ccb3245b790c5700c0643b8d8b39ec25b080ea98e6cd824f8ead7e0c5dd1ffb
https://github.com/WillAbides/semver-next/releases/download/v0.12.2/semver-next_0.12.2_linux_amd64.tar.gz: 15649ff83af46b63fd6c6abb6d2dda7f9b811604b10f05e2f7f6fae24a72edbb
https://github.com/golangci/golangci-lint/releases/download/v1.51.2/golangci-lint-1.51.2-darwin-amd64.tar.gz: 0549cbaa2df451cf3a2011a9d73a9cb127784d26749d9cd14c9f4818af104d44
https://github.com/golangci/golangci-lint/releases/download/v1.51.2/golangci-lint-1.51.2-linux-amd64.tar.gz: 4de479eb9d9bc29da51aec1834e7c255b333723d38dbd56781c68e5dddc6a90b
https://github.com/goreleaser/goreleaser/releases/download/v1.18.2/goreleaser_Darwin_x86_64.tar.gz: 95338eed333347152e23837b68a8c6ce0c62b9f5abb68bd5b4b08178766400b9
https://github.com/goreleaser/goreleaser/releases/download/v1.18.2/goreleaser_Linux_x86_64.tar.gz: 811e0c63e347f78f3c8612a19ca8eeb564eb45f0265ce3f38aec39c8fdbcfa10
https://github.com/koalaman/shellcheck/releases/download/v0.9.0/shellcheck-v0.9.0.darwin.x86_64.tar.xz: 7d3730694707605d6e60cec4efcb79a0632d61babc035aa16cda1b897536acf5
https://github.com/koalaman/shellcheck/releases/download/v0.9.0/shellcheck-v0.9.0.linux.x86_64.tar.xz: 700324c6dd0ebea0117591c6cc9d7350d9c7c5c287acbad7630fa17b1d4d9e2f
https://github.com/mvdan/gofumpt/releases/download/v0.5.0/gofumpt_v0.5.0_darwin_amd64: 870f05a23541aad3d20d208a3ea17606169a240f608ac1cf987426198c14b2ed
https://github.com/mvdan/gofumpt/releases/download/v0.5.0/gofumpt_v0.5.0_linux_amd64: 759c6ab56bfbf62cafb35944aef1e0104a117e0aebfe44816fd79ef4b28521e4
22 changes: 22 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: ci
on: [push]
jobs:
cibuild:
name: cibuild
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: WillAbides/setup-go-faster@v1
id: setup-go
with:
go-version: '1.20.x'
- uses: actions/cache@v3
with:
path: |
${{ steps.setup-go.outputs.GOCACHE }}
${{ steps.setup-go.outputs.GOMODCACHE }}
key: ${{ runner.os }}-go-test-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-test
- run: script/test
- run: script/lint
- run: script/generate --check
14 changes: 0 additions & 14 deletions .github/workflows/ci.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/releasable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: releasable
on:
pull_request:
branches:
- main
types:
- labeled
- unlabeled
- synchronize
- opened
- reopened
workflow_dispatch:
jobs:
releasable:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: script/bindown -q install semver-next
- name: check releasable
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bin/semver-next "$GITHUB_REPOSITORY" -r "$GITHUB_SHA" --require-labels
25 changes: 25 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: release
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: WillAbides/setup-go-faster@v1
id: setup-go
with:
go-version: '1.20.x'
- uses: actions/cache@v3
with:
path: |
${{ steps.setup-go.outputs.GOCACHE }}
${{ steps.setup-go.outputs.GOMODCACHE }}
key: ${{ runner.os }}-release-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-release
- run: script/release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: jq '.' dist/metadata.json
9 changes: 5 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ issues:
- goconst
linters:
enable:
- golint
- gosec
- unconvert
- gocyclo
- goconst
- goimports
- gocritic
- gofumpt
- revive
linters-settings:
gocritic:
enabled-tags:
Expand All @@ -31,9 +31,10 @@ linters-settings:
govet:
# report about shadowed variables
check-shadowing: true
gocyclo:
# minimal code complexity to report, 30 by default
min-complexity: 15
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
revive:
rules:
- name: package-comments
disabled: true
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ Flags:
benchmark command line
--bench="." Run only those benchmarks matching a regular expression. To run all
benchmarks, use '--bench .'.
--benchmark-args=args Override the default args to the go command. This may be a template. See
https://github.com/willabides/benchdiff for details."
--benchmark-args=args Override the default args to the go command. This may be a template.
See https://github.com/willabides/benchdiff for details."
--benchmark-cmd="go" The command to use for benchmarks.
--benchmem Memory allocation statistics for benchmarks.
--benchtime=STRING Run enough iterations of each benchmark to take t, specified as a
Expand Down
Loading