Skip to content

Conversation

DominicGBauer
Copy link
Contributor

@DominicGBauer DominicGBauer commented Oct 29, 2024

Description

To maintain consistency of code formatting between different developer machines we need to introduce a formatter. There appears to be a standard library for dealing with this - ktlint. This PR includes ktlint into the project by using the gradle plugin kotlinter. The .editorconfig with klint will maintain consistency between different developer machines by enforcing standard rules and formatting.

The formatter was run and linting fixes are included in this PR.

A lint check is added to the github actions build step.

To enable klint in Android studio (or any other intellij IDE) for automatic formatting and to see linting errors install the ktlint plugin.

stevensJourney
stevensJourney previously approved these changes Oct 29, 2024
Copy link
Contributor

@stevensJourney stevensJourney left a comment

Choose a reason for hiding this comment

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

Looks good to me. Could we document how to configure Android Studio with klint in a README?

@DominicGBauer DominicGBauer merged commit 6d321a9 into main Oct 29, 2024
3 checks passed
@DominicGBauer DominicGBauer deleted the chore/add-klint branch October 29, 2024 14:27
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