question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fails to run ktlint on over 3000 kotlin files in sourceset

See original GitHub issue

Plugin fails to run check/format tasks, when source set contains over 3000 kotlin files.

Currently plugin passes each file to ktlint and in this case may hit command line arguments limitation. (at least on Windows or MacOS).

Opened after discussion in #156

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
r-ralphcommented, Apr 26, 2019

JFYI: the maximum length of command line arguments is little different by OS.

  • Windows: 8,192 characters (http://support.microsoft.com/kb/830473)
  • Mac: 262,214 characters (depend on getconf ARG_MAX and might be different between machine)
  • Ubuntu: 2,097,152 characters (depend on getconf ARG_MAX and might be different between machine)

I’ve counted with my project that is showed in #156’s comment, it require about 290,000 characters.

1reaction
DenWavcommented, Sep 2, 2019

Yeah for now I’m just skipping the ktlintMainSourceSetCheck for my Windows build.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Alternate sourceSets are not detected #153 - GitHub
Once I do this, the plugin does not seem to be able to detect kotlin files in that directory. Kotlin files in src/main/java...
Read more >
android - Real time rules with ktlint - Stack Overflow
Go to Preferences > Tools > ktlint and make sure Enabled ktlint checkbox is selected. In case of android project also select Android...
Read more >
Changelog and Migration Guide - Pre 1.0.0 - Detekt
Now the detekt plugin must be applied to every project and just analyzes Kotlin files in the source set of this project. An...
Read more >
Configuring and running Ktlin on Android Studio
Hello Folks!! The goal of this post is help you to configure and run locally the static code analysis called Ktlint on Android...
Read more >
A ktlint gradle plugin - codeKK
This plugin creates convenient tasks in your Gradle project that run ktlint checks or do code auto format. The plugin can be applied...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found