git-lint icon indicating copy to clipboard operation
git-lint copied to clipboard

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

Open emailallau opened this issue 7 years ago • 7 comments

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

emailallau avatar Mar 20 '18 05:03 emailallau

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

emailallau avatar May 09 '18 08:05 emailallau

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.

sk- avatar May 09 '18 13:05 sk-

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

emailallau avatar May 10 '18 13:05 emailallau

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...

eldamir avatar May 28 '18 12:05 eldamir

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.

sk- avatar May 31 '18 21:05 sk-

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

eldamir avatar Jun 01 '18 08:06 eldamir

Yes by using git reset followed by gitlint, was able to run gitlint on entire set of changes as part of CI.

Thanks for the inputs.....:)

On Fri, Jun 1, 2018 at 1:35 PM, Ruben Nielsen [email protected] wrote:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sk-/git-lint/issues/110#issuecomment-393801389, or mute the thread https://github.com/notifications/unsubscribe-auth/AIFZqHZU_40SzRDScZ6ehX_vAJv77Xfwks5t4PW5gaJpZM4SxVtE .

-- Regards, Mohd Allauddin Mob no - 9986621933

emailallau avatar Jun 04 '18 05:06 emailallau