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

--new-from-rev stopped working from version 1.51.1 #3982

Closed
5 tasks done
man0xff opened this issue Aug 2, 2023 · 4 comments
Closed
5 tasks done

--new-from-rev stopped working from version 1.51.1 #3982

man0xff opened this issue Aug 2, 2023 · 4 comments
Labels
area: docker question Further information is requested

Comments

@man0xff
Copy link

man0xff commented Aug 2, 2023

Welcome

Description of the problem

With versions higher than 1.51.0 I'm getting errors running that command:

docker run --rm -v $(pwd):/x -w /x golangci/golangci-lint:<version> golangci-lint run --new-from-rev HEAD

Version 1.51.0 doesn't show any error as expected.

Version of golangci-lint

Tried versions from 1.51.0 and higher.

Configuration

Default configuration.

Go environment

Running from docker.

Verbose output of running

Don't use cache while running the docker image.

Code example or link to a public repository

Validation

  • Yes, I've included all information above (version, config, etc.).
@man0xff man0xff added the bug Something isn't working label Aug 2, 2023
@boring-cyborg
Copy link

boring-cyborg bot commented Aug 2, 2023

Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.

@man0xff man0xff changed the title --new-from-rev ыщзз --new-from-rev stopped working from version 1.51.1 Aug 2, 2023
@ldez
Copy link
Member

ldez commented Aug 2, 2023

Hello,

can you provide "Verbose output of running"?

@ldez ldez added feedback required Requires additional feedback question Further information is requested and removed bug Something isn't working feedback required Requires additional feedback labels Aug 2, 2023
@ldez
Copy link
Member

ldez commented Aug 2, 2023

$ docker run --rm -v $(pwd):/x -w /x golangci/golangci-lint:v1.53.3 golangci-lint run --new-from-rev HEAD
level=warning msg="[runner] Can't process result by diff processor: can't prepare diff by revgrep: no version control repository found"

It's not an error but a warning.

It's related to git:

fatal: detected dubious ownership in repository at '/x'
To add an exception for this directory, call:

        git config --global --add safe.directory /x

you have to run git config --global --add safe.directory /x

@ldez ldez closed this as completed Aug 2, 2023
@man0xff
Copy link
Author

man0xff commented Aug 3, 2023

Thanks, it works. But it might be worth adding some directory to the safe.directory to the original image if it's so important for the tool to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: docker question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants