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

go/lint: forbid print statements in main code and also panic in tests #278

Merged
merged 2 commits into from
Sep 8, 2023

Conversation

adamdecaf
Copy link
Member

@adamdecaf adamdecaf commented Sep 8, 2023

Two changes in this PR:

  • Forbid print statements in main code (but allowed in tests)
  • Allow panic in tests, but keep them forbidden in main code

@adamdecaf
Copy link
Member Author

fmt.Fprint* should still be allowed as that's used for formatting complex rows of text.

@codecov-commenter
Copy link

codecov-commenter commented Sep 8, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (43164af) 78.37% compared to head (48f4a20) 78.37%.
Report is 10 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #278   +/-   ##
=======================================
  Coverage   78.37%   78.37%           
=======================================
  Files           1        1           
  Lines          37       37           
=======================================
  Hits           29       29           
  Misses          4        4           
  Partials        4        4           

☔ View full report in Codecov by Sentry.

📢 Have feedback on the report? Share it here.

@adamdecaf
Copy link
Member Author

@InfernoJJ I added GOLANGCI_ALLOW_PRINT to disable the printf linter on projects like platform-dev where they're helpful.

@adamdecaf adamdecaf merged commit bae6779 into moov-io:master Sep 8, 2023
4 checks passed
@adamdecaf adamdecaf deleted the stricter-forbidigo-in-main branch September 8, 2023 16:35
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

Successfully merging this pull request may close these issues.

None yet

5 participants