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 ability to specify path prefix in output #1225

Closed
wants to merge 2 commits into from

Conversation

jwilner
Copy link
Contributor

@jwilner jwilner commented Jul 10, 2020

problem

It's often convenient in monorepos to run a tool from a different directory but still report issues relative to the root of the repository.

This is exactly the problem in the github action golangci/golangci-lint-action#31

proposed solution

Add a flag for specifying a path prefix in output. Default behavior remains the same.


Thanks for a great tool!

@boring-cyborg
Copy link

boring-cyborg bot commented Jul 10, 2020

Hey, thank you for opening your first Pull Request !

@CLAassistant
Copy link

CLAassistant commented Jul 10, 2020

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@SVilgelm SVilgelm left a comment

Choose a reason for hiding this comment

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

Hello, thank you!
I think it is really useful, but could you please add the tests in test/run_test.go to cover new functionality?

@@ -413,6 +417,14 @@ func (e *Executor) createPrinter() (printers.Printer, error) {
return p, nil
}

func (e *Executor) postProcess(issues []result.Issue) {
Copy link
Member

Choose a reason for hiding this comment

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

I was about to add the comment for Processor pattern to make it more composable, but then saw your #1226

Which approach do you prefer?

Copy link
Member

Choose a reason for hiding this comment

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

+1 for the #1226
It looks more appropriate

@jwilner jwilner closed this Jul 10, 2020
@jwilner
Copy link
Contributor Author

jwilner commented Jul 10, 2020

@sayboras @SVilgelm closed in deference to the other. Thanks y'all.

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

4 participants