-
Notifications
You must be signed in to change notification settings - Fork 105
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
Automated linting and style check #93
Comments
I agree with you @mkaze it would really lead to a clean codebase. May i suggest adding this linters to github actions if in future we go with set up a CI. This would actually automate and contributor need not to worry about formatting the code before pushing. |
Yeah, I also meant it to be automated, i.e. use it as an step of CI in Github PRs. I only mentioned the pre-commit hooks as an (optional and) additional tool for the contributors so that they can check and fix the related errors before pushing their commits. |
Hi, @therealansh and @mkaze do you have any ideas what style-check/linting should be added? Share best practices here in the thread |
@zaleslaw Well, I am relatively new to Kotlin in particular, but what I have in mind is a set of simple and standard checks as part of CI process (hopefully, triggered automatically on PR) which is a common practice in various projects written in different languages. These checks may include all the tests a standard linter or style-checker tool would do, e.g. checking unused imports/variables/functions, small optimizations/improvements, formatting issues according to a fixed style convention, redundant whitespaces/linebreaks, etc. Note that I am not necessarily have the more complex checks in my mind (things like function complexity checks or code smell); actually, I am more inclined towards standard style-checking and basic linting instead of a full-suit of static code analysis. For example, I have used |
My colleagues advised me ktlint and detekt (both together), so I'll try to set up them for the project in the nearest future. |
I was wondering if there is a plan to have automated style check and linting for contributions. This would be really useful to keep the codebase clean and consistent. Additionally, some pre-commit hooks for running style checks and linting could be set up to address this locally before pushing commits.
The text was updated successfully, but these errors were encountered: