Visitar URL original
Correct Four Code Style Rules and State That No Shell Header Comment Is Required by ptr727 · Pull Request #4141 · ptr727/ProjectTemplate · GitHub
Skip to content

Correct Four Code Style Rules and State That No Shell Header Comment Is Required - #4141

Merged
ptr727 merged 3 commits into
developfrom
burndown/codestyle-rule-fixes
Nov 13, 2026
Merged

ptr727 merged 3 commits into
developfrom
burndown/codestyle-rule-fixes

Conversation

@ptr727

@ptr727 ptr727 commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Summary

Corrects four code style rules that fail when followed (#4015), and states plainly that the shell code style requires no header comment (#3668).

  • SA1201 member order. dotnet-codestyle references/conventions.md sorted members by access first. It now orders by kind across every access level (SA1201), then by access within one kind (SA1202), then const, static, and readonly (SA1203, SA1204, SA1214). The kind list now follows StyleCop's published SA1201 order, which places conversion operators and operators before methods. The SKILL.md summary line says the same.
  • PowerShell unknown arguments. CODESTYLE.md "Command-Line Arguments" now says the binder refuses an unknown parameter only in a script carrying [CmdletBinding()]. A plain param() block binds it into $args and runs on, so such a script refuses a non-empty $args itself before any work. python-codestyle and shell-codestyle carry the section as a generated include.
  • POSIX shell exception. shell-codestyle now carries the GOVERNANCE.md exception: a deliberately POSIX #!/bin/sh script takes set -eu.
  • Local loop venv. Both pip-form uv pip install lines in python-codestyle now pass --python .venv/bin/python, since uv pip install targets an active VIRTUAL_ENV ahead of ./.venv. The catalog/snippets/configs/vscode-tasks-python.json comments describing the same installs say the same.
  • Shell header comment. shell-codestyle now says no header comment is required, so the set line may follow the shebang. A comment above it carries a specific non-obvious point, and the no-summary rule in comment-and-doc-style still forbids one restating the script. The description calls set -Eeuo pipefail a line rather than a header.

Generated copies under .github/skills/ and .claude-plugin/ regenerated with scripts/build_dist.py, and --check is clean.

The snippet change edits two JSONC comment lines, so this pull request carries the comments label.

Local review findings

  • GOVERNANCE.md "Workflow YAML Conventions", the "Shells" bullet's POSIX exception reason (pre-existing, canonical unit). It says sh carries neither -E nor pipefail, which is broader than true. This branch states the narrower dash reason in shell-codestyle. Gathered onto the unit's tracker, Tracker: GOVERNANCE.md > Workflow YAML Conventions #4140.
  • catalog/snippets/husky/pre-commit, set -eu follows the _/husky.sh source line (pre-existing, declined). The reviewer's stated failure is a command failing inside the sourced _/husky.sh going unnoticed. That file is a trusted runtime the hook installer generates. Per GOVERNANCE.md "Trust Boundaries and Hardening Effort", a silent failure inside it is not a realistic case in the hook's deployment, so it earns neither a fix nor an issue. Moving set -eu above the source line would also put the generated file's own exit status under -e, which this branch has no evidence is safe.

Closes on promotion: #4015, #3668

🤖 Generated with Claude Code

ptr727 and others added 2 commits November 12, 2026 23:03
…Is Required

Order .NET members by kind first and access within a kind, per SA1201 and SA1202.
Require [CmdletBinding()] or an explicit $args check for PowerShell unknown arguments.
Carry the POSIX /bin/sh set -eu exception into shell-codestyle.
Pass --python .venv/bin/python to both pip-form uv pip installs.
State that shell-codestyle requires no header comment, squared with the no-summary rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o dash

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings November 13, 2026 07:09
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ptr727 ptr727 added the comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses label Nov 13, 2026
@ptr727

ptr727 commented Nov 13, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 59dfdd018408f6c7e973c1e69252453d5087e971, the content this pull request carries at that commit against develop, and it recorded 0 findings.

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.

🟡 Changes recommended

Active documentation issues remain: the StyleCop guidance omits C# 14 extension blocks, and the PowerShell --help rule is still overly broad despite the documented exception.

2 open issues
What changed in this PR

This pull request updates fleet code-style guidance for .NET member ordering, PowerShell argument handling, POSIX shell strict mode, Python virtual-environment installs, and shell header-comment wording, then refreshes generated skill distributions and source digests.

Changes:

  • Updates canonical CODESTYLE and authored skill guidance for the revised style rules.
  • Adjusts VS Code task comments to document explicit local virtual-environment targets.
  • Regenerates GitHub and Claude skill copies and updates their source digests.
File Description
CODESTYLE.md Clarifies PowerShell unknown-argument handling and shell strict-mode wording.
catalog/​snippets/​configs/​vscode-tasks-python.json Updates pip-install comments to target the local Python virtual environment explicitly.
.github/​skills/​shell-codestyle/​SKILL.md Provides the generated shell-style guidance, including POSIX and header-comment rules.
.github/​skills/​python-codestyle/​SKILL.md Provides the generated Python-style guidance with explicit virtual-environment install instructions.
.github/​skills/​dotnet-codestyle/​SKILL.md Provides the generated .NET style summary with revised member-ordering guidance.
.github/​skills/​dotnet-codestyle/​references/​conventions.md Provides the generated detailed .NET member-ordering conventions.
.claude-plugin/​fleet-skills/​skills/​shell-codestyle/​SKILL.md Provides the generated Claude shell-style guidance.
.claude-plugin/​fleet-skills/​skills/​python-codestyle/​SKILL.md Provides the generated Claude Python-style guidance.
.claude-plugin/​fleet-skills/​skills/​dotnet-codestyle/​SKILL.md Provides the generated Claude .NET style summary.
.claude-plugin/​fleet-skills/​skills/​dotnet-codestyle/​references/​conventions.md Provides the generated Claude detailed .NET member-ordering conventions.
.claude-plugin/​fleet-skills/​.source-digests/​shell-codestyle Updates the source digest for the shell skill.
.claude-plugin/​fleet-skills/​.source-digests/​python-codestyle Updates the source digest for the Python skill.
.claude-plugin/​fleet-skills/​.source-digests/​dotnet-codestyle Updates the source digest for the .NET skill.
.agents/​skills/​shell-codestyle/​SKILL.md Updates authored shell-style guidance with POSIX exceptions and header-comment wording.
.agents/​skills/​python-codestyle/​SKILL.md Updates authored Python-style guidance with explicit local virtual-environment targets.
.agents/​skills/​dotnet-codestyle/​SKILL.md Updates the authored .NET style summary for revised member ordering.
.agents/​skills/​dotnet-codestyle/​references/​conventions.md Updates authored detailed .NET member-ordering conventions.

Review effort: Lite

Comment thread CODESTYLE.md Resolved
@codecov

codecov Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.70%. Comparing base (b38e084) to head (a00cccd).
⚠️ Report is 181 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4141      +/-   ##
===========================================
- Coverage    81.60%   76.70%   -4.91%     
===========================================
  Files           26       40      +14     
  Lines         9070    14148    +5078     
===========================================
+ Hits          7402    10852    +3450     
- Misses        1668     3296    +1628     
Flag Coverage Δ
python-3.13 76.70% <ø> (-4.91%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727

ptr727 commented Nov 13, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@ptr727

ptr727 commented Nov 13, 2026

Copy link
Copy Markdown
Owner Author

/review

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

… Refusal Before Its Consequence

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ptr727

ptr727 commented Nov 13, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head a00cccdc1005566646aebd01c0933f1d33c7cc56, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@ptr727
ptr727 merged commit 12ec468 into develop Nov 13, 2026
13 checks passed
@ptr727
ptr727 deleted the burndown/codestyle-rule-fixes branch November 13, 2026 07:41
ptr727 added a commit that referenced this pull request Nov 13, 2026
… Rules (#4189)

## Summary

Promotes the backlog-burndown rounds and changes from other hub sessions
from `develop` to `main`.

- Hooks and the prose gate: #4132, #4134, #4136, #4145, #4152, #4184.
The Husky hook reads its path list once and diffs a merge against
`MERGE_HEAD`. Interrupts re-raise their signal, a Markdown code span
reads as quoted data, and the gate picks a commit's diff base and
recognizes a conflicted promotion's branch cut from `main`.
- Procedures and carried rules: #4133, #4139, #4141, #4149, #4166,
#4177, #4179, #4183, #4185. Resync, audit and check-this-repo procedure
gaps, code style and shell interrupt rules, review-loop gaps across four
skills, the context and delegation section of `AGENTS.md`, question
rules in governance, the promotion line in pull request bodies,
closing-keyword behavior on promotion, and the history-rewrite premise.
- Review and cleanup tooling: #4138, #4148, #4154, #4156, #4157, #4163,
#4164, #4168, #4174, #4180. Cleanliness reads, parked handoffs, the
backlog report's JSON output, exact inline script pins, trusted inputs,
env-file includes, the bounded review wait, side-reviewer matching, and
a Copilot billing-failure notice read as a refusal.
- Workflow and runbook contract: #4153, #4155, #4169, #4171, #4178,
#4182. The runtime-secrets check, a registry entry and spec references,
the Copilot runbook pointers, credential-free checkout steps, and the
deploy-key and runner wording.
- From other hub sessions: #4159 (a repository's own .NET line under a
fleet default), #4161 (the 1Password CLI as an optional host tool),
#4162 (Codex's Windows installer and one managed opencode copy). These
carry no promotion line.

#4182 carries no promotion line by design, and #4175 holds the split-out
part of #4057's scope. Both #1448 and #4175 stay open.

Fixes #1071
Fixes #1154
Fixes #1391
Fixes #1471
Fixes #1594
Fixes #1620
Fixes #1627
Fixes #1650
Fixes #1801
Fixes #2853
Fixes #3620
Fixes #3668
Fixes #3697
Fixes #3766
Fixes #3787
Fixes #3837
Fixes #3840
Fixes #3842
Fixes #3844
Fixes #3865
Fixes #3882
Fixes #3890
Fixes #3894
Fixes #3912
Fixes #3916
Fixes #3954
Fixes #4014
Fixes #4015
Fixes #4016
Fixes #4043
Fixes #4050
Fixes #4057
Fixes #4058
Fixes #4062
Fixes #4084
Fixes #4097
Fixes #4098
Fixes #4099
Fixes #4104
Fixes #4108
Fixes #4114
Fixes #4115
Fixes #4117
Fixes #4118
Fixes #4119
Fixes #4121
Fixes #4122
Fixes #4123
Fixes #4131
Fixes #4135
Fixes #4140
Fixes #4142
Fixes #4143
Fixes #4144
Fixes #4151

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants