Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(lint): Add ktlint #4406

Merged
merged 5 commits into from
Jan 10, 2025
Merged

chore(lint): Add ktlint #4406

merged 5 commits into from
Jan 10, 2025

Conversation

antonis
Copy link
Collaborator

@antonis antonis commented Dec 31, 2024

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Note:
The suggested implementation uses the https://github.com/NaturalCycles/ktlint wrapper. The library might not be popular but seems to be the only actively maintained and on the latest version of ktlint.

💡 Motivation and Context

part of #2534

💚 How did you test it?

CI, locally

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

#skip-changelog

Copy link
Contributor

github-actions bot commented Dec 31, 2024

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 378.68 ms 420.02 ms 41.34 ms
Size 7.15 MiB 8.38 MiB 1.23 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
b1e8712+dirty 322.55 ms 331.84 ms 9.29 ms
07e58c9+dirty 391.00 ms 409.66 ms 18.66 ms
7bc4d75+dirty 420.96 ms 472.25 ms 51.29 ms
12427f4+dirty 379.48 ms 400.92 ms 21.44 ms
9282172+dirty 363.57 ms 399.78 ms 36.20 ms
43e66e0+dirty 378.20 ms 404.59 ms 26.40 ms
eb1e19f+dirty 391.37 ms 418.27 ms 26.90 ms
8e80789+dirty 464.48 ms 551.10 ms 86.63 ms
cdf2bdf+dirty 391.69 ms 461.14 ms 69.45 ms
e1ea4a8+dirty 451.98 ms 497.58 ms 45.60 ms

App size

Revision Plain With Sentry Diff
b1e8712+dirty 7.15 MiB 8.04 MiB 912.27 KiB
07e58c9+dirty 7.15 MiB 8.35 MiB 1.20 MiB
7bc4d75+dirty 7.15 MiB 8.35 MiB 1.20 MiB
12427f4+dirty 7.15 MiB 8.12 MiB 997.78 KiB
9282172+dirty 7.15 MiB 8.37 MiB 1.22 MiB
43e66e0+dirty 7.15 MiB 8.37 MiB 1.22 MiB
eb1e19f+dirty 7.15 MiB 8.35 MiB 1.20 MiB
8e80789+dirty 7.15 MiB 8.37 MiB 1.22 MiB
cdf2bdf+dirty 7.15 MiB 8.38 MiB 1.23 MiB
e1ea4a8+dirty 7.15 MiB 8.35 MiB 1.20 MiB

Previous results on branch: antonis/ktlint

Startup times

Revision Plain With Sentry Diff
3e74a18+dirty 376.84 ms 437.90 ms 61.05 ms

App size

Revision Plain With Sentry Diff
3e74a18+dirty 7.15 MiB 8.37 MiB 1.22 MiB

Copy link
Contributor

github-actions bot commented Dec 31, 2024

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1232.67 ms 1227.13 ms -5.55 ms
Size 2.63 MiB 3.68 MiB 1.05 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
484813b+dirty 1222.45 ms 1220.79 ms -1.66 ms
5a22220+dirty 1209.49 ms 1220.94 ms 11.45 ms
13f280b+dirty 1229.25 ms 1226.10 ms -3.15 ms
d7401ac+dirty 1252.38 ms 1275.04 ms 22.66 ms
8fe7c9d+dirty 1241.83 ms 1244.35 ms 2.51 ms
9385d74+dirty 1215.18 ms 1216.43 ms 1.25 ms
cdf2f33+dirty 1227.71 ms 1233.94 ms 6.22 ms
2534337+dirty 1225.08 ms 1230.26 ms 5.17 ms
4297324+dirty 1230.27 ms 1232.53 ms 2.27 ms
12427f4+dirty 1267.15 ms 1271.30 ms 4.15 ms

App size

Revision Plain With Sentry Diff
484813b+dirty 2.36 MiB 3.08 MiB 734.18 KiB
5a22220+dirty 2.36 MiB 2.92 MiB 570.21 KiB
13f280b+dirty 2.36 MiB 3.10 MiB 753.43 KiB
d7401ac+dirty 2.36 MiB 2.83 MiB 481.14 KiB
8fe7c9d+dirty 2.63 MiB 3.68 MiB 1.04 MiB
9385d74+dirty 2.36 MiB 3.10 MiB 759.78 KiB
cdf2f33+dirty 2.36 MiB 3.10 MiB 751.38 KiB
2534337+dirty 2.36 MiB 2.88 MiB 525.47 KiB
4297324+dirty 2.36 MiB 3.08 MiB 735.61 KiB
12427f4+dirty 2.36 MiB 2.88 MiB 530.38 KiB

Previous results on branch: antonis/ktlint

Startup times

Revision Plain With Sentry Diff
3e74a18+dirty 1232.94 ms 1240.92 ms 7.98 ms

App size

Revision Plain With Sentry Diff
3e74a18+dirty 2.36 MiB 3.12 MiB 779.41 KiB

Copy link
Contributor

github-actions bot commented Dec 31, 2024

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1240.23 ms 1239.23 ms -1.00 ms
Size 3.19 MiB 4.25 MiB 1.06 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
484813b+dirty 1225.07 ms 1221.00 ms -4.07 ms
5a22220+dirty 1246.18 ms 1249.61 ms 3.43 ms
13f280b+dirty 1217.73 ms 1229.08 ms 11.35 ms
d7401ac+dirty 1288.10 ms 1289.54 ms 1.44 ms
8fe7c9d+dirty 1227.63 ms 1245.28 ms 17.65 ms
9385d74+dirty 1239.51 ms 1245.88 ms 6.37 ms
cdf2f33+dirty 1210.00 ms 1218.50 ms 8.50 ms
2534337+dirty 1220.87 ms 1221.47 ms 0.60 ms
4297324+dirty 1240.86 ms 1232.04 ms -8.81 ms
12427f4+dirty 1224.90 ms 1231.40 ms 6.50 ms

App size

Revision Plain With Sentry Diff
484813b+dirty 2.92 MiB 3.64 MiB 740.56 KiB
5a22220+dirty 2.92 MiB 3.48 MiB 575.81 KiB
13f280b+dirty 2.92 MiB 3.66 MiB 758.67 KiB
d7401ac+dirty 2.92 MiB 3.40 MiB 488.06 KiB
8fe7c9d+dirty 3.19 MiB 4.24 MiB 1.06 MiB
9385d74+dirty 2.92 MiB 3.67 MiB 772.40 KiB
cdf2f33+dirty 2.92 MiB 3.66 MiB 755.50 KiB
2534337+dirty 2.92 MiB 3.43 MiB 529.76 KiB
4297324+dirty 2.92 MiB 3.64 MiB 741.22 KiB
12427f4+dirty 2.92 MiB 3.44 MiB 533.29 KiB

Previous results on branch: antonis/ktlint

Startup times

Revision Plain With Sentry Diff
3e74a18+dirty 1243.24 ms 1237.69 ms -5.55 ms

App size

Revision Plain With Sentry Diff
3e74a18+dirty 2.92 MiB 3.69 MiB 790.59 KiB

@antonis antonis marked this pull request as ready for review December 31, 2024 14:24
Copy link
Contributor

github-actions bot commented Dec 31, 2024

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 457.02 ms 453.19 ms -3.83 ms
Size 17.75 MiB 20.11 MiB 2.36 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
700cbf4 425.56 ms 436.26 ms 10.70 ms
d0bf494+dirty 375.37 ms 395.14 ms 19.77 ms
575f9da 415.26 ms 422.98 ms 7.72 ms
9433f35 347.64 ms 356.22 ms 8.58 ms
0ebca77 414.93 ms 444.49 ms 29.56 ms
e5c9b8b 409.02 ms 426.66 ms 17.64 ms
db44eaf 437.65 ms 436.06 ms -1.59 ms
c639edf 466.48 ms 489.57 ms 23.09 ms
e1ea4a8 506.82 ms 510.48 ms 3.66 ms
8de2810 430.47 ms 428.72 ms -1.75 ms

App size

Revision Plain With Sentry Diff
700cbf4 17.73 MiB 20.07 MiB 2.33 MiB
d0bf494+dirty 17.73 MiB 19.75 MiB 2.02 MiB
575f9da 17.73 MiB 19.83 MiB 2.10 MiB
9433f35 17.73 MiB 19.81 MiB 2.08 MiB
0ebca77 17.73 MiB 19.95 MiB 2.21 MiB
e5c9b8b 17.73 MiB 19.83 MiB 2.10 MiB
db44eaf 17.74 MiB 20.08 MiB 2.35 MiB
c639edf 17.74 MiB 20.08 MiB 2.34 MiB
e1ea4a8 17.74 MiB 20.08 MiB 2.34 MiB
8de2810 17.74 MiB 20.08 MiB 2.34 MiB

Previous results on branch: antonis/ktlint

Startup times

Revision Plain With Sentry Diff
3e74a18 464.52 ms 453.34 ms -11.18 ms

App size

Revision Plain With Sentry Diff
3e74a18 17.74 MiB 20.10 MiB 2.36 MiB

@krystofwoldrich
Copy link
Member

I've check the NaturalCycles/ktlint before, and the ktlint binary they ship in the NPM package is the same as pinterest releases on github.

Copy link
Member

@krystofwoldrich krystofwoldrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG 🚀 Thank you for improving the tooling.

We are almost at a point of linting all the languages used in the repo. 😄

@antonis antonis merged commit 2442538 into main Jan 10, 2025
69 of 70 checks passed
@antonis antonis deleted the antonis/ktlint branch January 10, 2025 08:38
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