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

DOS backslashes in paths are not handled properly.

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • violations-plugin
    • None
    • Platform: PC, OS: Windows XP

      Violations Report for build 91
      Type Violations Files in violation
      stylecop 2319 211

      stylecop
      filename l m h number ↑
      twcoms_v\Order_Management_Products_VOB\TraderWorkstationMS\Dev\OrderManagement\build\..\OrderManagement\TestHarness\RemoteForm.cs
      0 524 0 524 (+524)
      twcoms_v\Order_Management_Products_VOB\TraderWorkstationMS\Dev\OrderManagement\build\..\OrderManagement\TestHarness\Form1.cs

      etc...

      I click on the links to see the violations for the file and I get no output.
      Just a white screen.

      I notice the URL linked to is this:

      http://mdsbu01:9090/hudson/job/TW%20COMS/violations/file/twcoms_v%5COrder_Management_Products_VOB%5CTraderWorkstationMS%5CDev%5COrderManagement%5Cbuild%5C..%5COrderManagement%5CTestHarness%5CRemoteForm.cs

      Lots of %5C (backslashes).

      The violations plugin has written a whole bunch of .xml files to the build
      output dir. Eg:

      D:\CI\jobs\TW
      COMS\builds\2009-04-29_14-44-29\violations\file\twcoms_v\Order_Management_Products_VOB\....
      etc

      However if I alter the URL to replace the backslashes with forward slashes I get
      this:

      twcoms_v/Order_Management_Products_VOB/TraderWorkstationMS/Dev/OrderManagement/OrderManagement/TestHarness/RemoteForm.cs
      No violations found

      What is going on here?

          [JENKINS-3589] DOS backslashes in paths are not handled properly.

          Can you attach an offending stylecop file so I can test with it.

          I have released a new version of violations (0.7.4) that may fix
          this issue - or at least generate correct urls.

          peterkittreilly added a comment - Can you attach an offending stylecop file so I can test with it. I have released a new version of violations (0.7.4) that may fix this issue - or at least generate correct urls.

          Martin Balint added a comment -

          I have a very similar problem on Windows Server 2003 R2, Hudson 1.322 and
          Violations 0.7.4.

          Generated violations.xml looks like:
          <violations>
          <type name='stylecop'>
          <file

          name="repos\EnclMonModule\obj\Release9\WorkItems\EnclMonMain\EnclMonMainPresenter.cs"
          count = '13'>
          <severity level="2" count="13"/>
          <source name="DocumentationRules" count="13"/>
          </file>

          In Hudson, when I click on this link, I get blank screen.
          URL:
          https://hudson-net/hudson_net/view/CheckOnly/job/CheckOnly_DotNetClientRU_StyleCop/2/violations/file/repos\EnclMonModule\obj\Release9\WorkItems\EnclMonMain\EnclMonMainPresenter.cs

          When I manually edit violations.xml and reverse slashes to:
          <file

          name="repos/EnclMonModule/obj/Release9/WorkItems/EnclMonMain/EnclMonMainPresenter.cs"
          and restart Hudson, I can see violations details.

          Seems like plugin doesn't generate valid slashes in URL.

          Martin Balint added a comment - I have a very similar problem on Windows Server 2003 R2, Hudson 1.322 and Violations 0.7.4. Generated violations.xml looks like: <violations> <type name='stylecop'> <file name="repos\EnclMonModule\obj\Release9\WorkItems\EnclMonMain\EnclMonMainPresenter.cs" count = '13'> <severity level="2" count="13"/> <source name="DocumentationRules" count="13"/> </file> In Hudson, when I click on this link, I get blank screen. URL: https://hudson-net/hudson_net/view/CheckOnly/job/CheckOnly_DotNetClientRU_StyleCop/2/violations/file/repos\EnclMonModule\obj\Release9\WorkItems\EnclMonMain\EnclMonMainPresenter.cs When I manually edit violations.xml and reverse slashes to: <file name="repos/EnclMonModule/obj/Release9/WorkItems/EnclMonMain/EnclMonMainPresenter.cs" and restart Hudson, I can see violations details. Seems like plugin doesn't generate valid slashes in URL.

          danpfe added a comment -

          Got the same problem...

          violations.xml contains backslashes when building on a Windows agent and this isn't properly taken care off when looking at the violations in the browser.

          <file
          name="x.y.z.PaymentSolution\x.y.z.PaymentSolution\obj\Debug\12\TEMPLATE\Features\PaymentSolution\PageLayouts\Confirm.aspx.cs"
          count = '22'>
          <severity level="2" count="22"/>
          <source name="ReadabilityRules" count="2"/>
          <source name="DocumentationRules" count="3"/>
          <source name="OrderingRules" count="17"/>
          </file>

          This may be easy to fix with a simple name.replace("
          ", "/"), but I haven't looked at the code so I may underestimate the amount of work required.

          danpfe added a comment - Got the same problem... violations.xml contains backslashes when building on a Windows agent and this isn't properly taken care off when looking at the violations in the browser. <file name="x.y.z.PaymentSolution\x.y.z.PaymentSolution\obj\Debug\12\TEMPLATE\Features\PaymentSolution\PageLayouts\Confirm.aspx.cs" count = '22'> <severity level="2" count="22"/> <source name="ReadabilityRules" count="2"/> <source name="DocumentationRules" count="3"/> <source name="OrderingRules" count="17"/> </file> This may be easy to fix with a simple name.replace(" ", "/"), but I haven't looked at the code so I may underestimate the amount of work required.

            peterkittreilly peterkittreilly
            orj76 orj76
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: