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

Add ktlint #144

Merged
merged 1 commit into from
Oct 30, 2022
Merged

Add ktlint #144

merged 1 commit into from
Oct 30, 2022

Conversation

fejd
Copy link
Contributor

@fejd fejd commented Oct 29, 2022

Add support for checking the code with ktlint.
The ktlintCheck task can be run to get an issue report. The ktlint configuration is set up to produce a plain text report and an HTML report.

This fixes #19.

Add support for checking the code with ktlint.
The ktlintCheck task can be run to get an issue report.
The ktlint configuration is set up to produce a plain text report
and an HTML report.

This fixes hieuwu#19.
@hieuwu
Copy link
Owner

hieuwu commented Oct 29, 2022

Add support for checking the code with ktlint. The ktlintCheck task can be run to get an issue report. The ktlint configuration is set up to produce a plain text report and an HTML report.

This fixes #19.

Hi can you put some examples, screenshot of the html and short brief how to use it?

@fejd
Copy link
Contributor Author

fejd commented Oct 29, 2022

Sure! I've added a screenshot of the HTML page. You run the ktlint check with ./gradlew ktlintCheck and it will output three reports (one for each source set, main, test and androidTest) into this folder: app/build/reports/ktlint.
Currently it finds 105 issues most of which are related to formatting (line indentation, line length etc.).

ktlintMainSourceSetCheck

Copy link
Owner

@hieuwu hieuwu left a comment

Choose a reason for hiding this comment

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

LGTM! 🔥 This PR is lit

@hieuwu hieuwu merged commit 1931177 into hieuwu:main Oct 30, 2022
@fejd fejd deleted the ktlint branch December 3, 2022 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use klint for setting up code convention
2 participants