Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ docs/__pycache__
# MkDocs
site/
docs/cli.md

# Social card cache written by the docs build
.cache/
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pip install git+https://github.com/commit-check/commit-check.git@main
```

Then, run `commit-check --help` or `cchk --help` (alias for `commit-check`) from the command line.
For more information, see the [docs](https://docs.commit-check.com/cli_args.html).
For more information, see the [docs](https://commit-check.com/configuration/).

## Configuration

Expand Down Expand Up @@ -209,7 +209,7 @@ repos:
- --author-email-pattern=^.+@example\.com$
```

See the [Configuration documentation](https://docs.commit-check.com/configuration.html) for all available options.
See the [Configuration documentation](https://commit-check.com/configuration/) for all available options.

### Check Push Safety

Expand Down Expand Up @@ -377,7 +377,7 @@ Available API functions:
- `validate_author(name=None, email=None, *, config=None)` — validate author name/email
- `validate_all(message, branch, author_name, author_email, *, config=None)` — run all checks at once

For detailed usage instructions including pre-commit hooks, CLI commands, and STDIN examples, see the [Usage Examples documentation](https://docs.commit-check.com/example.html).
For detailed usage instructions including pre-commit hooks, CLI commands, and STDIN examples, see the [Usage Examples documentation](https://commit-check.com/example/).

## Examples

Expand Down Expand Up @@ -423,7 +423,7 @@ The branch should follow Conventional Branch. See https://conventionalbranch.org
Suggest: Use <type>/<description> with allowed types or add branch name to allow_branch_names in config, or use ignore_authors in config branch section to bypass
```

More examples see [example documentation](https://docs.commit-check.com/example.html).
For more examples, see the [example documentation](https://commit-check.com/example/).

## Badging your repository

Expand Down
2 changes: 1 addition & 1 deletion commit_check/rules_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from dataclasses import dataclass

#: Base URL of the rules reference documentation.
RULES_DOCS_URL = "https://docs.commit-check.com/rules/"
RULES_DOCS_URL = "https://commit-check.com/rules/"


@dataclass(frozen=True)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ commit-check = "commit_check.main:main"
cchk = "commit_check.main:main" # short alias without clobbering system cc

[project.urls]
documentation = "https://docs.commit-check.com/"
documentation = "https://commit-check.com/"
source = "https://github.com/commit-check/commit-check"
tracker = "https://github.com/commit-check/commit-check/issues"

Expand Down
12 changes: 12 additions & 0 deletions tests/rules_catalog_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ def test_docs_url_derives_from_id(self):
entry = RuleCatalogEntry(check="subject_imperative", rule_id="CC003")
assert entry.docs_url == f"{RULES_DOCS_URL}#cc003"

@pytest.mark.benchmark
def test_docs_url_points_at_the_published_site(self):
"""The base URL is pinned, not just derived.

Every failure the tool reports carries this URL, and released versions
keep printing whatever they shipped with, so a wrong value cannot be
corrected after the fact. The other tests build their expectations from
``RULES_DOCS_URL`` and would follow it anywhere, including back to a
host that no longer serves the documentation.
"""
assert RULES_DOCS_URL == "https://commit-check.com/rules/"

@pytest.mark.benchmark
def test_no_docs_url_without_id(self):
"""An entry without a rule ID has no docs URL to link to."""
Expand Down