summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoris Roovers <jroovers@cisco.com>2018-04-02 11:51:50 +0200
committerJoris Roovers <jroovers@cisco.com>2018-04-02 11:51:50 +0200
commit2a05f1b12bcc830c5d2da93d180230e1f74922dd (patch)
tree745964c0685164e13df2b11d1c4cd78712fb18c0
parent7a964c94c02da7df501afb168696c1a60f0e5d5e (diff)
Cleanup + Changelog update
- Added additional subdirectories for better unit test organization. - Added Changelog details in prep for upcoming v0.10.0 release - Minor documentation tweaks - Some improvements to ./run_tests.sh --stats
-rw-r--r--CHANGELOG.md34
-rw-r--r--Vagrantfile1
-rw-r--r--docs/index.md3
-rw-r--r--gitlint/tests/config/test_config.py (renamed from gitlint/tests/test_config.py)0
-rw-r--r--gitlint/tests/config/test_config_builder.py (renamed from gitlint/tests/test_config_builder.py)0
-rw-r--r--gitlint/tests/config/test_config_precedence.py (renamed from gitlint/tests/test_config_precedence.py)0
-rw-r--r--gitlint/tests/rules/test_body_rules.py (renamed from gitlint/tests/test_body_rules.py)0
-rw-r--r--gitlint/tests/rules/test_configuration_rules.py (renamed from gitlint/tests/test_configuration_rules.py)0
-rw-r--r--gitlint/tests/rules/test_meta_rules.py (renamed from gitlint/tests/test_meta_rules.py)0
-rw-r--r--gitlint/tests/rules/test_title_rules.py (renamed from gitlint/tests/test_title_rules.py)0
-rw-r--r--gitlint/tests/rules/test_user_rules.py (renamed from gitlint/tests/test_user_rules.py)0
-rwxr-xr-xrun_tests.sh9
12 files changed, 43 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f99ccee..76274b1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,37 @@
# Changelog #
+## Unreleased: v0.10.0 (2018-04-?) ##
+The 0.10.0 release adds the ability to ignore commits based on their contents,
+support for [pre-commit](https://pre-commit.com/), and important fix for running gitlint in CI environments
+(such as Jenkins, Gitlab, etc).
+
+Special thanks to @asottile, @bdrung, @pbregener, @torwald-sergesson, @RykHawthorn, @SteffenKockel and @tommyip for
+their contributions.
+
+**Since it's becoming increasingly hard to support Python 2.6 and 3.3, we'd like to encourage our users to upgrade their
+python version to 2.7 or 3.3+. Future versions of gitlint are likely to drop support for Python 2.6 and 3.3.**
+
+Full Changelog:
+
+- New Rule: ```ignore-by-title``` allows users to
+[ignore certain commits](http://jorisroovers.github.io/gitlint/#ignoring-commits) by matching a regex against
+a commit message title. ([#54](https://github.com/jorisroovers/gitlint/issues/54), [#57](https://github.com/jorisroovers/gitlint/issues/57)).
+- New Rule: ```ignore-by-body``` allows users to
+[ignore certain commits](http://jorisroovers.github.io/gitlint/#ignoring-commits) by matching a regex against
+a line in a commit message body.
+- Gitlint now supports [pre-commit.com](https://pre-commit.com).
+[Details in our documentation](http://jorisroovers.github.io/gitlint/#using-gitlint-through-pre-commit)
+([#62](https://github.com/jorisroovers/gitlint/issues/62)).
+- Gitlint now has a ```--msg-filename``` commandline flag that allows you to specify the commit message to lint via
+ a file ([#39](https://github.com/jorisroovers/gitlint/issues/39)).
+- Gitlint will now be silent by default when a specified commit range is empty ([#46](https://github.com/jorisroovers/gitlint/issues/46)).
+- Gitlint can now be installed on MacOS by brew via the [homebrew-devops](https://github.com/rockyluke/homebrew-devops) tap. To get the latest version of gitlint, always use pip for installation.
+- If all goes well,
+[gitlint will also be available as a package in the Ubuntu 18.04 repositories](https://launchpad.net/ubuntu/+source/gitlint).
+- Bugfixes:
+ - We fixed a nasty and recurring issue with running gitlint in CI. Hopefully that's the end of it :-) ([#40](https://github.com/jorisroovers/gitlint/issues/40)).
+ - Fix for custom git comment characters ([#48](https://github.com/jorisroovers/gitlint/issues/48)).
+
## v0.9.0 (2017-12-03) ##
The 0.9.0 release adds a new default ```author-valid-email``` rule, important bugfixes and special case handling.
Special thanks to [joshholl](https://github.com/joshholl), [ron8mcr](https://github.com/ron8mcr),
@@ -13,7 +45,7 @@ and [AlexMooney](https://github.com/AlexMooney) for their contributions.
that linting a single commit using ```gitlint --commits <SHA>``` won't work anymore. Instead, for single commits,
users now need to specificy ```gitlint --commits <SHA>^...<SHA>```. On the upside, this change also means
that gitlint will now understand all refspec formatters, including ```gitlint --commits HEAD``` to lint all commits
- in the repository. This fixes [#23](https://github.com/jorisroovers/gitlint/issues/40).
+ in the repository. This fixes [#23](https://github.com/jorisroovers/gitlint/issues/23).
- **Breaking change**: Gitlint now always falls back on trying to read a git message from a local git repository, only
reading a commit message from STDIN if one is passed. Before, gitlint only read from the local git repository when
a TTY was present. This is likely the expected and desired behavior for anyone running gitlint in a CI environment.
diff --git a/Vagrantfile b/Vagrantfile
index 5a3cf75..e550167 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -9,6 +9,7 @@ sudo add-apt-repository -y ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install -y --allow-unauthenticated python2.6-dev python2.7-dev python3.3-dev python3.4-dev python3.5-dev python3.6-dev
sudo apt-get install -y python-virtualenv git ipython python-pip python3-pip silversearcher-ag
+sudo apt-get purge -y python3-virtualenv
sudo pip3 install virtualenv
./run_tests.sh --uninstall --envs all
diff --git a/docs/index.md b/docs/index.md
index 4adb8a1..aba5a88 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -31,6 +31,9 @@ useful throughout the years.
```bash
# Install gitlint
pip install gitlint
+# On macOS (recommended to use pip for the latest version)
+brew tap rockyluke/devops
+brew install gitlint
# Check the last commit message
gitlint
diff --git a/gitlint/tests/test_config.py b/gitlint/tests/config/test_config.py
index 90595f1..90595f1 100644
--- a/gitlint/tests/test_config.py
+++ b/gitlint/tests/config/test_config.py
diff --git a/gitlint/tests/test_config_builder.py b/gitlint/tests/config/test_config_builder.py
index 9256cac..9256cac 100644
--- a/gitlint/tests/test_config_builder.py
+++ b/gitlint/tests/config/test_config_builder.py
diff --git a/gitlint/tests/test_config_precedence.py b/gitlint/tests/config/test_config_precedence.py
index 49a24ad..49a24ad 100644
--- a/gitlint/tests/test_config_precedence.py
+++ b/gitlint/tests/config/test_config_precedence.py
diff --git a/gitlint/tests/test_body_rules.py b/gitlint/tests/rules/test_body_rules.py
index fcb1b30..fcb1b30 100644
--- a/gitlint/tests/test_body_rules.py
+++ b/gitlint/tests/rules/test_body_rules.py
diff --git a/gitlint/tests/test_configuration_rules.py b/gitlint/tests/rules/test_configuration_rules.py
index 11bdec0..11bdec0 100644
--- a/gitlint/tests/test_configuration_rules.py
+++ b/gitlint/tests/rules/test_configuration_rules.py
diff --git a/gitlint/tests/test_meta_rules.py b/gitlint/tests/rules/test_meta_rules.py
index c94b8b3..c94b8b3 100644
--- a/gitlint/tests/test_meta_rules.py
+++ b/gitlint/tests/rules/test_meta_rules.py
diff --git a/gitlint/tests/test_title_rules.py b/gitlint/tests/rules/test_title_rules.py
index 07d2323..07d2323 100644
--- a/gitlint/tests/test_title_rules.py
+++ b/gitlint/tests/rules/test_title_rules.py
diff --git a/gitlint/tests/test_user_rules.py b/gitlint/tests/rules/test_user_rules.py
index 3c24b95..3c24b95 100644
--- a/gitlint/tests/test_user_rules.py
+++ b/gitlint/tests/rules/test_user_rules.py
diff --git a/run_tests.sh b/run_tests.sh
index 38fd12e..67d21d6 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -187,15 +187,18 @@ run_stats(){
echo "*** Code ***"
radon raw -s gitlint | tail -n 6
echo "*** Docs ***"
- echo " Markdown: $(cat docs/*.md | wc -l) lines"
+ echo " Markdown: $(cat docs/*.md | wc -l | tr -d " ") lines"
echo "*** Tests ***"
nr_unit_tests=$(py.test gitlint/ --collect-only | grep TestCaseFunction | wc -l)
nr_integration_tests=$(py.test qa/ --collect-only | grep TestCaseFunction | wc -l)
echo " Unit Tests: ${nr_unit_tests//[[:space:]]/}"
echo " Integration Tests: ${nr_integration_tests//[[:space:]]/}"
echo "*** Git ***"
- echo " Number of commits: $(git rev-list --all --count)"
- echo " Number of authors: $(git log --format='%aN' | sort -u | wc -l | tr -d ' ')"
+ echo " Commits: $(git rev-list --all --count)"
+ echo " Commits (master): $(git rev-list master --count)"
+ echo " First commit: $(git log --pretty="%aD" $(git rev-list --max-parents=0 HEAD))"
+ echo " Contributors: $(git log --format='%aN' | sort -u | wc -l | tr -d ' ')"
+ echo " Releases (tags): $(git tag --list | wc -l | tr -d ' ')"
}
clean(){