chore(docs): Add targeted-file lint/format commands to AGENTS.md#3554
chore(docs): Add targeted-file lint/format commands to AGENTS.md#3554ChughShilpa wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Please review @andreyvelich @Fiona-Waters |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds documentation to help contributors run linting/formatting tools on a subset of the codebase for faster iteration.
Changes:
- Document targeted (file/package/crate) commands for Go, Python, and Rust lint/format workflows.
8c45314 to
6b656e5
Compare
Fiona-Waters
left a comment
There was a problem hiding this comment.
Thanks @ChughShilpa left a couple of comments
|
/retest |
Fiona-Waters
left a comment
There was a problem hiding this comment.
Thanks @ChughShilpa
/lgtm
|
/assign @kubeflow/kubeflow-trainer-team please review @andreyvelich |
|
New changes are detected. LGTM label has been removed. |
| # Python | ||
| pre-commit run flake8 --files path/to/file.py # Lint a single Python file | ||
| pre-commit run black --files path/to/file.py # Format a single Python file | ||
| pre-commit run isort --files path/to/file.py # Sort imports in a single Python file | ||
|
|
||
| # Rust | ||
| cargo fmt --manifest-path pkg/data_cache/Cargo.toml # Format the data_cache crate (crate-level) | ||
| cargo check --manifest-path pkg/data_cache/Cargo.toml # Type-check the data_cache crate (crate-level) | ||
| ``` |
There was a problem hiding this comment.
Shall we just run pre-commit run --all-files ?
There was a problem hiding this comment.
pre-commit run --all-files is already mentioned in Pre-commit and this will run for all files. This PR adds commands to execute against single file/package
There was a problem hiding this comment.
But i replace it with a single command
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Shilpa Chugh <shchugh@redhat.com>
What this PR does / why we need it:
maketargets for linting. When an AI agent (or contributor) changes a single file or package, running the full-project lint is slow and noisy. Documenting targeted single-file/package equivalents lets agents get fast, focused feedback on just the target paths it touched.LINT_PKGvariable to the Makefile (defaults to./...) somake golangci-lint LINT_PKG=./pkg/controller/...lints a single package using the project-local binary, avoiding PATH mismatches with globally installed versions..pre-commit-config.yaml,.golangci.yaml).Which issue(s) this PR fixes (optional, in
Fixes #<issue number>, #<issue number>, ...format, will close the issue(s) when PR gets merged):Fixes #
Checklist: