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

Consider adding goccy/go-json to whitelist #106

Open
ccoVeille opened this issue Nov 11, 2024 · 1 comment
Open

Consider adding goccy/go-json to whitelist #106

ccoVeille opened this issue Nov 11, 2024 · 1 comment

Comments

@ccoVeille
Copy link

ccoVeille commented Nov 11, 2024

I looked on GitHub about the packages commonly excluded from musttag

https://github.com/search?q=path%3A%2F.golangci*%20%22musttag%3A%22%20%22functions%22%20-path%3A*reference*%20&type=code

I found that https://github.com/goccy/go-json is frequently excluded from musttag

musttag:
    functions:
      - name: github.com/goccy/go-json.Marshal
        tag: json
      - name: github.com/goccy/go-json.MarshalContext
        tag: json
      - name: github.com/goccy/go-json.Unmarshal
        tag: json
      - name: github.com/goccy/go-json.UnmarshalContext
        tag: json

Source: https://github.com/heffcodex/goutil/blob/e5bab38739f47b7b9769fb1172543c59f50d331d/.golangci.yml#L140

The lib is very popular: Sourcegraph

cc @goccy, hi 👋, great lib BTW

@ccoVeille ccoVeille changed the title Consider adding goccy/ Consider adding goccy/go-json to whitelist Nov 11, 2024
@ccoVeille
Copy link
Author

ccoVeille commented Nov 11, 2024

I also found https://github.com/json-iterator/go with that search BTW

musttag:
    functions:
      # The full name of the function, including the package.
      - name: github.com/json-iterator/go.Marshal
        # The struct tag whose presence should be ensured.
        tag: json
        # The position of the argument to check.
        arg-pos: 0

Source: https://github.com/releaseband/go-progress-bar/blob/7f3fe8277abe1c6c411c38350071a08faf672b82/.golangci.yaml#L211

maybe musttag could whitelist it too.

But the project is almost unmaintained, but widely used: Sourcegraph

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant