Skip to content

Commit

Permalink
chore: migrate to a vanity import path (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmzane committed Apr 20, 2023
1 parent f305f3a commit 81e33a8
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 17 deletions.
9 changes: 4 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ archives:

brews:
- tap:
owner: junk1tm
owner: tmzane
name: homebrew-tap
branch: main
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
homepage: "https://github.com/junk1tm/musttag"
description: "A Go linter that enforces field tags in (un)marshaled structs"
license: "MIT"
homepage: https://github.com/tmzane/musttag
description: A Go linter that enforces field tags in (un)marshaled structs
license: MPL-2.0
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# musttag

[![ci](https://github.com/junk1tm/musttag/actions/workflows/go.yml/badge.svg)](https://github.com/junk1tm/musttag/actions/workflows/go.yml)
[![docs](https://pkg.go.dev/badge/github.com/junk1tm/musttag.svg)](https://pkg.go.dev/github.com/junk1tm/musttag)
[![report](https://goreportcard.com/badge/github.com/junk1tm/musttag)](https://goreportcard.com/report/github.com/junk1tm/musttag)
[![codecov](https://codecov.io/gh/junk1tm/musttag/branch/main/graph/badge.svg)](https://codecov.io/gh/junk1tm/musttag)
[![ci](https://github.com/tmzane/musttag/actions/workflows/go.yml/badge.svg)](https://github.com/tmzane/musttag/actions/workflows/go.yml)
[![docs](https://pkg.go.dev/badge/go.tmz.dev/musttag.svg)](https://pkg.go.dev/go.tmz.dev/musttag)
[![report](https://goreportcard.com/badge/github.com/tmzane/musttag)](https://goreportcard.com/report/github.com/tmzane/musttag)
[![codecov](https://codecov.io/gh/tmzane/musttag/branch/main/graph/badge.svg)](https://codecov.io/gh/tmzane/musttag)

A Go linter that enforces field tags in (un)marshaled structs

Expand Down Expand Up @@ -59,7 +59,7 @@ linters:
If you'd rather prefer to use `musttag` standalone, you can install it via `brew`...

```shell
brew install junk1tm/tap/musttag
brew install tmzane/tap/musttag
```

...or download a prebuilt binary from the [Releases][8] page.
Expand Down Expand Up @@ -101,4 +101,4 @@ musttag -fn="github.com/jmoiron/sqlx.Get:db:1" ./...
[5]: https://github.com/BurntSushi/toml
[6]: https://github.com/mitchellh/mapstructure
[7]: https://github.com/jmoiron/sqlx
[8]: https://github.com/junk1tm/musttag/releases
[8]: https://github.com/tmzane/musttag/releases
2 changes: 1 addition & 1 deletion cmd/musttag/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"runtime"

"github.com/junk1tm/musttag"
"go.tmz.dev/musttag"
"golang.org/x/tools/go/analysis/singlechecker"
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/junk1tm/musttag
module go.tmz.dev/musttag

go 1.19

Expand Down
4 changes: 2 additions & 2 deletions musttag.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ var (
pass.Reportf(st.Pos, format, st.Name, fn.Tag, fn.shortName(), fnPos)
}

// HACK(junk1tm): mainModulePackages() does not return packages from `testdata`,
// HACK: mainModulePackages() does not return packages from `testdata`,
// because it is ignored by the go tool, and thus, by the `go list` command.
// For tests to pass we need to add the packages with tests to the main module manually.
testPackages []string
Expand Down Expand Up @@ -244,7 +244,7 @@ func (c *checker) checkStructType(st *structType, tag string) (*structType, bool
}
}

nested, ok := c.parseStructType(field.Type(), st.Pos) // TODO(junk1tm): or field.Pos()?
nested, ok := c.parseStructType(field.Type(), st.Pos) // TODO: or field.Pos()?
if !ok {
continue
}
Expand Down
2 changes: 1 addition & 1 deletion musttag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

func TestAnalyzer(t *testing.T) {
// NOTE(junk1tm): analysistest does not yet support modules;
// NOTE: analysistest does not yet support modules;
// see https://github.com/golang/go/issues/37054 for details.
// To be able to run tests with external dependencies,
// we first need to write a GOPATH-like tree of stubs.
Expand Down
2 changes: 1 addition & 1 deletion utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func mainModule() (dir string, packages map[string]struct{}, _ error) {
// > When using modules, "all" expands to all packages in the main module
// > and their dependencies, including dependencies needed by tests of any of those.

// NOTE(junk1tm): the command may run out of file descriptors if go version <= 1.18,
// NOTE: the command may run out of file descriptors if go version <= 1.18,
// especially on macOS, which has the default soft limit set to 256 (ulimit -nS).
// Since go1.19 the limit is automatically increased to the maximum allowed value;
// see https://github.com/golang/go/issues/46279 for details.
Expand Down

0 comments on commit 81e33a8

Please sign in to comment.