Skip to content

Update linting settings - #52

Merged
mernst merged 7 commits into
mainfrom
linting
Jul 23, 2026
Merged

mernst merged 7 commits into
mainfrom
linting

Conversation

@mernst

@mernst mernst commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@mernst, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 22 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c88165de-e1c2-409c-ae99-780d5c8c90bb

📥 Commits

Reviewing files that changed from the base of the PR and between 3ab59c3 and 4aa718d.

📒 Files selected for processing (2)
  • .github/workflows/style.yml
  • Makefile
📝 Walkthrough

Walkthrough

Adds a prek configuration with built-in and pinned external hooks for repository, Python, shell, secret, Markdown, HTML, Makefile, and YAML validation. Adds Ruff, yamlfmt, and yamllint configuration. Adds a GitHub Actions workflow to run prek on pushes and pull requests. Existing workflow comments and test Makefiles receive formatting and .PHONY declarations.

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch linting

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/prek.yaml:
- Around line 7-8: Update the workflow action references for actions/checkout
and j178/prek-action to immutable full commit SHAs instead of mutable version
tags, preserving their current action versions and configuration.
- Around line 3-8: Update the prek job in the workflow to declare
least-privilege contents access with read-only permissions, and configure the
actions/checkout step with credential persistence disabled before running
j178/prek-action.

In `@prek.toml`:
- Around line 217-225: Update prek.toml to add a pinned PMD hook or step that
runs against the Java sources and explicitly uses .pmd-ruleset.xml, ensuring the
new PMD ruleset is enforced by prek and CI alongside the existing yamlfmt and
yamllint hooks.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c4400d45-e909-42a5-b4e4-de3b8cf0877a

📥 Commits

Reviewing files that changed from the base of the PR and between 81dd89a and 60b3b25.

📒 Files selected for processing (5)
  • .github/workflows/prek.yaml
  • .pmd-ruleset.xml
  • .yamlfmt.yaml
  • .yamllint.yaml
  • prek.toml

Comment on lines +3 to +8
jobs:
prek:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: j178/prek-action@v2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Repository files matching workflow/config context:"
git ls-files | rg '(^\.github/workflows/|\.pre-commit-config\.(yaml|yml)|pyproject\.toml|tox\.ini|setup\.cfg|Pipfile|poetry\.lock|package\.json|package-lock\.json)$' || true

echo
echo "Workflow contents:"
if [ -f .github/workflows/prek.yaml ]; then
  nl -ba .github/workflows/prek.yaml | sed -n '1,120p'
else
  echo "missing .github/workflows/prek.yaml"
fi

echo
echo "All action references in workflows:"
rg -n "uses:\s*[^#]+" .github/workflows || true

echo
echo "Security-relevant checkout/config keys in workflows:"
rg -n "permissions:|persist-credentials|permissions=|github-token|persist-credentials" .github/workflows || true

Repository: plume-lib/git-scripts

Length of output: 286


🌐 Web query:

actions/checkout README v4 v2 persist-credentials default false

💡 Result:

In the actions/checkout GitHub Action, the persist-credentials input has a default value of true [1][2][3]. This behavior is consistent across versions, including v2 [3][4][5] and v4 [6][1][2]. When persist-credentials is set to true (the default), the action configures the authentication token or SSH key in the local git configuration [1][2][4]. This allows subsequent steps in the workflow to perform authenticated git commands (e.g., git fetch, git push) [6][3][4]. To disable this behavior, you must explicitly set persist-credentials to false in your workflow step configuration [6][3][4]. It is important to note that while the default remains true, the underlying implementation has evolved. Recent versions, such as v6.0.0 and later, have improved security by storing the credentials in a separate file under $RUNNER_TEMP rather than directly in the local.git/config file [7][8][9]. Regardless of the implementation, the token or key is removed during the post-job cleanup [6][10][3].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "pyproject workflow/action references:"
sed -n '1,220p' pyproject.toml 2>/dev/null || true

echo
echo "All occurrences of prek/pre-commit/github/token:"
rg -n "prek|pre-commit|github-token|GITHUB_TOKEN|permissions|persist-credentials|actions/checkout|j178/prek-action" . || true

echo
echo "Files at root/workflows/config:"
find . -maxdepth 3 -type f \( -path '.github/*' -o -name '*.yaml' -o -name '*.yml' -o -name 'pyproject.toml' \) -print | sort

Repository: plume-lib/git-scripts

Length of output: 1331


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo ".github/workflows/prek.yaml:"
cat -n .github/workflows/prek.yaml

echo
echo ".github/workflows/style.yml:"
cat -n .github/workflows/style.yml

echo
echo ".github/workfiles/test.yml:"
cat -n .github/workflows/test.yml

echo
echo "prek.toml:"
cat -n prek.toml

Repository: plume-lib/git-scripts

Length of output: 9323


🌐 Web query:

pymarkdownlnt version 0.9.33 support Python 3.14

💡 Result:

No, pymarkdownlnt version 0.9.33 does not provide support for Python 3.14. Version 0.9.33 of the PyMarkdown Linter was released on October 22, 2025 [1][2]. While Python 3.14.0 was released shortly before that on October 7, 2025 [3][4], the release notes for version 0.9.33 explicitly state that the project's testing efforts at that time were focused on upgrading the minimum supported Python version from 3.9 to 3.10 [2]. There is no mention of support for Python 3.14 in the version 0.9.33 changelog [1][2]. As of July 23, 2026, newer versions of pymarkdownlnt (such as 0.9.37 and later) are available [5], and users requiring compatibility with newer Python releases should update to the latest version of the package [5].

Citations:


Constrain and discard credentials before running hooks.

prek.yaml runs checkout before external hooks without explicit least-privilege permissions, so set contents: read and disable actions/checkout’s default persistent credentials.

Proposed fix
 "on": [push,_pull_request]
+permissions:
+  contents: read
 jobs:
   prek:
@@
-      - uses: actions/checkout@v7
+      - uses: actions/checkout@v7
+        with:
+          persist-credentials: false
📝 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
jobs:
prek:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: j178/prek-action@v2
permissions:
contents: read
jobs:
prek:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: j178/prek-action@v2
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 7-7: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 7-7: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 8-8: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[info] 4-4: workflow or action definition without a name (anonymous-definition): this job

(anonymous-definition)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/prek.yaml around lines 3 - 8, Update the prek job in the
workflow to declare least-privilege contents access with read-only permissions,
and configure the actions/checkout step with credential persistence disabled
before running j178/prek-action.

Source: Linters/SAST tools

Comment on lines +7 to +8
- uses: actions/checkout@v7
- uses: j178/prek-action@v2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow file =="
if [ -f .github/workflows/prek.yaml ]; then
  cat -n .github/workflows/prek.yaml
else
  echo "missing .github/workflows/prek.yaml"
fi

echo
echo "== version tags in workflow(s) =="
rg -n "uses:\s*[A-Za-z0-9_-]+/[A-Za-z0-9_.-]+@(v[0-9]|[0-9]+\.[0-9]+)" .github/workflows || true

echo
echo "== policy mentions =="
rg -n -i "pin|sha|commit|github actions|actions allowed|allowed|unpinned|security" . 2>/dev/null | head -n 200 || true

Repository: plume-lib/git-scripts

Length of output: 50377


🌐 Web query:

GitHub Actions managed actions actions/checkout v7

💡 Result:

As of July 23, 2026, the latest version of the GitHub Actions actions/checkout action is v7.0.1, released on July 20, 2026 [1][2]. Key updates and changes in the v7 release include: - Security Enhancements: By default, actions/checkout now refuses to check out fork pull request code when the workflow is triggered by pull_request_target or workflow_run [3]. This change helps mitigate "pwn request" vulnerabilities that can occur when executing untrusted fork code with elevated GITHUB_TOKEN permissions [3]. To opt-in to the previous behavior, users must set the new input allow-unsafe-pr-checkout: true [3]. - Architecture Update: The action has been migrated to ECMAScript Modules (ESM) to ensure compatibility with newer versions of the @actions/* packages [3]. - Dependency Updates: The release includes various updates to direct and transitive dependencies, addressing known security vulnerabilities [3]. For users who are not ready to upgrade to v7, the allow-unsafe-pr-checkout feature has been backported to versions v6.1.0 and v5.1.0 (both released on July 20, 2026) to provide similar security protections [4][5].

Citations:


Pin the actions to full commit SHAs.

actions/checkout@v7 and j178/prek-action@v2 are mutable tag references; replace them with immutable commits for repository actions that execute code in-workflow.

🧰 Tools
🪛 zizmor (1.26.1)

[warning] 7-7: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 7-7: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 8-8: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/prek.yaml around lines 7 - 8, Update the workflow action
references for actions/checkout and j178/prek-action to immutable full commit
SHAs instead of mutable version tags, preserving their current action versions
and configuration.

Source: Linters/SAST tools

Comment thread prek.toml
Comment on lines +217 to +225
[[repos]]
repo = "https://github.com/google/yamlfmt"
rev = "v0.19.0"
hooks = [{ id = "yamlfmt" }]

[[repos]]
repo = "https://github.com/adrienverge/yamllint.git"
rev = "v1.29.0"
hooks = [{ id = "yamllint" }]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== files =="
git ls-files | sed -n '1,220p'

echo "== prek config around lines 200-230 =="
if [ -f prek.toml ]; then
  nl -ba prek.toml | sed -n '190,240p'
fi

echo "== pmd references =="
rg -n --hidden --glob '!/.git/**' 'pmd|\.pmd-ruleset\.xml|ruleset|Pre-commit|pre-commit|prek|workflow|workflow_dispatch|push:' . || true

echo "== workflows =="
git ls-files '.github/workflows/*' | while read -r f; do
  echo "--- $f"
  nl -ba "$f" | sed -n '1,220p'
done

Repository: plume-lib/git-scripts

Length of output: 1614


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== prek config around lines 200-230 =="
if [ -f prek.toml ]; then
  awk '{printf "%6d\t%s\n", NR, $0}' prek.toml | sed -n '190,240p'
fi

echo "== PMD reference count and hits =="
rg -n --hidden '\b[pP][mM][dD]\b|\.pmd-ruleset\.xml|pmd-ruleset|sourceMainJava|java|ruleset|language/java' . || true

echo "== workflow files =="
for f in .github/workflows/prek.yaml .github/workflows/style.yml .github/workflows/test.yml; do
  [ -f "$f" ] || continue
  echo "--- $f"
  awk '{printf "%6d\t%s\n", NR, $0}' "$f" | sed -n '1,220p'
done

echo "== PMD hooks in prek.toml =="
awk 'BEGIN{RS="\n\\[\\[.*\\]\\]}{gsub(/.*\n/,""); if($0 ~ /pmd|\.pmd-ruleset\.xml|java/){print FILENAME": " $0}}' prek.toml || true

Repository: plume-lib/git-scripts

Length of output: 36710


Register PMD with prek or CI.

.prek.yaml runs prek only, and prek.toml has no PMD hook/step using .pmd-ruleset.xml, so the new Java PMD ruleset is not enforced locally or in CI. Add a PMD hook/step that explicitly consumes this ruleset and pin a compatible PMD version.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@prek.toml` around lines 217 - 225, Update prek.toml to add a pinned PMD hook
or step that runs against the Java sources and explicitly uses .pmd-ruleset.xml,
ensuring the new PMD ruleset is enforced by prek and CI alongside the existing
yamlfmt and yamllint hooks.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/style.yml:
- Line 2: Add a workflow-level concurrency configuration near the existing on
trigger in the style workflow, using a stable group identifier and setting
cancel-in-progress to true so obsolete push or pull-request runs are cancelled.
Preserve the current trigger configuration.

In @.github/workflows/test.yml:
- Line 2: Add a workflow-level concurrency configuration to the test workflow,
using a stable group key and setting cancel-in-progress to true so obsolete push
or pull_request runs are cancelled while the newest run proceeds.

In `@tests/Makefile`:
- Line 1: Define the declared all target so invoking make all runs the test
target, or remove all from .PHONY, in tests/Makefile,
tests/git-clone-related-test/Makefile,
tests/resolve-adjacent-conflicts-test/Makefile, and
tests/resolve-import-conflicts-test/Makefile; apply the same consistent choice
at every listed site.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 13fcc445-d739-4574-8408-c30b3e48374f

📥 Commits

Reviewing files that changed from the base of the PR and between 60b3b25 and 3ab59c3.

📒 Files selected for processing (9)
  • .github/workflows/prek.yaml
  • .github/workflows/style.yml
  • .github/workflows/test.yml
  • .ruff.toml
  • prek.toml
  • tests/Makefile
  • tests/git-clone-related-test/Makefile
  • tests/resolve-adjacent-conflicts-test/Makefile
  • tests/resolve-import-conflicts-test/Makefile

Comment thread .github/workflows/style.yml Outdated
Comment thread .github/workflows/test.yml
Comment thread tests/Makefile
@mernst
mernst merged commit f3f8254 into main Jul 23, 2026
5 checks passed
@mernst
mernst deleted the linting branch July 23, 2026 14:34
@coderabbitai coderabbitai Bot mentioned this pull request Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant