Code Monkey home page Code Monkey logo

Comments (10)

racka98 avatar racka98 commented on July 19, 2024 4

Detekt does support auto formatting based on ktlint. See: https://github.com/ReluctApp/Reluct/blob/c9de419e966abbf7e686ac7752dbe46178da2fc5/build.gradle.kts#L80

from dodoformastodon.

svenjacobs avatar svenjacobs commented on July 19, 2024 2

We could also use Twitter's 😉 Compose Rules. It's really nice because it also catches common Compose errors / gotchas.

from dodoformastodon.

rafsanjani avatar rafsanjani commented on July 19, 2024 1

As part of this task, we could also add some git hooks to auto-format and catch rule violations before code is pushed to GH

from dodoformastodon.

WhosNickDoglio avatar WhosNickDoglio commented on July 19, 2024

It's worth mentioning the detekt formatting rules just wrap ktlint rules so you can use detekt to cover both rulesets without adding another plugin for ktlint.

from dodoformastodon.

JacquesSmuts avatar JacquesSmuts commented on July 19, 2024

Ktlint comes with an autoformatter which makes it easy to automatically fix the formatting failure, or even prevent it by adding it to a pre-commit hook.

This would save everyone a lot of time.

As far as I'm aware, Detekt doesn't have an autoformatter like that?

from dodoformastodon.

thebino avatar thebino commented on July 19, 2024

While you all write so much comments into this issue, you could probably have it added already 😂
Fill a PR and let's start coding in style

from dodoformastodon.

svenjacobs avatar svenjacobs commented on July 19, 2024

I made good experience with the Kotlinter Gradle plugin. It also offers a Git hook.

from dodoformastodon.

bitPogo avatar bitPogo commented on July 19, 2024

Maybe spotless with ktlint is an option.

from dodoformastodon.

crocsandcoffee avatar crocsandcoffee commented on July 19, 2024

@racka98 plz make PR to upstream main. Thanks for taking the initiative and throwing something together. We can look over the setup you did in the PR and go from there.

from dodoformastodon.

racka98 avatar racka98 commented on July 19, 2024

@crocsandcoffee see #37

from dodoformastodon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.