Skip to content

Roll out ecosystem code-style policy (full sweep) #13

Description

@gsdali

What

Roll out the ecosystem's proposed code-style policy to this repo, following the reference
implementation already trialled in OCCTSwiftScripts
(#114 /
#115): a full sweep, not a
gradual exemption-manifest rollout, chosen because this codebase is small enough to fully
comply in one PR and go straight to a blocking gate.

Proposal doc: ecosystem docs/code-style-policy-proposal-2026-08.md

This repo's facts

  • ~1,125 Swift lines across 6 files (Sources/SwiftDXF, Sources/dxfdump,
    Tests/SwiftDXFTests). Very small: full sweep, trivially so. No exemption manifest needed.
  • Zero first-party C++ bridge files. No clang-format needed.
  • Already has 6 mandatory OKF policies onboarded (okf/policies/). This adds a 7th.
  • No existing .github/workflows/ CI today. This bootstraps CI from nothing.

Scope for this repo

  • .swift-format (100 col, 4-space, copied verbatim from OCCTSwiftScripts) + a full
    swift-format --in-place sweep of Sources/ and Tests/.
  • .swiftlint.yml, scoped to only_rules: [orphaned_doc_comment] (same pattern as
    OCCTSwiftScripts, to avoid fighting swift-format's own formatting opinions).
  • Scripts/comment-ratio-check.sh: report-only nudge (never fails), bash to match this
    repo's own tooling convention (tools/oracle.py aside, no existing Scripts/ dir yet).
  • .github/workflows/code-style.yml: swift-format lint --strict and
    swiftlint lint --strict as blocking gates, comment-ratio as a non-blocking step.
  • okf/policies/code-style.md, linked from okf/index.md, this repo's 7th mandatory
    policy.
  • Hand-fix every remaining swift-format lint --strict / swiftlint lint --strict
    finding after the automatic sweep, the same way OCCTSwiftScripts#115 did.

Explicitly out of scope here

  • clang-format — no first-party C++ in this repo.
  • The Swift-symbol docs-drift checks proposed for OCCTSwift in the wider proposal (§3b) —
    not part of this pilot-pattern rollout, same as OCCTSwiftScripts#114's own scoping.

Process

Filed per the ecosystem policy's own gate: no repo implements without a filed issue first.
PR to follow, referencing this issue. Holding for review before merge.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions