A program that reformats Kotlin source code to comply with the common community standard for Kotlin code conventions.
by facebookKotlin
Last 12 weeks · 17 commits
4 of 6 standards met
Repository: facebook/ktfmt. Description: A program that reformats Kotlin source code to comply with the common community standard for Kotlin code conventions. Stars: 1209, Forks: 98. Primary language: Kotlin. Languages: Kotlin (96.1%), CSS (1.2%), JavaScript (1.2%), HTML (1.2%), Shell (0.4%). License: Apache-2.0. Homepage: https://facebook.github.io/ktfmt/ Latest release: v0.61 (2mo ago). Open PRs: 4, open issues: 52. Last activity: 17h ago. Community health: 75%. Top contributors: cgrushko, strulovich, davidtorosyan, nreid260, hick209, dependabot[bot], cortinico, rock3r, salvatorebenedetto, JavierSegoviaCordoba and others.
https://github.com/facebook/ktfmt/blob/5cbe19afa0780cee7ea3403e68f4e4578aeed937/core/src/test/java/com/facebook/ktfmt/kdoc/KDocFormatterTest.kt#L4113 While the point of this test overall might be to assure that there aren't regressions in this table formatting, this test also demonstrates that it will reflow something that looks like a table, but isn't in fact a KDoc (GFM?) table. The intent of the comment was that this second, smaller block should also be a table. I don't know what is more useful to this project -- this buggy comment, or a fixed one -- but maybe consider replacing the s with s in the source string, and validating that this second table is also formatted as a table by ktfmt?
The IDE puked at me Here is the stack trace: IDE DETAILS IntelliJ IDEA 2025.3.2 Build #IU-253.30387.90, built on January 22, 2026 Source revision: 61f1e2a0a8f30 Runtime version: 21.0.9+10-b1163.94 x86_64 (JCEF 137.0.17) VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Toolkit: sun.lwawt.macosx.LWCToolkit macOS 26.3 GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation Memory: 5000M Cores: 12 Metal Rendering is ON Registry: analyze.exceptions.on.the.fly=true ide.experimental.ui=true idea.ignore.disabled.plugins=true jetbrains.security.package-checker.enablePipEnvTransitiveDependencies=false maven.packagesearch.enabled=false jetbrains.security.package-checker.enableVenvTransitiveDependencies=false jetbrains.security.package-checker.enablePoetryTransitiveDependencies=false jetbrains.security.package-checker.enableUvTransitiveDependencies=false kotlin.scripting.index.dependencies.sources=true jetbrains.security.package-checker.depthLimitOfTransitiveDependencies=3 kotlin.notebook.outdated.dependencies.hints=false Non-Bundled Plugins: com.intellij.notebooks.core (253.30387.193) com.sdadas.jasypt (0.9.6) org.intellij.plugins.hcl (253.30387.20) com.github.helloworldsg.tokenforge (0.1.1) com.github.xepozz.gitattributes (2026.1.0) lermitage.intellij.ilovedevtoys (1.11.1) Subversion (253.30387.193) dev.oszoou.aura-theme (1.0.4) ru.adelf.idea.dotenv (253.30387.193) com.github.novotnyr.jwt-intellij-plugin (0.21) com.intellij.mermaid (0.0.26+IJ.252) com.intellij.spring (253.30387.173) GenerateSerialVersionUID (3.0.3) com.sohocn.serialVersionUid (1.1.3) org.jetbrains.plugins.terminal (253.30387.92) com.haulmont.jpab (253.30387.20) com.d1vivek.JksGeneratorPlugin (1.2) String Manipulation (9.16.0) com.fapiko.jetbrains.plugins.better_direnv (1.2.2) com.facebook.ktfmt_idea_plugin (1.3.0.61) com.jetbrains.restClient (253.30387.92) com.junkfactory.tokyodark (2.0.0) intellij.jupyter (253.30387.193) com.github.davidseptimus.armada-syntax-highlighter (1.1.0) com.github.davidseptimus.armada (1.1.0) PlantUML integration (7.13.0-IJ2023.2) org.asciidoctor.intellij.asciidoc (0.45.3) de.achimonline.recent_projects_cleaner (1.2.2) com.intellij.nativeDebug (253.30387.79) net.seesharpsoft.intellij.plugins.csv (4.2.0) io.github.umutcansu.GradleArtisan (1.0.11) izhangzhihao.rainbow.brackets (2025.3.7) dev.turingcomplete.intellijdevelopertoolsplugins (7.1.0) com.faendir.intellij.gradle-version-catalogs-plugin (1.4.0) org.jusecase.jte-intellij (2.2.2) com.github.ArtsiomCh.KDocCleanRead (233.1) kotest-plugin-intellij (6.1.3-2025.3.2) com.atlassian.bitbucket.references (2023.1.304) com.brandiico.jetbrains-nightfall-theme (2.0.6) Kotlin: 253.30387.90-IJ
The ktfmt settings controls were putting the of the instead of the which was expected by the formatting options creation code.