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

Force using repo via command line option #56

Closed
pbregener opened this issue Feb 21, 2018 · 4 comments · Fixed by #89
Closed

Force using repo via command line option #56

pbregener opened this issue Feb 21, 2018 · 4 comments · Fixed by #89
Labels
enhancement User-facing feature enhancements

Comments

@pbregener
Copy link
Contributor

As discussed in #42 and #52, there seem to be problems with the automatic check for data passed in via STDIN and the fallback to using the local repo. As it appears hard to fix, and some of the proposed (and implemented) fixes only fix the problem for certain CI configurations, I would suggest to add a command line option --use-repo (and/or a config file flag) that forces the use of the local repo and ignores any data from STDIN. This would make use in any CI environment and configuration (however proven or obscure that particular one might be) much easier and fool-proof.

This seems like a boring and simple solution to an apparent otherwise difficult-to-solve problem (see above linked issue).

What do you think @jorisroovers?

@jorisroovers
Copy link
Owner

jorisroovers commented Mar 29, 2018

Yeah, I agree, but would suggest to call it --force-local-repo. Happy to accept a PR (with tests & docs please :) http://jorisroovers.github.io/gitlint/contributing/#guidelines ). Thanks!

FWIW, looking at #42 and #52 is a top of mind when I find some proper time to work on gitlint (maybe this weekend?).

@pbregener
Copy link
Contributor Author

As I just wrote in #42 (comment), I'm using a pretty ugly but effective workaround right now. I might try to come up with a PR for this, but on the other hand this will be unnecessary if we can get the STDIN check to work properly.

@jorisroovers
Copy link
Owner

I just saw that, pretty clever workaround :-)

I just started looking into #42 and #52 again and am able to reproduce in Jenkins. The fix from #52 doesn't seem to work, but need to spend more time on it - probably later today or tomorrow.

@pbregener
Copy link
Contributor Author

Will be happy to try other approaches in GitLab CI. Just ping me if you have something that's ready for testing :)

@jorisroovers jorisroovers added the enhancement User-facing feature enhancements label Mar 30, 2018
rogalski added a commit to rogalski/gitlint that referenced this issue Jun 21, 2019
This feature is beneficial when running in automated environments
liek CI servers. Current heuristic fails in some conditions.
With this flag enabled we can simply always ignore stdin
and fall back to using target repo.

Closes jorisroovers#56
jorisroovers pushed a commit that referenced this issue Jul 8, 2019
This feature is beneficial when running in automated environments
liek CI servers. Current heuristic fails in some conditions.
With this flag enabled we can simply always ignore stdin
and fall back to using target repo.

Closes #56
jorisroovers pushed a commit that referenced this issue Jul 8, 2019
This feature is beneficial when running in automated environments
like CI servers. Current heuristic fails in some conditions.
With this flag enabled we can simply always ignore stdin
and fall back to using target repo.

Closes #56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement User-facing feature enhancements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants