Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-69345

Checkstyle runs before compile, resulting in useless errors on uncompilable code

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • None

      Checkstyle runs before compile, resulting in useless errors like

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.1.2:check (validate) on project jenkins-core: Failed during checkstyle configuration: Exception was thrown while processing /…/core/src/main/java/hudson/FilePath.java: IllegalStateException occurred while parsing file /…/core/src/main/java/hudson/FilePath.java. 521:18: mismatched input '(' expecting ';': InputMismatchException -> [Help 1]
      

      The actual problem was a missing close-paren on line 542, which the compiler would have told me, but Checkstyle runs earlier, making me look for what the problem on the innocent line 521 is (different method, in fact different class).

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project jenkins-core: Compilation failure
      [ERROR] /…/core/src/main/java/hudson/FilePath.java:[542,134] error: ')' expected
      

      (Line numbers do not correspond to public code)

            Unassigned Unassigned
            danielbeck Daniel Beck
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: