Skip to content

Add skill for adding custom Pylint guidelines - #16322

Open
JennyPng wants to merge 4 commits into
Azure:mainfrom
JennyPng:pylint-checker-skill
Open

Add skill for adding custom Pylint guidelines#16322
JennyPng wants to merge 4 commits into
Azure:mainfrom
JennyPng:pylint-checker-skill

Conversation

@JennyPng

@JennyPng JennyPng commented Jul 10, 2026

Copy link
Copy Markdown
Member

skill enabling agent to correctly add custom pylint guidelines

JennyPng and others added 2 commits July 10, 2026 11:05
When a new rule is potentially ambiguous, the implementing guidelines
now include a step to document it in code_examples.md with violation
and compliant code snippets.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@JennyPng
JennyPng marked this pull request as ready for review July 13, 2026 18:33
@JennyPng
JennyPng requested a review from a team as a code owner July 13, 2026 18:33
Copilot AI review requested due to automatic review settings July 13, 2026 18:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new agent skill (add-pylint-guidelines) intended to guide contributors through implementing and testing custom rules in the azure-pylint-guidelines-checker pylint plugin.

Changes:

  • Adds a new .github/skills/add-pylint-guidelines/SKILL.md skill describing how to implement new pylint guidelines.
  • Documents a suggested workflow for adding rules, tests, and updating supporting docs/changelog.
  • Provides example commands for running pytest and invoking pylint with the custom plugin.

Comment on lines +1 to +4
---
name: add-pylint-guidelines
description: Create, update, or test custom rules in `azure-pylint-guidelines-checker`. Use when working on implementing/testing the pylint checker.
---
Comment on lines +15 to +17
2. Define the new guideline you want to add. Clearly specify what coding practice you want to enforce and under what conditions it should be flagged.
3. Write a test file in the `tests` directory to cover the new guideline, covering edge cases and using TDD principles. Every guideline should have corresponding tests that verify both that violations are correctly flagged and that compliant code does not trigger false positives.
4. Implement the new guideline in the `pylint_guidelines_checker.py` file following existing patterns:
Comment on lines +33 to +37
cd tools/pylint-extensions/azure-pylint-guidelines-checker
<ensure a venv is activated>
pip install -r dev_requirements.txt
python -m pytest tests/test_pylint_custom_plugins.py::<Test_Name> -v
```
JennyPng and others added 2 commits July 13, 2026 11:37
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add missing frontmatter fields: license, metadata.version,
  metadata.distribution, compatibility, and quote description
- Clarify test structure: sample files go in tests/test_files/,
  assertions in tests/test_pylint_custom_plugins.py
- Fix pytest command placeholder to use ::TestClassName::test_method_name

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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