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

Add gofumpt #210

Merged
merged 5 commits into from
Mar 16, 2023
Merged

Add gofumpt #210

merged 5 commits into from
Mar 16, 2023

Conversation

tomlazar
Copy link
Contributor

Basically the same as gofmt, just a little more strict.

Copy link
Collaborator

@TylerJang27 TylerJang27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there! Thanks for using trunk and for making this contribution! The setup for gofumpt looks great, with just a couple minor comments.

Once you've addressed those feel free to update your PR with main and merge! Thanks again!

Comment on lines +3 to +4
// gofumpt generates a failure on an empty file
linterCheckTest({ linterName: "gofumpt", namedTestPrefixes: ["empty"] });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for calling this out. We may move in the future to adding allow_empty_files: false to both gofumpt and gofmt, but this should be fine for now.

@@ -1,5 +1,5 @@
{
"name": "plugins",
"name": "trunk-plugins",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you back this file change out? Was there something you ran into that brought this up?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nothing specific, must have happened since I renamed my fork as trunk-plugins

@tomlazar
Copy link
Contributor Author

@TylerJang27 should be all good to go!

@TylerJang27 TylerJang27 merged commit 19526b8 into trunk-io:main Mar 16, 2023
@TylerJang27
Copy link
Collaborator

TylerJang27 commented Mar 16, 2023

@tomlazar Thanks again! We probably won't get another release out for a week or so, but if you need gofumpt sooner, you can change the plugin source in your trunk.yaml to look like:

plugins:
  sources:
    - id: trunk
      ref: 19526b8797860900fb9680233943072b78c9f356
      uri: https://github.com/trunk-io/plugins

or you can add your linter definition directly.

@tomlazar tomlazar deleted the add-gofumpt branch March 17, 2023 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants