jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
SonarQube Plugins
  • SonarQube Plugins
  • SONARPLUGINS-604

rules.xml encoding

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: PHP-0.2
  • Fix Version/s: PHP-0.3
  • Component/s: PHP
  • Labels:
    None
  • Environment:
    Windows XP
  • Number of attachments :
    0

Description

We encountered some issues using the PHP CodeSniffer plugin. We found that the rules.xml file is not encoded in UTF-8 and then raises an error when it's parsed by CodeSniffer. We had to manually encode it into UTF-8 and then re-inject it in the jar.
It seems also that the stax2 lib is used by the plugin but is not available inside the Sonar classpath. After making it available to the plugin, everything works fine.

We really appreciate the effort you're doing on these tools.
Right now, we're installing a SONAR PHP platform in order to test. We'll let you know how it goes.
If we can help in any way, feel free to contact us.

LOGICA Software Quality Center
(We speak French and English)

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Gabriele Santini added a comment - 12/Aug/10 7:19 AM

Hi, and thank you for testing the plugin.
The first help we need is feedback and bug reporting indeed.

We would like to be able to reproduce the issue, can you please tell us more about your environment? Which encoding do you use for OS and jvm ?

Show
Gabriele Santini added a comment - 12/Aug/10 7:19 AM Hi, and thank you for testing the plugin. The first help we need is feedback and bug reporting indeed. We would like to be able to reproduce the issue, can you please tell us more about your environment? Which encoding do you use for OS and jvm ?
Hide
Permalink
LOGICA Software Quality Center added a comment - 14/Aug/10 4:34 AM

Hi Gabriele,

We face this issue on a windows server machine with the Sun JDK 1.5 and default encoding. When using the code sniffer plugin, a parsing exception is thrown and the stack trace shows that there's something wrong with the Rule.xml file. So, after a look at that file inside the jar of the plugin, we convert it to UTF-8 and change the XML declaration to reflect this change. I'm not sure, but i remembered that the file was windows encoded (cp1512).

Hope this will help you.

Regards,

Logica Software Qality Center

Show
LOGICA Software Quality Center added a comment - 14/Aug/10 4:34 AM Hi Gabriele, We face this issue on a windows server machine with the Sun JDK 1.5 and default encoding. When using the code sniffer plugin, a parsing exception is thrown and the stack trace shows that there's something wrong with the Rule.xml file. So, after a look at that file inside the jar of the plugin, we convert it to UTF-8 and change the XML declaration to reflect this change. I'm not sure, but i remembered that the file was windows encoded (cp1512). Hope this will help you. Regards, Logica Software Qality Center
Hide
Permalink
Akram Ben Aissi added a comment - 15/Sep/10 8:53 AM

Priority lowered because a workaround exists

Show
Akram Ben Aissi added a comment - 15/Sep/10 8:53 AM Priority lowered because a workaround exists
Hide
Permalink
Akram Ben Aissi added a comment - 15/Dec/10 5:31 PM

rules.xml files have been updated and encoding is correct now

Show
Akram Ben Aissi added a comment - 15/Dec/10 5:31 PM rules.xml files have been updated and encoding is correct now

People

  • Assignee:
    Akram Ben Aissi
    Reporter:
    LOGICA Software Quality Center
Vote (0)
Watch (0)

Dates

  • Created:
    30/Jul/10 9:14 AM
    Updated:
    27/Dec/10 6:45 PM
    Resolved:
    15/Dec/10 5:31 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.