-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Windows issues #20
Comments
gitlint currently doesn't support Windows. No concrete plans either, might be something for the future. |
Users can now install gitlint on Windows, but will get an error when they try executing it. While there is no direct roadmap for supporting gitlint on Windows, this commit does already get rid of any errors at installation time. This commit is part of #20.
The 0.8.1 release brings minor tweaks and some experimental features. Special thanks to tommyip for his contributions. - Experimental: Linting a range of commits. Known Caveats: #23, #24. Thanks to tommyip for implementing this! - Experimental: Python 3.6 support - Improved Windows error messaging: gitlint will now show a more descriptive error message when ran on windows. See #20 for details on the lack of Windows support. Full Release details in CHANGELOG.md.
thanks |
Keeping this open, as we might still consider this in the future. |
This commit introduces the gitlint.git._git(...) convenience function for executing git commands. The main benefit of this is that all error and unicode handling of git commands is now uniform as it's done in a single place. In addition, this refactor has the effect of the 'sh' library only being invoked in a single place in the entire gitlint codebase. This will make it easier to replace it in the future, for example when we'd consider adding Windows support (see #20). This commit also fixes some unit tests related to custom comment chars as introduced by #34.
@jorisroovers , I think, it would be nice, if you will show it at the beginning of README and documentation, that Windows users do not waste their time. Thanks. |
- Replaced all open() statements with io.open(), this improves unicode file handling - Removed a bunch of hard-coded forward slashes to use os.path.join instead, this is more OS agnostic - Replaced os.path.abspath with os.path.realpath for improved symlink handling This commit relates to #20
Made some time to work on this a bit. Relevant commits: cc5e6d8 and 20ac439. I'm not a Windows user myself, but from the basic testing I did on a Windows 10 VM using Python 2.7 and Python 3.7, basic linting functionality seems to work. I'd appreciate anyone doing additional testing to confirm its working and report any bugs they find. I've already merged this work into master. Things that work: # lint latest commit
gitlint
gitlint -v --ignore T3,T5 # Options seem to work too
# Pass a message via stdin
echo "WIP: foöbar" > gitlint
git log -1 --pretty=%B | gitlint
# Commit ranges
gitlint --commits HEAD~2^..HEAD However, I've also found a number of issues (some worse than others): I'll be releasing this (marked as experimental) as part of the 0.12.0 release later this week. |
edit(jorisroovers): Moved this comment to a new issue - see #107 Hello, I tried creating user-defined rules on a Windows host (using Git-Bash) and those are not discovered. Do you experience the same behavior? $ gitlint --debug --extra-path myextensions/rules.py
DEBUG: gitlint.cli To report issues, please visit https://github.com/jorisroovers/gitlint/issues
DEBUG: gitlint.cli Platform: Windows-10-10.0.17763
DEBUG: gitlint.cli Python version: 2.7.16 (v2.7.16:413a49145e, Mar 4 2019, 01:37:19) [MSC v.1500 64 bit (AMD64)]
DEBUG: gitlint.cli Git version: git version 2.18.0.windows.1
DEBUG: gitlint.cli Gitlint version: 0.12.0
DEBUG: gitlint.cli GITLINT_USE_SH_LIB: [NOT SET]
DEBUG: gitlint.cli Configuration
config-path: C:\Users\xyz\path\.gitlint
[GENERAL]
extra-path: C:\Users\xyz\path\myextensions\rules.py
contrib: [u'contrib-title-conventional-commits']
ignore:
ignore-merge-commits: True
ignore-fixup-commits: True
ignore-squash-commits: True
ignore-stdin: True
verbosity: 3
debug: True
target: C:\Users\xyz\path
[RULES]
I1: ignore-by-title
ignore=all
regex=^Release(.*)
I2: ignore-by-body
ignore=all
regex=None
T1: title-max-length
line-length=70
[...]
CT1: contrib-title-conventional-commits
types=build,ci,doc,feat,fix,perf,refactor,style,test
[...] |
Since gitlint supports windows now and this issue is about nothing specific, I'm closing it |
When trying to install on windows 7 with python 2.7.11 - I got following error trace:
Installation of pbs 0.110 did not help to resolve the issue - same error occurs
The text was updated successfully, but these errors were encountered: