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

Viewed 10482

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.

4 Answers

2022 UPDATE

The question is old but still valid when wanting to use current IDE technology on legacy code. For a maven build in intellij, Nicolas Guillaume's answer will not work - those settings are rightly overridden by maven. However, this configuration will yield the same result:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.10.0</version>
    <configuration>
        <fork>true</fork>
        <compilerVersion>1.5</compilerVersion>
        <executable>C:\Java\jdk-1.5.0_22\bin\javac.exe</executable>
        <source>1.5</source>
        <target>1.5</target>
        <compilerArgs>
            <arg>-Xmaxerrs</arg>
            <arg>1000</arg>
            <arg>-Xmaxwarns</arg>
            <arg>2000</arg>
        </compilerArgs>
    </configuration>
</plugin>

Some sources (even on SO) state that the correct option for Java5 is -Xmaxerrors, which is incorrect as reported in this bug. And that option didn't exist in 1.4 and earlier versions.

Related