Skip to content

Add style/method-declaration-format and style/type-parameter-format lint rules#4892

Merged
SeanTAllen merged 2 commits intomainfrom
add-method-decl-type-param-lint-rules
Feb 28, 2026
Merged

Add style/method-declaration-format and style/type-parameter-format lint rules#4892
SeanTAllen merged 2 commits intomainfrom
add-method-decl-type-param-lint-rules

Conversation

@SeanTAllen
Copy link
Member

Two new pony-lint rules that check formatting of multiline declarations per the style guide:

  • style/method-declaration-format: checks that multiline method declarations have each parameter on its own line, the return type : indented one level from the method keyword, and the => aligned with the method keyword.
  • style/type-parameter-format: checks that multiline type parameter lists have the opening [ on the same line as the name, each type parameter on its own line, and the is keyword (for entity provides clauses) indented one level from the entity keyword.

Also applies the new rules to pony-lint's own source.

…t` lint rules

Two new pony-lint rules that check formatting of multiline declarations
per the style guide:

- method-declaration-format: each param on its own line, return type ':'
  indented one level from the method keyword, '=>' aligned with it.
- type-parameter-format: '[' on same line as name, each type param on its
  own line, 'is' keyword indented one level from entity keyword.

Also applies the new rules to pony-lint's own source (glob_match.pony,
_ast_test_helper.pony, _test_type_naming.pony).
@SeanTAllen SeanTAllen added the changelog - added Automatically add "Added" CHANGELOG entry on merge label Feb 28, 2026
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Feb 28, 2026
@SeanTAllen SeanTAllen removed the changelog - added Automatically add "Added" CHANGELOG entry on merge label Feb 28, 2026
@SeanTAllen SeanTAllen merged commit a1a45ec into main Feb 28, 2026
13 checks passed
@SeanTAllen SeanTAllen deleted the add-method-decl-type-param-lint-rules branch February 28, 2026 18:30
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Feb 28, 2026
SeanTAllen added a commit to ponylang/ponylang-website that referenced this pull request Feb 28, 2026
… rules

Two new pony-lint rules were added in ponylang/ponyc#4892. This adds
the corresponding table entries in the linting overview and detailed
rule reference sections with examples.

Closes #1195
SeanTAllen added a commit to ponylang/ponylang-website that referenced this pull request Feb 28, 2026
… rules (#1198)

Two new pony-lint rules were added in ponylang/ponyc#4892. This adds
the corresponding table entries in the linting overview and detailed
rule reference sections with examples.

Closes #1195
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.

2 participants