Skip to content
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

Dekekt output is not clear when it fails #41

Open
adriangl opened this issue Jul 20, 2021 · 3 comments
Open

Dekekt output is not clear when it fails #41

adriangl opened this issue Jul 20, 2021 · 3 comments
Assignees
Labels

Comments

@adriangl
Copy link
Collaborator

SW details (please complete the following information):

  • Plug-in Version: 2.2.1

Summary and background of the bug
As reported by @nokite in #37:

Btw I often have trouble with detekt. Like now when merging master into my branch.
When there's a problem and the commit/merge commit is blocked, the error output is hard to read, it's all in one line 🙂
Maybe it's not correctly set up on my machine, didn't spend time on this.

Here's some output. In this case it's actually pretty short, but normally it also mentions some formatting/complexity warnings etc. (and it's all in one line)

Couldn't check the working tree for unmerged files because of an error. tput: No value for $TERM and no -T specified tput: No value for $TERM and no -T specified tput: No value for $TERM and no -T specified tput: No value for $TERM and no -T specified Running detekt > Task :detekt UP-TO-DATE Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 814ms 1 actionable task: 1 up-to-date Your code is properly formatted! could not read log file '/Users/.../poeditor-android-gradle-plugin/.git/MERGE_MSG': No such file or directory

@adriangl
Copy link
Collaborator Author

@nokite Could you provide some data about what OS you use and the Java version on your machine so I can try debugging this?

@nokite
Copy link
Contributor

nokite commented Jul 21, 2021

Sure, I'm using:

  • Mac OS 11.4 (20F71) on an Intel-based macbook
  • java 11.0.10 2021-01-19 LTS, Java(TM) SE Runtime Environment 18.9 (build 11.0.10+8-LTS-162)
  • Android Studio 4.2.2
    Build #AI-202.7660.26.42.7486908, built on June 24, 2021
    Runtime version: 11.0.8+10-b944.6916264 x86_64
    VM: OpenJDK 64-Bit Server VM by N/A
    macOS 10.16

@nokite
Copy link
Contributor

nokite commented Jul 21, 2021

To summarize the suggested improvements:

  • make sure errors are displayed on separate lines (no idea how easy this is)
  • suggest a way to run the checks from command line (as an alternative), so that the output can be seen in a more readable way

For instance, I use ktlint in my project, and it also shows a lot of noise in the small window in Android Studio. However, the nice thing is that violations are normally shown on new lines at the end, so it's relatively easy to see them. We also have a way to run the check from command line, to show the violations in a full-screen window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants