Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate to a vanity import path #41

Merged
merged 1 commit into from
Apr 20, 2023
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
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