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

Kotlinify codebase #91

Merged
merged 1 commit into from
Jan 29, 2024
Merged

Kotlinify codebase #91

merged 1 commit into from
Jan 29, 2024

Conversation

azrael8576
Copy link
Owner

  • Remove unnecessary nullable types
  • Replace no-op method bodies with Unit
  • Convert to expression body
  • Replace if with when
  • Remove braces from 'when' entries
  • Remove braces from if statement
  • Convert to single line lambda
  • oneline if/returns
  • Replace 'contains' call with 'in' operator

Following this refactor, it could be great to envision a more "strict" code formatter like ktlint 1.0.1 (we are currently stuck at 0.48.1)


Thank you for opening a Pull Request!
Before submitting your PR, please make sure you:

  • Include a PR description which states what you've done and why
  • Open a GitHub issue as a bug/feature request before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass (./gradlew --init-script gradle/init.gradle.kts spotlessApply to automatically apply formatting)
  • Update any relevant documentation

Are you a first-time contributor?

  • Ensure you've read and understood the contributing guidelines
  • Familiarize yourself with the project structure and the codebase

Fixes #89 🦕

- Remove unnecessary nullable types
- Replace no-op  method bodies with Unit
- Convert to expression body
- Replace if with when
- Remove braces from 'when' entries
- Remove braces from if statement
- Convert to single line lambda
- oneline if/returns
- Replace 'contains' call with 'in' operator

Following this refactor, it could be great to envision a more "strict" code formatter like ktlint 1.0.1 (we are currently stuck at 0.48.1)
@azrael8576 azrael8576 added the enhancement New feature or request label Jan 29, 2024
@azrael8576 azrael8576 self-assigned this Jan 29, 2024
@azrael8576 azrael8576 marked this pull request as ready for review January 29, 2024 02:21
@azrael8576 azrael8576 merged commit 822d97a into main Jan 29, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FR]: Refactor Kotlinify codebase (ktlint v.1.0.1)
1 participant