Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to increase the error limit of 100 errors on IntelliJ IDEA?

I have an IntelliJ IDEA project but the compilation stops when it does encounter more than 100 errors and I would like to increase the limit in order to figure it out how much I do have to "refactor" the ancient code.

like image 533
sorin Avatar asked Aug 01 '12 13:08

sorin


People also ask

How do I fix errors in IntelliJ?

Apply fixes in the Problems tool window icon on the toolbar or in the context menu. You can also press Alt+Enter and select a suitable fix from the popup menu.

Why my IntelliJ is not showing errors?

To access this Problems panel, you must set your project to build automatically. Check the box for Preferences / Settings > Build, Execution, Deployment > Compiler > Build project automatically .


1 Answers

The 100 error limit you are seeing is not a limit of IntelliJ IDEA, per se, but is a default for the javac compiler that is being used to compile an application. After IDEA is using. the default number of errors, after is the default for the standard Sun/Oracle javaccompiler, but can be modified by passing an argument to the compiler; as can the maximum number of warnings, which also defaults to 100.

The online documentation for javac (e.g., the Java SE version 7 page at 'javac - Java programming language compiler') gives these arguments (in the section "Options", under the sub-heading "Non-Standard Options") as follows:

-Xmaxerrs number
     Set the maximum number of errors to print.

-Xmaxwarns number
     Set the maximum number of warnings to print.

When using javac in IntelliJ IDEA, these (and other) compiler arguments can be added by navigating to the settings for the project (e.g. F̲ile > Set̲tings or Ctrl+Alt+S); then, under the Project Settings heading, expand the ▼ Compiler section, select Java Compiler and enter the desired setting(s) into the text box following Additional command line parameters:. (e.g. to increase the limits to 123 errors and 456 warnings, enter -Xmaxerrs 123 -Xmaxwarns 456 into the textbox.)

  from http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javac.html, retrieved 2014-07-31, Archived by WebCite® at http://www.webcitation.org/6RTlsAI8T

  this process was vetted on version 13, by shelleybutterfly, and version 12 by Nicolas Guillaume, but the process is likely very similar, if not the same, for other versions.

like image 171
Nicolas Guillaume Avatar answered Oct 12 '22 01:10

Nicolas Guillaume