Comments (7)
Keeping this open, as we might still consider this in the future.
from gitlint.
gitlint currently doesn't support Windows. No concrete plans either, might be something for the future.
from gitlint.
thanks
from gitlint.
gitlint currently doesn't support Windows.
@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.
from gitlint.
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):
https://github.com/jorisroovers/gitlint/issues?q=is%3Aissue+is%3Aopen+label%3Awindows
I'll be releasing this (marked as experimental) as part of the 0.12.0 release later this week.
from gitlint.
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.
I have created a CommitRule UC1 based on one of your examples.
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
[...]
from gitlint.
Since gitlint supports windows now and this issue is about nothing specific, I'm closing it
from gitlint.
Related Issues (20)
- Ability to have user-defined rules disabled by default HOT 2
- gitlint raises an exception if run without --staged and with an ignore-by-author-name configuration HOT 3
- Support for per-user configuration files and configuration inheritance HOT 9
- Ignore stdin by default in CI HOT 7
- Feature request: generate a junit or sarif report HOT 4
- Allow several --extra-path HOT 1
- v0.19.0dev tag should not be on the default branch HOT 7
- gitlint and gitlint-core v0.19.0 fail to build from sdist HOT 13
- 0.20.0 Release Plan
- Enable support for git archive installs HOT 7
- Consider adopting pypi-publish GHA instead of hatch publish
- Adopt GHA environments HOT 1
- Refactor GHA pipelines for improved security HOT 4
- Investigate smoke testing of sdist package for downstream packaging HOT 3
- Commit message with a hash sign at the start is not detected HOT 5
- Full workflow example for fixing a previously rejected commit message HOT 2
- installing hook on pre-commit fails with newest virtualenv (>20.24.5) present HOT 15
- Forever violations even after being edited HOT 2
- Poetry version solving failure
- Failed to install the `pre-commit` hook HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitlint.