Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Run git-lint against diff of range of commits, such that it can be used in CI #110

Open
emailallau opened this issue Mar 20, 2018 · 7 comments

Comments

@emailallau
Copy link

Does git-lint works as expected for last commit changes?

@emailallau emailallau changed the title git-lint --last-commit does not give pylint errors Run git-lint against diff of range of commits, such that it can be used in CI May 9, 2018
@emailallau
Copy link
Author

Does git-lint support running git-lint against diff of range of commits, such that it can be used in CI

@sk-
Copy link
Owner

sk- commented May 9, 2018

Not at the moment. I'm exploring though some git recipes, with which you could uncommit (while preserving the changes) the last commits so that you can use it in a CI environment.

@emailallau
Copy link
Author

Any information on the same, would be useful, appreciate your quick response.

@eldamir
Copy link

eldamir commented May 28, 2018

I'm thinking of a case where I am about do merge a feature branch back into master, and would love to be able to (og have the CI do) something like git lint master..., that is, all the commits/changes/whatever, which is in the current branch but not in master. I use the similar range often with git diff master... or git log master...

@sk-
Copy link
Owner

sk- commented May 31, 2018

Hi @eldamir and @emailallau , I just enabled git-lint in travis CI .What I did is documented in the homepage, but is basically adding the step

git reset --soft ${TRAVIS_COMMIT_RANGE%...*} && git lint

In Circle CI something similar can be done with the environment variable CIRCLE_COMPARE_URL.

Let me know if that works for you.

@eldamir
Copy link

eldamir commented Jun 1, 2018

@sk- Not exactly what I had in mind, but I think it achieves the same things that I want, so thanks :)

@emailallau
Copy link
Author

emailallau commented Jun 4, 2018 via email

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

No branches or pull requests

3 participants