Skip to content

Add pony-lint and fix all style errors - #346

Merged
SeanTAllen merged 1 commit into
mainfrom
add-pony-lint
Aug 8, 2026
Merged

Add pony-lint and fix all style errors#346
SeanTAllen merged 1 commit into
mainfrom
add-pony-lint

Conversation

@SeanTAllen

Copy link
Copy Markdown
Member

Adds a pony-lint GitHub Actions workflow and Makefile lint target, then fixes all style errors across the codebase.

Style fixes applied:

  • acronym-casing: Json -> JSON throughout (JSONDoc, JSONType, JSONArray, JSONObject, JSONError, _JSONPrint)
  • member-naming: camelCase -> snake_case (resultReceiver, reportError, actionResult, matchIndex, allMatch, newCells, cellsFromDeps, fromCell, setName, fieldId, and others)
  • line-length: wrapped lines exceeding 80 columns
  • public-docstring: added docstrings to all public types and methods
  • package-docstring: created package docstring files for packages that lacked them (cmd.pony, corral.pony, mort.pony, util.pony, test.pony, integration.pony, utils.pony, readme.pony)
  • assignment-indent: moved multiline assignment RHS to start on the line after =
  • match-case-indent: aligned | with match keyword
  • call-argument-format: when call args span multiple lines, put each on its own line
  • array-literal-format: added space after [ in multiline arrays
  • blank-lines: exactly 1 blank line between entities
  • comment-spacing: single space after //
  • dot-spacing: space after .> operator
  • control-structure-alignment: aligned else/end with opening keyword
  • indentation-size: fixed indentation to multiples of 2 spaces
  • lambda-spacing: space before } in single-line lambdas
  • prefer-chaining: replaced intermediate variables with .> chaining where safe
  • exhaustive-match: added \exhaustive\ annotation
  • docstring-format: fixed docstring formatting

Remaining style/file-naming errors (not addressed in this PR to keep the diff reviewable):

  • corral/archive/decoder.pony -> archive_decoder.pony
  • corral/archive/encoder.pony -> archive_encoder.pony
  • corral/bundle/_flatttened.pony -> _flattened.pony
  • corral/cmd/repo.pony -> repo_for_dep.pony
  • corral/cmd/result_receiver.pony -> cmd_result_receiver.pony
  • corral/cmd/script.pony -> post_fetch_script.pony
  • corral/logger/_test.pony -> _string_logger_test.pony
  • corral/logger/logger.pony -> log_formatter.pony
  • corral/semver/solver/cell.pony -> _cell.pony
  • corral/semver/solver/conflict_snapshot.pony -> _conflict_snapshot.pony
  • corral/test/util.pony -> checker.pony
  • corral/vcs/bzr.pony -> bzr_vcs.pony
  • corral/vcs/hg.pony -> hg_vcs.pony
  • corral/vcs/svn.pony -> svn_vcs.pony
  • corral/vcs/vcs.pony -> tag_list_receiver.pony

Also remaining: lint/ast-error entries from relative imports (expected and unavoidable).

@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Aug 8, 2026
Split multi-type files in logger and vcs packages so each file
has a single principal type matching its filename. Generate
version.pony before linting. Exclude testdata from linting
since those programs reference packages not available at lint
time.
@SeanTAllen
SeanTAllen merged commit b64eb03 into main Aug 8, 2026
13 checks passed
@SeanTAllen
SeanTAllen deleted the add-pony-lint branch August 8, 2026 21:22
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Aug 8, 2026
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