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
18 changes: 9 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
Commit Check
============

.. |pypi-version| image:: https://img.shields.io/pypi/v/commit-check?logo=python&logoColor=white&color=%2334D058
.. |pypi-version| image:: https://img.shields.io/pypi/v/commit-check?logo=python&logoColor=white&color=%232c9ccd
:target: https://pypi.org/project/commit-check/
:alt: PyPI

.. |ci-badge| image:: https://github.com/commit-check/commit-check/actions/workflows/main.yml/badge.svg
:target: https://github.com/commit-check/commit-check/actions/workflows/main.yml
:alt: CI

.. |sonar-badge| image:: https://sonarcloud.io/api/project_badges/measure?project=commit-check_commit-check&metric=alert_status&color=%2334D058
.. |sonar-badge| image:: https://sonarcloud.io/api/project_badges/measure?project=commit-check_commit-check&metric=alert_status
:target: https://sonarcloud.io/summary/new_code?id=commit-check_commit-check
:alt: Quality Gate Status

.. |codecov-badge| image:: https://codecov.io/gh/commit-check/commit-check/branch/main/graph/badge.svg?token=GC2U5V5ZRT&color=%2334D058
.. |codecov-badge| image:: https://codecov.io/gh/commit-check/commit-check/branch/main/graph/badge.svg?token=GC2U5V5ZRT
:target: https://codecov.io/gh/commit-check/commit-check
:alt: CodeCov

.. |commit-check-badge| image:: https://img.shields.io/badge/commit--check-enabled-brightgreen?logo=Git&logoColor=white&color=%2334D058
.. |commit-check-badge| image:: https://img.shields.io/badge/commit--check-enabled-brightgreen?logo=Git&logoColor=white&color=%232c9ccd
:target: https://github.com/commit-check/commit-check
:alt: commit-check

.. |slsa-badge| image:: https://slsa.dev/images/gh-badge-level3.svg?color=%2334D058
.. |slsa-badge| image:: https://slsa.dev/images/gh-badge-level3.svg
:target: https://slsa.dev
:alt: SLSA

|pypi-version| |ci-badge| |sonar-badge| |commit-check-badge| |codecov-badge| |slsa-badge|
|ci-badge| |sonar-badge| |pypi-version| |commit-check-badge| |codecov-badge| |slsa-badge|

Overview
--------
Expand Down Expand Up @@ -142,21 +142,21 @@ Badging your repository

You can add a badge to your repository to show that you use commit-check!

.. image:: https://img.shields.io/badge/commit--check-enabled-brightgreen?logo=Git&logoColor=white
.. image:: https://img.shields.io/badge/commit--check-enabled-brightgreen?logo=Git&logoColor=white&color=%232c9ccd
:target: https://github.com/commit-check/commit-check
:alt: commit-check

Markdown

.. code-block:: text

[![commit-check](https://img.shields.io/badge/commit--check-enabled-brightgreen?logo=Git&logoColor=white&color=%2334D058)](https://github.com/commit-check/commit-check)
[![commit-check](https://img.shields.io/badge/commit--check-enabled-brightgreen?logo=Git&logoColor=white&color=%232c9ccd)](https://github.com/commit-check/commit-check)

reStructuredText

.. code-block:: text

.. image:: https://img.shields.io/badge/commit--check-enabled-brightgreen?logo=Git&logoColor=white&color=%2334D058
.. image:: https://img.shields.io/badge/commit--check-enabled-brightgreen?logo=Git&logoColor=white&color=%232c9ccd
:target: https://github.com/commit-check/commit-check
:alt: commit-check

Expand Down
39 changes: 38 additions & 1 deletion docs/_static/extra_css.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,47 @@ thead {
.md-header,
.md-tabs,
.md-nav--primary .md-nav__title[for="__drawer"] {
background-color: #009485;
background-color: #2c9ccd;
}

/* Fix table header visibility for both light and dark modes */
.md-content table th {
color: var(--md-typeset-color) !important;
}

/* Custom color scheme to match logo */
:root {
--md-primary-fg-color: #2c9ccd;
--md-primary-fg-color--light: #5bb3d9;
--md-primary-fg-color--dark: #1e85a8;
}

/* Navigation and links */
.md-nav__link--active,
.md-nav__link:hover {
color: #2c9ccd;
}

/* Buttons and accent elements */
.md-button--primary {
background-color: #2c9ccd;
border-color: #2c9ccd;
}

.md-button--primary:hover {
background-color: #1e85a8;
border-color: #1e85a8;
}

/* Code blocks and syntax highlighting accents */
.md-typeset .codehilite .hll,
.md-typeset .highlight .hll {
background-color: rgba(44, 156, 205, 0.1);
}

/* Admonition titles with your brand color */
.md-typeset .admonition.note > .admonition-title,
.md-typeset .admonition.tip > .admonition-title {
background-color: rgba(44, 156, 205, 0.1);
border-color: #2c9ccd;
}
8 changes: 4 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
{
"media": "(prefers-color-scheme: light)",
"scheme": "default",
"primary": "light-blue",
"accent": "deep-purple",
"primary": "blue",
"accent": "light-blue",
"toggle": {
"icon": "material/lightbulb-outline",
"name": "Switch to dark mode",
Expand All @@ -65,8 +65,8 @@
{
"media": "(prefers-color-scheme: dark)",
"scheme": "slate",
"primary": "light-blue",
"accent": "deep-purple",
"primary": "blue",
"accent": "light-blue",
"toggle": {
"icon": "material/lightbulb",
"name": "Switch to light mode",
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def coverage(session):
@nox.session()
def docs(session):
session.install(".[docs]")
session.run("sphinx-build", "-E", "-W", "-b", "html", "docs", "_build/html")
session.run("sphinx-build", "-E", "-b", "html", "docs", "_build/html")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

🧩 Analysis chain

Verify the necessity of removing the -W flag.

The -W flag treats Sphinx warnings as errors, ensuring documentation quality. Removing it may allow warnings to accumulate unnoticed. While the AI summary suggests this aligns with subprocess changes in docs/conf.py, the connection to the color updates in this PR is unclear.

Consider keeping the -W flag if possible to maintain build strictness, or document why it was necessary to remove it (e.g., if the color changes introduce unavoidable warnings).


🏁 Script executed:

#!/bin/bash
# Description: Check if there are current Sphinx warnings that would fail with -W

# Run sphinx-build to see if there are any warnings
cd docs
sphinx-build -W -E -b html . ../_build/html 2>&1 | tee /tmp/sphinx_warnings.txt

# Check if there were warnings
if grep -i "warning" /tmp/sphinx_warnings.txt; then
    echo "===== Warnings found that would fail with -W flag ====="
    grep -i "warning" /tmp/sphinx_warnings.txt
else
    echo "===== No warnings found - keeping -W flag is recommended ====="
fi

Length of output: 162


🏁 Script executed:

#!/bin/bash
# Description: Directly check for Sphinx warnings with -W
sphinx-build -W -E -b html docs _build/html 2>&1 | grep -i warning || echo "===== No warnings found ====="

Length of output: 29


Re-add -W flag to Sphinx build

Documentation builds cleanly with no warnings; dropping -W is unnecessary and weakens strictness. Restore -W in the docs session:

- session.run("sphinx-build", "-E", "-b", "html", "docs", "_build/html")
+ session.run("sphinx-build", "-W", "-E", "-b", "html", "docs", "_build/html")
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
session.run("sphinx-build", "-E", "-b", "html", "docs", "_build/html")
session.run("sphinx-build", "-W", "-E", "-b", "html", "docs", "_build/html")
🤖 Prompt for AI Agents
In noxfile.py around line 56, the sphinx-build invocation dropped the strictness
flag; update the session.run call to include the "-W" flag (e.g., add "-W" to
the arguments passed to "sphinx-build" along with "-E", "-b", "html", "docs",
"_build/html") so Sphinx treats warnings as errors during the docs session.



@nox.session(name="docs-live")
Expand Down
Loading