Skip to content

Commit

Permalink
Update all URLs to point to new docs
Browse files Browse the repository at this point in the history
- Replace old URLs with new doc URLs in code, README, CHANGELOG.
  Critical old URLs, for example those printed by gitlint itself in the past,
  will keep working and redirect to the new URL.
- Ensure all links are https (no http)
- Fix incorrect top-level doc URL path for user defined rules
  (rename getting_started.md to index.md).
- Replace few accidental uses of jorisroovers.com/gitlint with
  jorisroovers.github.io/gitlint
- Re-enable strict mode in mkdocs
  • Loading branch information
jorisroovers committed May 10, 2023
1 parent 149774c commit 4a813a3
Show file tree
Hide file tree
Showing 29 changed files with 83 additions and 78 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/issue-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A few quick notes:
- If you can, please include the output of `gitlint --debug` as this includes useful debugging info.
- It's really just me (https://github.com/jorisroovers) maintaining gitlint, and I do so in a hobby capacity. More recently it has become harder for me to find time to maintain gitlint on a regular basis, which in practice means that it might take me a while (sometimes months) to get back to you. Rest assured though, I absolutely read all bug reports as soon as they come in - I just tend to only "work" on gitlint a few times a year.
- If you're looking to contribute code to gitlint, please start here: http://jorisroovers.github.io/gitlint/contributing/
- If you're looking to contribute code to gitlint, please start here: https://jorisroovers.github.io/gitlint/contributing/
-->

Expand Down
2 changes: 1 addition & 1 deletion .gitlint
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[general]
# See https://jorisroovers.com/gitlint/configuration/#regex-style-search
# https://jorisroovers.github.io/gitlint/configuration/general_options/#regex-style-search
regex-style-search=True

# Dependabot tends to generate lines that exceed the default 80 char limit.
Expand Down
70 changes: 35 additions & 35 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

Thanks for your interest in contributing to gitlint!

Instructions on how to get started can be found on [http://jorisroovers.github.io/gitlint/contributing](http://jorisroovers.github.io/gitlint/contributing/).
Instructions on how to get started can be found on [https://jorisroovers.github.io/gitlint/contributing](https://jorisroovers.github.io/gitlint/contributing/).

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# gitlint: [jorisroovers.github.io/gitlint](http://jorisroovers.github.io/gitlint/) #
# gitlint: [jorisroovers.github.io/gitlint](https://jorisroovers.github.io/gitlint/) #

[![Tests](https://github.com/jorisroovers/gitlint/workflows/Tests%20and%20Checks/badge.svg)](https://github.com/jorisroovers/gitlint/actions?query=workflow%3A%22Tests+and+Checks%22)
[![Coverage Status](https://coveralls.io/repos/github/jorisroovers/gitlint/badge.svg?branch=fix-coveralls)](https://coveralls.io/github/jorisroovers/gitlint?branch=fix-coveralls)
Expand All @@ -7,9 +7,9 @@

Git commit message linter written in python, checks your commit messages for style.

**See [jorisroovers.github.io/gitlint](http://jorisroovers.github.io/gitlint/) for full documentation.**
**See [jorisroovers.github.io/gitlint](https://jorisroovers.github.io/gitlint/) for full documentation.**

<a href="http://jorisroovers.github.io/gitlint/" target="_blank">
<a href="https://jorisroovers.github.io/gitlint/" target="_blank">
<img src="https://raw.githubusercontent.com/jorisroovers/gitlint/main/docs/images/readme-gitlint.png" />
</a>

Expand All @@ -18,7 +18,7 @@ All contributions are welcome and very much appreciated!

**I'm [looking for contributors](https://github.com/jorisroovers/gitlint/issues/134) that are interested in taking a more active co-maintainer role as it's becoming increasingly difficult for me to find time to maintain gitlint. Please leave a comment in [#134](https://github.com/jorisroovers/gitlint/issues/134) if you're interested!**

See [jorisroovers.github.io/gitlint/contributing](http://jorisroovers.github.io/gitlint/contributing) for details on
See [jorisroovers.github.io/gitlint/contributing](https://jorisroovers.github.io/gitlint/contributing) for details on
how to get started - it's easy!

We maintain a [loose project plan on Github Projects](https://github.com/users/jorisroovers/projects/1/views/1).
2 changes: 1 addition & 1 deletion docs/configuration/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Usage: gitlint [OPTIONS] COMMAND [ARGS]...
Git lint tool, checks your git commit messages for styling issues
Documentation: http://jorisroovers.github.io/gitlint
Documentation: https://jorisroovers.github.io/gitlint
Options:
--target DIRECTORY Path of the target git repository. [default:
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/general_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ Path where gitlint looks for a config file.
## extra-path
[:octicons-tag-24: v0.8.0][v0.8.0]

Path where gitlint looks for [user-defined rules](../rules/user_defined_rules/getting_started.md).
Path where gitlint looks for [user-defined rules](../rules/user_defined_rules/index.md).

| Default value | Type | CLI flag | Env var |
| ---------------------- | -------------- | -------------------- | -------------------- |
Expand Down
4 changes: 2 additions & 2 deletions docs/configuration/gitlint_file.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ ignore=T1,body-min-length
on *valid but empty* commit ranges. Disabled by default.
3. Disabled by default, but will be enabled by default in the future. [More information](general_options.md#regex-style-search).
4. See [Contrib Rules](../rules/contrib_rules.md).
5. See [User Defined Rules](../rules/user_defined_rules/getting_started.md).
5. See [User Defined Rules](../rules/user_defined_rules/index.md).
6. All sections below sets rule specific behavior. <br/>
Rules and sections can be referenced by their full name or by id. For example, this rule
`[title-max-length]` could also be referenced as `[T1]`.
Expand Down Expand Up @@ -172,7 +172,7 @@ ignore=T1,body-min-length
ignore=all
```

19. [User-Defined rules](../rules/user_defined_rules/getting_started.md) can be written in python to tailor gitlint to your specific needs.
19. [User-Defined rules](../rules/user_defined_rules/index.md) can be written in python to tailor gitlint to your specific needs.
20. [Named Rules](../rules/named_rules.md) allow you to specify multiple instances of the same rule by given them an extra name of your
choosing after the colon sign `:`. <br><br> In the example below we're configuring another instances of the
`title-must-not-contain-word` rule (the existing one will remain active as well) and naming it `Additional-Words`.
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/contrib_rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ itself. Thanks for considering to add a new one to gitlint!
Before starting, please read all the other documentation about contributing first.
Then, we suggest taking the following approach to add a Contrib rule:

1. **Write your rule as a [user-defined rule](../rules/user_defined_rules/getting_started.md)**. In terms of code, Contrib rules are identical to
1. **Write your rule as a [user-defined rule](../rules/user_defined_rules/index.md)**. 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-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).
Expand Down
2 changes: 1 addition & 1 deletion docs/demos/scenario.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ gitlint

gitlint --ignore title-trailing-punctuation

# For more info, visit: http://jorisroovers.github.io/gitlint
# For more info, visit: https://jorisroovers.github.io/gitlint

exit

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ a [CI pipeline](ci.md).
- **Commit message hook**: [Auto-trigger validations against new commit message right when you're committing](commit_hooks.md). Also [works with pre-commit](commit_hooks.md#pre-commit).
- **Perfect for CI**: Gitlint is designed to work [with your own scripts or CI system](ci.md).
- **Community contributed rules**: Conventions that are common but not universal [can be selectively enabled](rules/contrib_rules.md).
- **User-defined rules:** Want to do more then what gitlint offers out of the box? Write your own [user defined rules](rules/user_defined_rules/getting_started.md).
- **User-defined rules:** Want to do more then what gitlint offers out of the box? Write your own [user defined rules](rules/user_defined_rules/index.md).
- **Sane defaults:** Many of gitlint's validations are based on
[well-known](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html),
[community](https://addamhardy.com/2013-06-05-good-commit-messages-and-enforcing-them-with-git-hooks),
Expand Down
10 changes: 7 additions & 3 deletions docs/javascript/extra.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ document.addEventListener("DOMContentLoaded", function () {
new Termynal(termynalEl);
});

// Redirect /gitlint/configuration/#regex-style-search to /gitlint/configuration/general_options/#regex-style-search
// Redirect /gitlint/configuration/#<option> to /gitlint/configuration/general_options/#<option>
// This is to support old links that are in gitlint's CLI Output
// If the trailing slash is missing from /gitlint/configuration, mkdocs will redirect to the trailing slash version,
// and then this code will redirect to the correct page
if (window.location.pathname == "/gitlint/configuration/" && window.location.hash === "#regex-style-search") {
window.location.href = "/gitlint/configuration/general_options/#regex-style-search";
if (window.location.pathname == "/gitlint/configuration/") {
if (window.location.hash === "#regex-style-search") {
window.location.href = "/gitlint/configuration/general_options/#regex-style-search";
} else if (window.location.hash === "#staged") {
window.location.href = "/gitlint/configuration/general_options/#staged";
}
}
});
2 changes: 1 addition & 1 deletion docs/rules/contrib_rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Contrib rules are community-**contrib**uted rules that are disabled by default,

Contrib rules are meant to augment default gitlint behavior by providing users with rules for common use-cases without
forcing these rules on all gitlint users. This also means that users don't have to
re-implement these commonly used rules themselves as [user-defined](user_defined_rules/getting_started.md) rules.
re-implement these commonly used rules themselves as [user-defined](user_defined_rules/index.md) rules.

Example:

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ Gitlint has different types of rules:

- **[Built-in rules](builtin_rules.md)**: the rules that come with gitlint and are enabled by default.
- **[Community **contrib**uted rules](contrib_rules.md)**: disabled by default, but can be enabled through configuration.
- **[User-defined rule](user_defined_rules/getting_started.md)**: your own rules written in a few lines of python.
- **[User-defined rule](user_defined_rules/index.md)**: your own rules written in a few lines of python.
- **[Named rules](named_rules.md)**: multiple instances of rules, identified by unique names of your choosing
2 changes: 1 addition & 1 deletion docs/rules/named_rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,5 @@ Named rules are further treated identical to all other rules in gitlint:
GITLINT_IGNORE="T5:more-words,title-must-not-contain-word:extra-words" gitlint
```

- You can use them to instantiate multiple of the same [user-defined rule](user_defined_rules/getting_started.md)
- You can use them to instantiate multiple of the same [user-defined rule](user_defined_rules/index.md)
- You can configure them using [any of the ways you can configure regular gitlint rules](../configuration/index.md)
File renamed without changes.
4 changes: 2 additions & 2 deletions examples/gitlint
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Rules and sections can be referenced by their full name or by id. For example
# section "[body-max-line-length]" could be written as "[B1]". Full section names are
# used in here for clarity.
# Rule reference documentation: http://jorisroovers.github.io/gitlint/rules/
# Rule reference documentation: https://jorisroovers.github.io/gitlint/rules/
#
# Note that this file is not exhaustive, it's just an example
# Use 'gitlint generate-config' to generate a config file with all possible options
Expand All @@ -20,7 +20,7 @@ ignore-merge-commits=true
debug = true

# Set the extra-path where gitlint will search for user defined rules
# See http://jorisroovers.github.io/gitlint/user_defined_rules for details
# See https://jorisroovers.github.io/gitlint/user_defined_rules for details
# extra-path=examples/

[title-max-length]
Expand Down
2 changes: 1 addition & 1 deletion examples/my_commit_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from gitlint.rules import CommitRule, RuleViolation

"""
Full details on user-defined rules: https://jorisroovers.com/gitlint/user_defined_rules
Full details on user-defined rules: https://jorisroovers.github.io/gitlint/rules/user_defined_rules
The classes below are examples of user-defined CommitRules. Commit rules are gitlint rules that
act on the entire commit at once. Once the rules are discovered, gitlint will automatically take care of applying them
Expand Down
2 changes: 1 addition & 1 deletion examples/my_configuration_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


"""
Full details on user-defined rules: https://jorisroovers.com/gitlint/user_defined_rules
Full details on user-defined rules: https://jorisroovers.github.io/gitlint/user_defined_rules
The ReleaseConfigurationRule class below is an example of a user-defined ConfigurationRule. Configuration rules are
gitlint rules that are applied once per commit and BEFORE any other rules are run. Configuration Rules are meant to
Expand Down
2 changes: 1 addition & 1 deletion examples/my_line_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from gitlint.rules import CommitMessageTitle, LineRule, RuleViolation

"""
Full details on user-defined rules: https://jorisroovers.com/gitlint/user_defined_rules
Full details on user-defined rules: https://jorisroovers.github.io/gitlint/user_defined_rules
The SpecialChars class below is an example of a user-defined LineRule. Line rules are gitlint rules that only act on a
single line at once. Once the rule is discovered, gitlint will automatically take care of applying this rule
Expand Down
8 changes: 4 additions & 4 deletions gitlint-core/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Gitlint-core

# gitlint: [jorisroovers.github.io/gitlint](http://jorisroovers.github.io/gitlint/) #
# gitlint: [jorisroovers.github.io/gitlint](https://jorisroovers.github.io/gitlint/) #

[![Tests](https://github.com/jorisroovers/gitlint/workflows/Tests%20and%20Checks/badge.svg)](https://github.com/jorisroovers/gitlint/actions?query=workflow%3A%22Tests+and+Checks%22)
[![Coverage Status](https://coveralls.io/repos/github/jorisroovers/gitlint/badge.svg?branch=fix-coveralls)](https://coveralls.io/github/jorisroovers/gitlint?branch=fix-coveralls)
Expand All @@ -9,9 +9,9 @@

Git commit message linter written in python, checks your commit messages for style.

**See [jorisroovers.github.io/gitlint](http://jorisroovers.github.io/gitlint/) for full documentation.**
**See [jorisroovers.github.io/gitlint](https://jorisroovers.github.io/gitlint/) for full documentation.**

<a href="http://jorisroovers.github.io/gitlint/" target="_blank">
<a href="https://jorisroovers.github.io/gitlint/" target="_blank">
<img src="https://raw.githubusercontent.com/jorisroovers/gitlint/main/docs/images/readme-gitlint.png" />
</a>

Expand All @@ -20,7 +20,7 @@ All contributions are welcome and very much appreciated!

**I'm [looking for contributors](https://github.com/jorisroovers/gitlint/issues/134) that are interested in taking a more active co-maintainer role as it's becoming increasingly difficult for me to find time to maintain gitlint. Please leave a comment in [#134](https://github.com/jorisroovers/gitlint/issues/134) if you're interested!**

See [jorisroovers.github.io/gitlint/contributing](http://jorisroovers.github.io/gitlint/contributing) for details on
See [jorisroovers.github.io/gitlint/contributing](https://jorisroovers.github.io/gitlint/contributing) for details on
how to get started - it's easy!

We maintain a [loose project plan on Github Projects](https://github.com/users/jorisroovers/projects/1/views/1).
2 changes: 1 addition & 1 deletion gitlint-core/gitlint/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def cli(
):
""" Git lint tool, checks your git commit messages for styling issues
Documentation: http://jorisroovers.github.io/gitlint
Documentation: https://jorisroovers.github.io/gitlint
"""
try:
if debug:
Expand Down
2 changes: 1 addition & 1 deletion gitlint-core/gitlint/deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def get_regex_method(cls, rule, regex_option):
"'search' (match anywhere) semantics. "
f"Please review your {rule.name}.regex option accordingly. "
"To remove this warning, set general.regex-style-search=True. "
"More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search"
"More details: https://jorisroovers.github.io/gitlint/configuration/general_options/#regex-style-search"
)

# Only log warnings once
Expand Down
7 changes: 4 additions & 3 deletions gitlint-core/gitlint/files/gitlint
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,20 @@
# fail-without-commits=true

# Whether to use Python `search` instead of `match` semantics in rules that use
# regexes. Context: https://github.com/jorisroovers/gitlint/issues/254
# regexes.
# Context: https://jorisroovers.github.io/gitlint/configuration/general_options/#regex-style-search
# Disabled by default, but will be enabled by default in the future.
# regex-style-search=true

# Enable debug mode (prints more output). Disabled by default.
# debug=true

# Enable community contributed rules
# See http://jorisroovers.github.io/gitlint/contrib_rules for details
# See https://jorisroovers.github.io/gitlint/contrib_rules for details
# contrib=contrib-title-conventional-commits,CC1

# Set the extra-path where gitlint will search for user defined rules
# See http://jorisroovers.github.io/gitlint/user_defined_rules for details
# See https://jorisroovers.github.io/gitlint/user_defined_rules for details
# extra-path=examples/

# This is an example of how to configure the "title-max-length" rule and
Expand Down
2 changes: 1 addition & 1 deletion gitlint-core/gitlint/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def apply(self, config, commit):
warning_msg = (
"%s - %s: skipping - commit.author_name unknown. "
"Suggested fix: Use the --staged flag (or set general.staged=True in .gitlint). "
"More details: https://jorisroovers.com/gitlint/configuration/#staged"
"More details: https://jorisroovers.github.io/gitlint/configuration/general_options/#staged"
)

self.log.warning(warning_msg, self.name, self.id)
Expand Down
2 changes: 1 addition & 1 deletion gitlint-core/gitlint/tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. "
"Please review your {1}.regex option accordingly. "
"To remove this warning, set general.regex-style-search=True. More details: "
"https://jorisroovers.github.io/gitlint/configuration/#regex-style-search"
"https://jorisroovers.github.io/gitlint/configuration/general_options/#regex-style-search"
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def test_ignore_by_author_name(self):
expected_log_messages = [
"WARNING: gitlint.rules ignore-by-author-name - I4: skipping - commit.author_name unknown. "
"Suggested fix: Use the --staged flag (or set general.staged=True in .gitlint). "
"More details: https://jorisroovers.com/gitlint/configuration/#staged"
"More details: https://jorisroovers.github.io/gitlint/configuration/general_options/#staged"
]
self.assert_logged(expected_log_messages)

Expand Down
8 changes: 4 additions & 4 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
site_name: Gitlint
site_description: Linting for your git commit messages
site_url: http://jorisroovers.github.io/gitlint/
site_url: https://jorisroovers.github.io/gitlint/
repo_url: https://github.com/jorisroovers/gitlint
repo_name: jorisroovers/gitlint
# strict: true
strict: true
edit_uri: edit/main/docs
markdown_extensions:
- admonition
Expand Down Expand Up @@ -34,7 +34,7 @@ plugins:
redirect_maps:
# URLs present in the generated .gitlint file
contrib_rules.md : rules/contrib_rules.md
user_defined_rules.md : rules/contrib_rules.md
user_defined_rules.md : rules/user_defined_rules/index.md

theme:
name: material
Expand Down Expand Up @@ -114,7 +114,7 @@ nav:
- Contrib Rules: rules/contrib_rules.md
- Named Rules: rules/named_rules.md
- User Defined Rules:
- Getting Started: rules/user_defined_rules/getting_started.md
- Getting Started: rules/user_defined_rules/index.md
- Line and Commit Rules: rules/user_defined_rules/line_and_commit_rules.md
- Configuration Rules: rules/user_defined_rules/configuration_rules.md
- Rule Violations: rules/user_defined_rules/violations.md
Expand Down
Loading

0 comments on commit 4a813a3

Please sign in to comment.