lint errors: LINE_UNDEFINED eclipse jdt formatter(java.lang.reflect.InvocationTargetException) java

Open
#2,862 6 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
java
Domain
build-system

Research direction

Start by reproducing :core:spotlessJavaCheck with Spotless 8.2.1 using the smithy-java example and inspect the reported TraitMapBench.java failures, including LINE_UNDEFINED and removeUnusedImports. Compare the result with Spotless 8.1.0; done means the formatter check completes without these lint errors and the cause is documented.

Written by the indexing model from the issue text.

Description

I'm working some changes for smithy-java, and using spotless 8.2.1. Lately I have seen several errors like these after making some changes. Somehow the build gets broken after that and I cannot get out of that state. The build succeeds if I stash my changes. Any idea what can be the cause and how to fix it?

Update Downgraded to 8.1.0 and the build is back to normal

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':core:spotlessJavaCheck'.
> There were 214 lint error(s), they must be fixed or suppressed.
  src/jmh/java/software/amazon/smithy/java/core/schema/TraitMapBench.java:LINE_UNDEFINED eclipse jdt formatter(java.lang.reflect.InvocationTargetException) java.lang.reflect.InvocationTargetException (...)
  src/jmh/java/software/amazon/smithy/java/core/schema/TraitMapBench.java:LINE_UNDEFINED removeUnusedImports(java.lang.NoClassDefFoundError) com/google/googlejavaformat/java/RemoveUnusedImports (...)
Dominant language
Java
Stars
5.7k
Forks
560
Avg merge
1d 13h
Merged PRs (30d)
43

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from diffplug/spotless

All issues in diffplug/spotless

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.