Conversation
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
for more information, see https://pre-commit.ci
Reviewer's GuideExpand 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
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
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 thepanel: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
!!! infoblock indocs/usage.mdwas 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.,
!!! tipindocs/index.mdand!!! noteindocs/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>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| 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") |
There was a problem hiding this comment.
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().
|
|
||
| \`\`\`yaml | ||
| panel: |
There was a problem hiding this comment.
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.
|
@kazisufiyan-k2 need to deal with the formatting changes that break the python examples |
|
Apologies for the merge conflicts. |
final add pr
Summary by Sourcery
Expand and document pre-commit tooling while cleaning up and standardizing project documentation formatting.
Enhancements:
Documentation: