Skip to content

Conversation

@stuartmorgan-g
Copy link
Collaborator

Updates the tooling to fetch and use ktfmt for Kotlin code, the same way it currently does for the Google Java formatter, and applies that formatting (in the default mode; see discussion in the linked issue) to the repository.

In the future we could revisit the formatter or mode, but since this currently seems to be the most consistent with our other languages and to google3 formatting this is likely the option we'll want to stick with.

Fixes flutter/flutter#118756

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@stuartmorgan-g
Copy link
Collaborator Author

@reidbaker I'll wait for your approval on this as the primary stakeholder who hasn't weighed in yet.

Everyone else can ignore this; it touched a lot of examples which force-added a lot of reviewers :(

@stuartmorgan-g stuartmorgan-g added the override: no changelog needed Override the check requiring CHANGELOG updates for most changes label Nov 12, 2023
@stuartmorgan-g
Copy link
Collaborator Author

Overriding changelog: The app boilerplate changes are uninteresting to package clients.

@stuartmorgan-g stuartmorgan-g added the override: no versioning needed Override the check requiring version bumps for most changes label Nov 12, 2023
@stuartmorgan-g
Copy link
Collaborator Author

Overriding version: There's minor formatting change to the Pigeon README which can go out in the next Pigeon release (we have several lined up, and skipping the versioning here avoids conflicts in those).

@reidbaker reidbaker added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 13, 2023
@auto-submit auto-submit bot merged commit 72de224 into flutter:main Nov 13, 2023
@stuartmorgan-g stuartmorgan-g deleted the kotlin-format branch November 13, 2023 16:25
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 14, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Nov 14, 2023
@reidbaker reidbaker mentioned this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App override: no changelog needed Override the check requiring CHANGELOG updates for most changes override: no versioning needed Override the check requiring version bumps for most changes p: animations p: dynamic_layouts The dynamic_layouts package p: file_selector p: flutter_adaptive_scaffold p: flutter_image p: flutter_markdown p: go_router p: palette_generator p: pigeon p: rfw Remote Flutter Widgets platform-android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[packages] Add support for Kotlin auto-formatting

2 participants