Skip to content

Commit 03bc5a6

Browse files
msyycCopilot
andauthored
Add client name consistency rule to MGMT SDK code review rules (#46041)
* Add client name consistency rule to MGMT SDK code review rules Add a rule requiring the client class name in _client.py, the client name in README.md, and the title in pyproject.toml to all match. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add no_sub rule for clients without subscription_id When subscription_id is absent from the client signature in _client.py, pyproject.toml must have no_sub = true. If missing, hint user to set it and regenerate the SDK. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent a047e6f commit 03bc5a6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/copilot-instructions.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ These rules apply to management-plane SDK packages located at `sdk/*/azure-mgmt-
154154

155155
### CLIENT SIGNATURE
156156
- The `__init__` method of the client class in `_client.py` must include the parameters `credential`, `subscription_id`, and `base_url` **in that order**. Default values are not checked.
157+
- If `subscription_id` is **not** present in the client's `__init__` signature, `pyproject.toml` must contain `no_sub = true`. If it does not, hint the user to add `no_sub = true` in `pyproject.toml` and regenerate the SDK.
158+
159+
### CLIENT NAME CONSISTENCY
160+
- The client class name in `_client.py`, the client name referenced in `README.md`, and the `title` value in `pyproject.toml` must all be the same.
157161

158162
### README CODE SNIPPETS
159163
- Code snippets in `README.md` must follow the real client class signatures and usage patterns. Verify that sample code matches the actual client API.

0 commit comments

Comments
 (0)