Skip to content

chore(editorconfig): drop no-op PowerShell indent_size - #76

Merged
kyle-sexton merged 2 commits into
mainfrom
chore/remove-redundant-ps-indent
Jul 8, 2026
Merged

chore(editorconfig): drop no-op PowerShell indent_size#76
kyle-sexton merged 2 commits into
mainfrom
chore/remove-redundant-ps-indent

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

What

Remove the [*.{ps1,psm1,psd1}] indent_size = 4 section from .editorconfig.

Why

The value restated the [*] default (indent_size = 4) with no overriding
section in between, so it was a no-op. JetBrains Rider/ReSharper flags this
exact case as a "Redundant property" inspection, which a comment cannot
suppress. The EditorConfig maintainers' own convention
is to declare a narrower section only when its value differs from the
inherited default.

Impact

None on effective formatting — PowerShell files (.ps1/.psm1/.psd1) continue
to inherit indent_size = 4 from [*]. The deliberate PowerShell-LF rationale
was not lost: it remains authoritative in .gitattributes (this file's own
header already defers all line-ending policy there; end_of_line here is an
editor hint only).

Propagation

Consumers that vendored this config (.github, github-iac, …) will pick up
the removal on their next standards sync.

🤖 Generated with Claude Code


Note

Low Risk
Config-only cleanup with no change to effective indentation or line-ending behavior.

Overview
Removes the [*.{ps1,psm1,psd1}] EditorConfig block that set indent_size = 4 and carried a PowerShell LF comment. That indent value duplicated the global [*] default, so Rider/ReSharper treated it as a redundant property.

PowerShell files still get 4-space indentation from [*] and LF line endings from .gitattributes (unchanged); only the duplicate editor hint and its comment are gone.

Reviewed by Cursor Bugbot for commit 923dc5a. Bugbot is set up for automated code reviews on this repo. Configure here.

The `[*.{ps1,psm1,psd1}] indent_size = 4` restated the `[*]` default with no
overriding section in between — a no-op that JetBrains flags as "Redundant
property" (a comment cannot suppress it). PowerShell files continue to inherit
indent_size = 4 from the base, so effective formatting is unchanged; the
deliberate PowerShell-LF rationale remains authoritative in .gitattributes.
Follows the EditorConfig maintainer convention of declaring a narrower section
only when its value differs from the inherited default.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JoUYpSTqfK9xNquuokhSiR
@claude

claude Bot commented Jul 8, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 9s —— View job


Review

  • Read changed files and diff
  • Verified rationale against .editorconfig and .gitattributes
  • Checked CLAUDE.md / REVIEW.md (none present)
  • Review complete

Verdict: LGTM — no issues found.

What the change does

Removes the [*.{ps1,psm1,psd1}] section from .editorconfig:

-# PowerShell — LF runs on both PowerShell 7 and Windows PowerShell 5.1 (verified
-# empirically). See the .gitattributes note before changing this to crlf.
-[*.{ps1,psm1,psd1}]
-indent_size = 4

Is the no-op claim correct?

Yes. The [*] root section at .editorconfig:12-18 already sets indent_size = 4, and no intervening section changes it for PowerShell files. The removed section was a pure restatement of the inherited default.

Is the LF rationale actually preserved?

Yes, and with more detail than the removed comment. .gitattributes lines 18-27 document the deliberate choice:

# PowerShell — LF is deliberate. Verified to run on both PowerShell 7 and
# Windows PowerShell 5.1. The PowerShell repo pins .ps1 to eol=lf; the popular
# community gitattributes template pins crlf — they target different eras. Listed
# explicitly so it is not "corrected" to crlf without a requirement to round-trip
# pre-existing CRLF-signed scripts unchanged.

The .editorconfig file header also explicitly defers line-ending authority to .gitattributes (.editorconfig:9-10), so the removed comment was a secondary (and less complete) reference — not a loss.

Additional observations

  • All three PowerShell extensions (.ps1, .psm1, .psd1) were covered by the removed section and all three continue to inherit indent_size = 4 correctly.
  • The removed section's indent_size = 4 property and its LF-rationale comment were somewhat mismatched (the comment explained the absence of end_of_line = crlf, but the only property was indent_size). Removing the section actually resolves that mismatch.
  • The JetBrains Rider "Redundant property" inspection concern is legitimate — it cannot be suppressed with a comment — making this a practical fix for tooling noise.

cursor[bot]
cursor Bot approved these changes Jul 8, 2026
@claude

claude Bot commented Jul 8, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 39s —— View job


Review

  • Read changed files and diff
  • Verified rationale against .editorconfig
  • Checked for CLAUDE.md (none present)
  • Review complete

Verdict: LGTM — no issues found.

What the change does

Removes the [*.{ps1,psm1,psd1}] section from .editorconfig:37-41 (pre-change):

-# PowerShell — LF runs on both PowerShell 7 and Windows PowerShell 5.1 (verified
-# empirically). See the .gitattributes note before changing this to crlf.
-[*.{ps1,psm1,psd1}]
-indent_size = 4

Is the no-op claim correct?

Yes. [*] at line 14 already sets indent_size = 4, and no intervening section narrows or overrides it for PowerShell extensions. The removed section was a pure restatement of the inherited default — removing it has zero effect on effective indentation.

Is the LF rationale preserved?

Yes. The .editorconfig header at lines 9–10 explicitly defers all line-ending authority to .gitattributes, so the removed comment was always a secondary reference. The authoritative rationale lives in .gitattributes and is unaffected by this PR.

Additional observations

  • The file is now cleaner and free of the JetBrains Rider "Redundant property" inspection noise.
  • The removed comment's explanation of LF choice was somewhat mismatched anyway — it explained the absence of end_of_line = crlf, but the only property in the section was indent_size. Removing it cleans up that mismatch.
  • All three PowerShell extensions (.ps1, .psm1, .psd1) continue to inherit indent_size = 4 from [*].

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Risk: low. Cursor Bugbot completed successfully with no findings requiring human review. Approved — this removes a redundant PowerShell indent_size that duplicated the [*] default with no effective formatting change. No reviewers assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@kyle-sexton
kyle-sexton merged commit 6f1fa29 into main Jul 8, 2026
37 checks passed
@kyle-sexton
kyle-sexton deleted the chore/remove-redundant-ps-indent branch July 8, 2026 15:54
kyle-sexton added a commit that referenced this pull request Jul 11, 2026
## Summary

- add a centralized GitHub Actions runner policy that enforces approved
selector routing, public/hosted boundaries, explicit read-only
permissions, cancellation-safe literal hosted fallback, and
machine-readable hosted exceptions
- derive the required literal fallback from the governed policy default,
so changing an approved hosted image is a policy/configuration change
rather than parser-code surgery
- route Standards' 28 eligible private Linux workloads through the
governed selector while retaining exact hosted exceptions for policy and
control-plane boundaries
- recursively validate repository-local reusable workflows and
caller/callee permission narrowing without allowing arbitrary secrets,
tokens, inputs, labels, or runner expressions
- distribute the locked policy runtime and Node version to six enrolled
private consumers from one deterministic manifest
- harden staged .NET formatting and PSScriptAnalyzer adapters with
deterministic cross-platform path semantics and per-target no-profile
PowerShell isolation
- keep the complete .NET-format named job managed by Standards while
each consumer owns only strict data in `.lefthook/dotnet-format.json`
- preserve executable source and consumer index modes through
distribution
- pin every production selector/reusable and Actionlint parity reference
to merged `ci-workflows/main` commit
`99ac2f8c5b09dbb785d4eaf18465cbd96c30290c`

## Dependencies

The final routing contract is the immutable squash merge from
melodic-software/ci-workflows#74 (including stacked #76/#77):

- `99ac2f8c5b09dbb785d4eaf18465cbd96c30290c`

## Reviewed head

`0795d22c89cb8fae11642ede9757e7b43fd5d546`

## Validation

Independent author, reviewer, recheck, and integration-review gates all
PASS with no findings.

- runner-policy adversarial suite: 83/83, including alternate configured
hosted-default proof
- Standards private self-audit: PASS
- .NET/Lefthook adapter: 12/12
- pinned Lefthook 2.1.9 validate, dump, and actual job execution: PASS
- independent argv probe: spaces, semicolons, and `$()` remain inert
data with `shell:false`
- production distribution suite: 114/114 under checksum-pinned yq 4.53.3
in author native Linux and hosted Linux
- independent reviewer inspected the exact-head hosted log and confirmed
assertions 1 through 114
- exact executable-bit gate: PASS; both source CLIs are index mode
`100755`
- routing graph: 28 selectors, 28 workloads, 31 actual `ci-status`
gates, zero selector gates
- final pin proof: exactly 46 merged-main references, zero stale
full/short feature-stack references, and 25 preserved transitional
compatibility references
- all eight changed files reconstruct byte-for-byte from only the two
intended SHA/comment substitutions
- Actionlint 1.7.12 plus hosted checksum-verified ShellCheck 0.11.0:
PASS
- all 10 uniquely referenced workflow/action paths exist at the
immutable ci-workflows commit
- six workflow schemas, Zizmor medium/high, Biome, Markdown, ShellCheck,
Gitleaks, full Lefthook, and diff checks: PASS
- signed final pin commit: `0795d22c89cb8fae11642ede9757e7b43fd5d546`

All 63 hosted checks pass on this exact head.

## Authoritative basis

- GitHub Actions workflow syntax and runner routing:
https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax
- Node cross-platform path semantics:
https://nodejs.org/api/path.html#pathwin32
- Lefthook v2.1.9 named-job merge contract:
https://github.com/evilmartians/lefthook/blob/v2.1.9/docs/configuration/jobs.md
- Lefthook v2.1.9 job templates:
https://github.com/evilmartians/lefthook/blob/v2.1.9/docs/configuration/templates.md

## Rollout safety

This PR does not change GitHub variables, secrets, runners, repository
settings, or live infrastructure. Production routing remains hosted
until the IaC and physical canary gates are applied later.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **High Risk**
> Large CI workflow refactor with secrets/vars for runner selection and
a new security gate; misconfiguration could break merges or route jobs
incorrectly until fleet is live.
> 
> **Overview**
> Introduces a **YAML-aware runner policy** (`components/runner-policy`,
`.github/runner-policy.json`, `policy.json`) and a hosted **Runner
policy** CI lane that tests and enforces it against workflow inventory
and repository visibility.
> 
> **CI routing** shifts eligible lint/contract jobs from fixed
`ubuntu-latest` to paired `select-runner` + workload jobs using
`needs.select-*.outputs.runner || 'ubuntu-24.04'`, `if: ${{ !cancelled()
}}`, and `merge_group` support. Control-plane jobs (runner-policy gate,
ci-status, zizmor, osv-scanner) stay on explicit hosted runners with
documented exceptions. `ci-status` now requires `runner-policy`, treats
only `success` as pass (not `skipped`), and pins several workflows to
`ci-workflows@99ac2f8`.
> 
> **Local hooks:** Lefthook .NET formatting moves to a consumer-owned
`.lefthook/dotnet-format.json` and `dotnet-format-staged.mjs`
(shell-less `dotnet format whitespace`). PSScriptAnalyzer staged checks
run **one target per fresh `pwsh` worker**; `PSUseCorrectCasing` is
removed from settings. Dependabot gains an npm root for
`components/runner-policy`.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
0795d22. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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.

1 participant