Skip to content

Lint pony-doc and pony-lsp in CI#5098

Merged
SeanTAllen merged 1 commit intomainfrom
lint-pony-doc-and-pony-lsp
Apr 2, 2026
Merged

Lint pony-doc and pony-lsp in CI#5098
SeanTAllen merged 1 commit intomainfrom
lint-pony-doc-and-pony-lsp

Conversation

@SeanTAllen
Copy link
Copy Markdown
Member

@SeanTAllen SeanTAllen commented Apr 2, 2026

Extends pony-lint CI coverage to pony-doc and pony-lsp, so all three tools are held to the same linting standard.

  • Adds lint-pony-doc and lint-pony-lsp Makefile targets
  • Wires them into pr-tools.yml (Linux only — linting is platform-independent)
  • Removes redundant lint-pony-lint from ponyc-tier3.yml
  • Fixes all lint violations in pony-doc (~1,244) and pony-lsp (~587): file renames to match principal types, line-length wrapping, docstring formatting, blank-line spacing, call-argument formatting, exhaustive-match annotations, hard-tab removal, public docstrings, and more
  • Renames pony-lsp's PonyLspVersion to Version to match the convention used by pony-doc and pony-lint
  • Excludes pony-lsp/test/error_workspace/ from linting via .ignore since those files contain intentional compile errors for LSP diagnostic testing

@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Apr 2, 2026
@SeanTAllen SeanTAllen force-pushed the lint-pony-doc-and-pony-lsp branch from 1a13f3b to 604616e Compare April 2, 2026 03:23
pony-lint was already linting its own source in CI. This extends
that to pony-doc and pony-lsp so all three tools are held to the
same standard.

Adds lint-pony-doc and lint-pony-lsp Makefile targets and wires
them into pr-tools.yml and ponyc-tier3.yml. Fixes all lint
violations in both tools: file renames to match principal types,
line-length wrapping, docstring formatting, blank-line spacing,
call-argument formatting, exhaustive-match annotations, hard-tab
removal, and public docstrings. Test fixtures in
pony-lsp/test/error_workspace/ are excluded via .ignore since they
contain intentional compile errors.
@SeanTAllen SeanTAllen merged commit 96a0f2a into main Apr 2, 2026
18 checks passed
@SeanTAllen SeanTAllen deleted the lint-pony-doc-and-pony-lsp branch April 2, 2026 12:15
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Apr 2, 2026
SeanTAllen added a commit that referenced this pull request Apr 4, 2026
_MaxLineVisitor only checked node.line() for AST nodes, which
reports only the start line of string literals. For multi-line
docstrings, this meant blank lines inside the docstring body were
miscounted as blank lines between members.

The fix uses end_pos() to get the actual end line for multi-line
TK_STRING nodes, scoped to strings whose token_value contains a
newline (single-line and empty strings skip end_pos() due to a
pre-existing parsing bug in that method for short strings).

Also restores multi-paragraph docstrings in pony-lsp that were
collapsed in #5098 as a workaround for this bug.

Closes #5099
SeanTAllen added a commit that referenced this pull request Apr 4, 2026
…gs (#5109)

_MaxLineVisitor only checked node.line() for AST nodes, which
reports only the start line of string literals. For multi-line
docstrings, this meant blank lines inside the docstring body were
miscounted as blank lines between members.

The fix uses end_pos() to get the actual end line for multi-line
TK_STRING nodes, scoped to strings whose token_value contains a
newline (single-line and empty strings skip end_pos() due to a
pre-existing parsing bug in that method for short strings).

Also restores multi-paragraph docstrings in pony-lsp that were
collapsed in #5098 as a workaround for this bug.

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

3 participants