1
0
Fork 0

Merging upstream version 0.17.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 06:06:00 +01:00
parent c90d4ccbc4
commit 435cb3a48d
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
128 changed files with 72 additions and 100 deletions

View file

@ -108,7 +108,7 @@ ignore-merge-commits=false
# This is useful for when developers often erroneously edit certain files or git submodules.
# By specifying this rule, developers can only change the file when they explicitly
# reference it in the commit message.
files=gitlint/rules.py,README.md
files=gitlint-core/gitlint/rules.py,README.md
[body-match-regex]
# python-style regex that the commit-msg body must match.

View file

@ -13,7 +13,7 @@ that's open to a lot of change and input.
When contributing code, please consider all the parts that are typically required:
- [Unit tests](https://github.com/jorisroovers/gitlint/tree/main/gitlint/tests) (automatically
- [Unit tests](https://github.com/jorisroovers/gitlint/tree/main/gitlint-core/gitlint/tests) (automatically
[enforced by CI](https://github.com/jorisroovers/gitlint/actions)). Please consider writing
new ones for your functionality, not only updating existing ones to make the build pass.
- [Integration tests](https://github.com/jorisroovers/gitlint/tree/main/qa) (also automatically
@ -118,8 +118,8 @@ Then, we suggest taking the following approach to add a Contrib rule:
1. **Write your rule as a [user-defined rule](../user_defined_rules)**. In terms of code, Contrib rules are identical to
user-defined rules, they just happen to have their code sit within the gitlint codebase itself.
2. **Add your user-defined rule to gitlint**. You should put your file(s) in the [gitlint/contrib/rules](https://github.com/jorisroovers/gitlint/tree/main/gitlint/contrib/rules) directory.
3. **Write unit tests**. The gitlint codebase contains [Contrib rule test files you can copy and modify](https://github.com/jorisroovers/gitlint/tree/main/gitlint/tests/contrib/rules).
2. **Add your user-defined rule to gitlint**. You should put your file(s) in the [gitlint/contrib/rules](https://github.com/jorisroovers/gitlint/tree/main/gitlint-core/gitlint/contrib/rules) directory.
3. **Write unit tests**. The gitlint codebase contains [Contrib rule test files you can copy and modify](https://github.com/jorisroovers/gitlint/tree/main/gitlint-core/gitlint/tests/contrib/rules).
4. **Write documentation**. In particular, you should update the [gitlint/docs/contrib_rules.md](https://github.com/jorisroovers/gitlint/blob/main/docs/contrib_rules.md) file with details on your Contrib rule.
5. **Create a Pull Request**: code review typically requires a bit of back and forth. Thanks for your contribution!

View file

@ -315,7 +315,7 @@ general `ignore-merge-commits`, `ignore-revert-commits`, `ignore-fixup-commits`
You can configure gitlint to ignore specific commits or parts of a commit.
One way to do this, is to by [adding a gitline-ignore line to your commit message](configuration.md#commit-specific-config).
One way to do this, is by [adding a gitlint-ignore line to your commit message](configuration.md#commit-specific-config).
If you have a case where you want to ignore a certain type of commits all-together, you can
use gitlint's *ignore* rules.

View file

@ -374,7 +374,7 @@ class ReleaseConfigurationRule(ConfigurationRule):
```
For all available properties and methods on the `config` object, have a look at the
[LintConfig class](https://github.com/jorisroovers/gitlint/blob/main/gitlint/config.py). Please do not use any
[LintConfig class](https://github.com/jorisroovers/gitlint/blob/main/gitlint-core/gitlint/config.py). Please do not use any
properties or methods starting with an underscore, as those are subject to change.
@ -385,7 +385,7 @@ As long as you stick with simple rules that are similar to the sample user-defin
should be able to discover and execute them. While clearly you can run any python code you want in your rules,
you might run into some issues if you don't follow the conventions that gitlint requires.
While the [rule finding source-code](https://github.com/jorisroovers/gitlint/blob/main/gitlint/rule_finder.py) is the
While the [rule finding source-code](https://github.com/jorisroovers/gitlint/blob/main/gitlint-core/gitlint/rule_finder.py) is the
ultimate source of truth, here are some of the requirements that gitlint enforces.
### Rule class requirements