Skip to content

Commit

Permalink
update go; update mage-extras; lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Pennebaker committed Aug 14, 2024
1 parent 0179eda commit ff62724
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
golang 1.22.5
golang 1.23.0
nodejs 20.10.0
rust 1.75.0
2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BUILDTIME REQUIREMENTS

* [Go](https://go.dev/) 1.22.5+
* [Go](https://go.dev/) 1.23.0+
* POSIX compatible [make](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html)
* [Node.js](https://nodejs.org/en) 20.10.0+
* [Rust](https://www.rust-lang.org/) 1.75.0+
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/mcandre/buttery

go 1.22
go 1.23

require (
github.com/andybons/gogif v0.0.0-20140526152223-16d573594812
github.com/anthonynsimon/bild v0.13.0
github.com/magefile/mage v1.14.0
github.com/mcandre/mage-extras v0.0.17
github.com/mcandre/mage-extras v0.0.18
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt
github.com/magefile/mage v1.14.0 h1:6QDX3g6z1YvJ4olPhT1wksUcSa/V0a1B+pJb73fBjyo=
github.com/magefile/mage v1.14.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mcandre/mage-extras v0.0.17 h1:Ihe4gfRYpn1Goowzk339YmYC1K9jXN2aJ9GaMUtiGDU=
github.com/mcandre/mage-extras v0.0.17/go.mod h1:OvwmvvrYj+Eb+8LCL8ScRMJ9wr0KMbsbV1Ry68zH99k=
github.com/mcandre/mage-extras v0.0.18 h1:f7aZZGmqnElr3GcMZQvz//cn1uxneHEMrY5X7NysQIM=
github.com/mcandre/mage-extras v0.0.18/go.mod h1:zr+/cO9v8EtPmjHMVYx7ijYrbT3tfJSNgXc9ze6LJ4s=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
Expand Down
14 changes: 11 additions & 3 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ func Test() error {
return cmd.Run()
}

// GoVet runs go vet with shadow checks enabled.
func GoVet() error { return mageextras.GoVetShadow() }
// Deadcode runs deadcode.
func Deadcode() error { return mageextras.Deadcode("./...") }

// GoVet runs default go vet analyzers.
func GoVet() error { return mageextras.GoVet() }

// Gofmt runs gofmt.
func GoFmt() error { return mageextras.GoFmt("-s", "-w") }
Expand All @@ -53,6 +56,9 @@ func Errcheck() error { return mageextras.Errcheck("-blank") }
// Nakedret runs nakedret.
func Nakedret() error { return mageextras.Nakedret("-l", "0") }

// Shadow runs go vet with shadow checks enabled.
func Shadow() error { return mageextras.GoVetShadow() }

// Staticcheck runs staticcheck.
func Staticcheck() error { return mageextras.Staticcheck() }

Expand All @@ -69,11 +75,13 @@ func Unmake() error {

// Lint runs the lint suite.
func Lint() error {
mg.Deps(GoVet)
mg.Deps(Deadcode)
mg.Deps(GoFmt)
mg.Deps(GoImports)
mg.Deps(GoVet)
mg.Deps(Errcheck)
mg.Deps(Nakedret)
mg.Deps(Shadow)
mg.Deps(Staticcheck)
mg.Deps(Unmake)
return nil
Expand Down
3 changes: 2 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ all:
go install github.com/kisielk/errcheck@v1.7.0
go install github.com/magefile/mage@v1.14.0
go install github.com/mcandre/factorio/cmd/factorio@v0.0.6
go install golang.org/x/tools/cmd/deadcode@latest
go install golang.org/x/tools/cmd/goimports@latest
go install golang.org/x/tools/cmd/stringer@latest
go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@latest
go install golang.org/x/vuln/cmd/govulncheck@latest
go install honnef.co/go/tools/cmd/staticcheck@2023.1.3
go install honnef.co/go/tools/cmd/staticcheck@2024.1
go mod tidy

npm install -g snyk
2 changes: 1 addition & 1 deletion vendor/github.com/mcandre/mage-extras/.rubberstamp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/mcandre/mage-extras/.tool-versions

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/mcandre/mage-extras/DEVELOPMENT.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/github.com/mcandre/mage-extras/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions vendor/github.com/mcandre/mage-extras/deadcode.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 13 additions & 9 deletions vendor/github.com/mcandre/mage-extras/magefile.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/github.com/mcandre/mage-extras/makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ github.com/anthonynsimon/bild/transform
# github.com/magefile/mage v1.14.0
## explicit; go 1.12
github.com/magefile/mage/mg
# github.com/mcandre/mage-extras v0.0.17
## explicit; go 1.21
# github.com/mcandre/mage-extras v0.0.18
## explicit; go 1.23
github.com/mcandre/mage-extras

0 comments on commit ff62724

Please sign in to comment.