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.

Compilation stopping at first error

See original GitHub issue

Hello guys,

I’ve developed a BugChecker here but when I compile it fails at the first error, but there are other instances of that error that I would like to show to the user.

I mean:

/Users/sergio/Documents/projects/utqg-errorprone/utqg-errorprone-sampleusage/src/test/java/com/utqg/errorprone/sample/HelloNotPassing1Test.java:10: error: [UTQG:HelperMethodCannotBePublic] Helper Methods of test classes cannot be public.
  public void prepareMockedData() {
              ^
    (see https://www.mycompany.com/utqg/HelperMethodCannotBePublic)
1 error

But there are a lot of UTQG:HelperMethodCannotBePublic errors that I would like to show to the user at same time. In the actual process, user must fix each of them separately because they are displayed separately. I also tried mvn -fae -fn options but without any success.

How can I handle it?

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:6

github_iconTop GitHub Comments

4reactions
ajaygeorgecommented, May 11, 2018

I had ran into the same issue. This is what worked in case anyone is still looking for a solution. <compilerArg>-XepAllErrorsAsWarnings</compilerArg> to bring down all the ERRORs to WARNs and then to make sure compiler shows warnings as well add

 <compilerId>javac-with-errorprone</compilerId>
          <showWarnings>true</showWarnings>
0reactions
PhilippWendlercommented, Sep 7, 2016

We would also like a way to achieve this without marking errors as warnings. In fact, we use -Werror in our build on purpose to fail the build if error-prone reports anything. Now it would be nice if the reports from our CI build would include all problems and not only those from one file. Marking errors as warnings would mean the CI build would not be marked as failure at all, so this is not a solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using the Stop on First Error compilation mode - Overleaf
This article explains how to use Overleaf's Stop on first error compilation mode, together with reviewing some important background topics, including:.
Read more >
Stop compilation after first error - Visual Studio Feedback
Clang and G++ have a -Wfatal-errors option which instructs the compiler to abort compilation after the first error. This can be useful to...
Read more >
gcc compiler not stop on first error - Stack Overflow
There's a GCC compiler option -Wfatal-errors to stop after the first error: -Wfatal-errors. This option causes the compiler to abort ...
Read more >
How to stop compilation on first error : r/VisualStudio - Reddit
As far as I know, Visual Studio doesn't have this feature. Instead I use the extension StopOnFirstBuildError which does exactly what it says, ......
Read more >
Francesco Montorsi - Re: How to make GCC stop on first error
-Wfatal-errors This option causes the compiler to abort compilation on the first error occurred rather than trying to keep going and printing ...
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