Skip to content

Patch 2#113

Open
kazisufiyan-k2 wants to merge 2 commits intoKilo59:mainfrom
kazisufiyan-k2:patch-2
Open

Patch 2#113
kazisufiyan-k2 wants to merge 2 commits intoKilo59:mainfrom
kazisufiyan-k2:patch-2

Conversation

@kazisufiyan-k2
Copy link
Copy Markdown

@kazisufiyan-k2 kazisufiyan-k2 commented Mar 20, 2026

final add pr

Summary by Sourcery

Expand and document pre-commit tooling while cleaning up and standardizing project documentation formatting.

Enhancements:

  • Broaden pre-commit checks to cover TOML validation, merge conflicts, large files, filename casing, secrets, and line endings, and add conventional-commit and gitleaks hooks.
  • Improve inline documentation and defaults in pre-commit and pre-commit.ci configuration for clearer contributor guidance.
  • Normalize and tidy Markdown and MkDocs-based documentation formatting, tables, lists, callouts, and examples across docs and internal agent guides.

Documentation:

  • Reformat configuration reference tables, usage docs, feature lists, CI/pre-commit integration guides, README comparison tables, and internal skill/workflow docs for consistent Markdown style and readability.

kazisufiyan-k2 and others added 2 commits March 16, 2026 17:42
enhance pre-commit hooks with security and quality checks

- Add gitleaks to scan for hardcoded secrets and credentials
- Add detect-private-key to block accidental SSH/API key commits
- Add check-merge-conflict to catch unresolved merge markers
- Add check-added-large-files to prevent files over 1MB
- Add check-case-conflict for cross-platform filename safety
- Add check-toml for pyproject.toml validation
- Add mixed-line-ending to enforce consistent LF line endings
- Add conventional-pre-commit to enforce structured commit messages
- Extend prettier to cover markdown files in addition to yaml/json
- Add inline comments to all hooks for better developer clarity
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Mar 20, 2026

Reviewer's Guide

Expand and document the pre-commit toolchain and clean up documentation/markdown formatting and consistency across the repo, including tables, lists, admonitions, examples, and minor YAML/Markdown style fixes.

File-Level Changes

Change Details Files
Enhance and better document the pre-commit configuration, adding additional safety/linting hooks and clarifying CI behavior.
  • Add several new pre-commit hooks (check-toml, check-merge-conflict, check-added-large-files, check-case-conflict, detect-private-key, mixed-line-ending) with appropriate arguments.
  • Add descriptive inline comments to existing pre-commit hooks (check-ast, check-json, check-yaml, end-of-file-fixer, trailing-whitespace, no-commit-to-branch, ruff-check, ruff-format, prettier, actionlint).
  • Integrate conventional-commit enforcement as a commit-msg hook with allowed types configured.
  • Add gitleaks hook to scan for secrets in commits.
  • Document pre-commit.ci settings with inline comments for autofix PRs, autoupdate branch, schedule, and submodules behavior.
.pre-commit-config.yaml
Normalize and slightly reformat MkDocs-related docs and examples for consistency in code blocks, spacing, and lists.
  • Insert blank lines before fenced code blocks and headings to improve Markdown rendering and readability.
  • Adjust indentation inside some fenced code blocks (YAML, Markdown, bash) and example snippets.
  • Tweak prose spacing and bullet/numbered list formatting in testing and workflow documentation under .agents.
.agents/skills/mkdocs-generation/examples.md
.agents/TESTING.md
.agents/workflows/add-test-case.md
.agents/skills/mkdocs-generation/SKILL.md
Improve Markdown tables, lists, and admonitions formatting in user-facing docs for ruff-sync.
  • Reformat configuration reference table with aligned headers and spacing for better readability.
  • Switch unordered list markers from * to - where needed for consistency.
  • Fix admonition content indentation so that tips/notes render as part of the callout instead of normal paragraphs.
  • Normalize inline code comments in YAML snippets (e.g., spacing before # comments and quote style in cron examples).
docs/configuration.md
docs/usage.md
docs/index.md
docs/ci-integration.md
docs/pre-commit.md
README.md
Perform small cosmetic edits and whitespace fixes in markdown and license files.
  • Ensure section breaks, ordered lists, and bullet lists have consistent blank-line separation for cleaner diffs and rendering.
  • Remove an unnecessary leading blank line at the top of the LICENSE file.
.agents/skills/release-notes-generation/SKILL.md
LICENSE.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 2 issues, and left some high level feedback:

  • Several fenced code examples had their indentation removed (e.g., the Python async def main() example and the panel: YAML config in .agents/skills/mkdocs-generation/examples.md), which changes the semantics of the examples; consider restoring the original indentation inside those code blocks.
  • The !!! info block in docs/usage.md was converted to a single malformed line (_ **Comments...), which likely breaks the admonition and list rendering; it would be better to keep each preserved item as a properly indented list entry under the admonition.
  • In a few places, content inside admonitions (e.g., !!! tip in docs/index.md and !!! note in docs/ci-integration.md) has been dedented so it is no longer part of the admonition body; consider re-indenting those lines to remain within the callout.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Several fenced code examples had their indentation removed (e.g., the Python `async def main()` example and the `panel:` YAML config in `.agents/skills/mkdocs-generation/examples.md`), which changes the semantics of the examples; consider restoring the original indentation inside those code blocks.
- The `!!! info` block in `docs/usage.md` was converted to a single malformed line (`_ **Comments`...), which likely breaks the admonition and list rendering; it would be better to keep each preserved item as a properly indented list entry under the admonition.
- In a few places, content inside admonitions (e.g., `!!! tip` in `docs/index.md` and `!!! note` in `docs/ci-integration.md`) has been dedented so it is no longer part of the admonition body; consider re-indenting those lines to remain within the callout.

## Individual Comments

### Comment 1
<location path=".agents/skills/mkdocs-generation/examples.md" line_range="119-123" />
<code_context>
 from pydmp import DMPPanel

 async def main():
-    panel = DMPPanel()
-    await panel.connect("192.168.1.100", "00001", "YOURKEY")
-    await panel.update_status()
-    areas = await panel.get_areas()
-    await panel.disconnect()
+panel = DMPPanel()
+await panel.connect("192.168.1.100", "00001", "YOURKEY")
</code_context>
<issue_to_address>
**issue (bug_risk):** Python example inside `main()` is no longer valid due to lost indentation.

This makes the snippet syntactically invalid and likely to confuse readers. Please re-indent the example code so it is properly nested inside `async def main()`.
</issue_to_address>

### Comment 2
<location path=".agents/skills/mkdocs-generation/examples.md" line_range="176-178" />
<code_context>

 \`\`\`yaml
 panel:
-  host: 192.168.1.100
-  account: "00001"
-  remote_key: "YOURKEY"
+host: 192.168.1.100
+account: "00001"
</code_context>
<issue_to_address>
**issue (bug_risk):** YAML config under `panel:` lost indentation and is no longer a valid nested mapping.

`host`, `account`, and `remote_key` need to remain indented as children of `panel:` for the YAML to be valid and preserve the intended structure.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines 119 to +123
from pydmp import DMPPanel

async def main():
panel = DMPPanel()
await panel.connect("192.168.1.100", "00001", "YOURKEY")
await panel.update_status()
areas = await panel.get_areas()
await panel.disconnect()
panel = DMPPanel()
await panel.connect("192.168.1.100", "00001", "YOURKEY")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

issue (bug_risk): Python example inside main() is no longer valid due to lost indentation.

This makes the snippet syntactically invalid and likely to confuse readers. Please re-indent the example code so it is properly nested inside async def main().

Comment on lines 176 to 178

\`\`\`yaml
panel:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

issue (bug_risk): YAML config under panel: lost indentation and is no longer a valid nested mapping.

host, account, and remote_key need to remain indented as children of panel: for the YAML to be valid and preserve the intended structure.

@Kilo59
Copy link
Copy Markdown
Owner

Kilo59 commented Mar 21, 2026

@kazisufiyan-k2 need to deal with the formatting changes that break the python examples

@Kilo59
Copy link
Copy Markdown
Owner

Kilo59 commented Mar 21, 2026

Apologies for the merge conflicts.

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.

2 participants