Maven Checkstyle Plugin
  1. Maven Checkstyle Plugin
  2. MCHECKSTYLE-169

Suppressions property is incorrectly set if suppressions file is on classpath

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.8
    • Fix Version/s: 2.12
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      2

      Description

      If checkstyle plugin loads suppressions file from its classpath, and the checkstyle configuration contains suppression filter with a property placeholder, that property is not expanded because an incorrect path is used.

      1. MCHECKSTYLE-169-bugfix.patch
        7 kB
        Sergei Ivanov
      2. MCHECKSTYLE-169-it.patch
        11 kB
        Sergei Ivanov

        Issue Links

          Activity

          Hide
          Sergei Ivanov added a comment -

          Related to some prior changes, but the problem is that an unresolved (as in the plugin config) file path is passed into checkstyle engine, whereas the resolved file path (see getSuppressions() method) is not used.

          Show
          Sergei Ivanov added a comment - Related to some prior changes, but the problem is that an unresolved (as in the plugin config) file path is passed into checkstyle engine, whereas the resolved file path (see getSuppressions() method) is not used.
          Hide
          Dennis Lundberg added a comment -

          Can you give a sample project that we can use to test this?

          Show
          Dennis Lundberg added a comment - Can you give a sample project that we can use to test this?
          Hide
          Sergei Ivanov added a comment -

          Hello Dennis,
          Attached are an integration test for the described problem and a patch that fixes it. I wanted to add a couple of additional integration tests to check for regressions, but ran out of spare time. Please review and integrate into the next release if deemed suitable. The patch is against the SVN trunk for the plugin.
          Thank you.

          Show
          Sergei Ivanov added a comment - Hello Dennis, Attached are an integration test for the described problem and a patch that fixes it. I wanted to add a couple of additional integration tests to check for regressions, but ran out of spare time. Please review and integrate into the next release if deemed suitable. The patch is against the SVN trunk for the plugin. Thank you.
          Hide
          Sergei Ivanov added a comment -

          Any chance of the attached patch being integrated into 2.10?

          Show
          Sergei Ivanov added a comment - Any chance of the attached patch being integrated into 2.10?
          Hide
          Sergei Ivanov added a comment -

          Please, please!

          Show
          Sergei Ivanov added a comment - Please, please!
          Hide
          Sergei Ivanov added a comment -

          Can we have it integrated into 2.11, please?

          Show
          Sergei Ivanov added a comment - Can we have it integrated into 2.11, please?
          Hide
          Edwin Shin added a comment - - edited

          This was driving me nuts (using version 2.10). Is there any workaround in the meantime (e.g. is this a regression and is there an older version in which this does work)?

          Show
          Edwin Shin added a comment - - edited This was driving me nuts (using version 2.10). Is there any workaround in the meantime (e.g. is this a regression and is there an older version in which this does work)?
          Hide
          Sergei Ivanov added a comment -

          Can it be integrated into 2.12, please? It is frustrating that the issue is still unresolved after 2 years, despite a patch being available. We have effectively given up on Checkstyle integration into our Maven/Jenkins reports because of that.

          Show
          Sergei Ivanov added a comment - Can it be integrated into 2.12, please? It is frustrating that the issue is still unresolved after 2 years, despite a patch being available. We have effectively given up on Checkstyle integration into our Maven/Jenkins reports because of that.
          Hide
          Dennis Lundberg added a comment -

          Patch applied in r1570730. Many thanks!

          Show
          Dennis Lundberg added a comment - Patch applied in r1570730 . Many thanks!

            People

            • Assignee:
              Dennis Lundberg
              Reporter:
              Sergei Ivanov
            • Votes:
              5 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: