-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
Adding linting and linted project #445
Conversation
Codecov Report
@@ Coverage Diff @@
## main #445 +/- ##
============================================
+ Coverage 41.33% 50.40% +9.07%
- Complexity 1321 1624 +303
============================================
Files 211 213 +2
Lines 10096 10269 +173
Branches 2028 2032 +4
============================================
+ Hits 4173 5176 +1003
+ Misses 5042 4101 -941
- Partials 881 992 +111
Continue to review full report at Codecov.
|
It looks like a large amount of the diff is from changing the tabs to spaces. Can you configure it to keep the tabs? |
Was fighting with getting this to work correctly and not throw errors about unexpected indentation when using tabs for a while only to realize there is an outstanding issue pinterest/ktlint#1245 so sadly tabs are not playing nicely 😢 |
Excellent find! Let's wait until those recent tab fixes are merged and see what the linter thinks after that. |
Can you check if the linter supports tab indentation yet? I think you'll need to force push an updated commit due to the intervening changes. |
I have actually been monitoring this to see what the status of that issue was and while it looks like they fixed the tabs now I'm encountering issues with KTLint-gradle which fails the entire linting process (JLLeitschuh/ktlint-gradle#549 (comment)) on the new version of KT that fixes those tabs. Sadly it looks like this is still blocked 😢 |
I think I'll close this for now, because of the number of conflicting files in the intervening time. |
Added linting via https://github.com/JLLeitschuh/ktlint-gradle which utilizes KTLint . To run the linter against the codebase, do a rebuild on the project through Build > Rebuild Project then run either
ktlintCheck
to find any linting issues or runktlintFormat
where it will find issues and if it can fix them automatically it will, otherwise the build fails and you will have to manually fix the issues. You can see a list of the rules that KTLint enforces here: https://ktlint.github.io/ . We have the ability to add more rules as needed or tweak existing ones.I have ran ktlintFormat on all of the codebase and made manual changes where needed but now the entire codebase should be successfully linted 😃.
I don't have access to make the changes but I think we should probably add a linting github check for PRs to enforce the new style and ensure that future code that is pushed in is consistent.