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
Sonar Plugins
  • Sonar Plugins
  • SONARPLUGINS-1683

Parsing DPK Files

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: DELPHI-0.1
  • Fix Version/s: DELPHI-0.2
  • Component/s: Delphi
  • Labels:
    None
  • Number of attachments :
    4

Description

Hello,

I used Delphi plugin on DPK project using property :

<property key="sonar.delphi.sources.project" value="Paquet\MonProjet.dproj"/>

My project has some references with DCP Files. Delphi plugin tried to parse DCP Files and raise an exception. I think this will be the same issue if my project references other files than pas files.
In dproj, there is no difference between referencing PAS File or DCP File.

Nicolas.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    Delphi-1683-dprojfix.patch
    09/Mar/12 5:38 AM
    6 kB
    Przemyslaw Kociolek
  2. Text File
    Delphi-1683-dprojfix-2.patch
    12/Mar/12 12:29 PM
    6 kB
    Nicolas DOLE
  3. File
    MC2Article.dpk
    09/Mar/12 1:34 AM
    36 kB
    Nicolas DOLE
  4. File
    MC2Article.dproj
    09/Mar/12 1:34 AM
    42 kB
    Nicolas DOLE

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Przemyslaw Kociolek added a comment - 08/Mar/12 5:04 AM

Could you please include your .dproj file?

Show
Przemyslaw Kociolek added a comment - 08/Mar/12 5:04 AM Could you please include your .dproj file?
Hide
Permalink
Nicolas DOLE added a comment - 09/Mar/12 1:34 AM - edited

I include my dpk and my dproj files.

There is the output from ant:

[sonar:sonar] 08:31:46.717 ERROR Could not add file to project: D:\CompilsAuto\MC2\MC2_ArticlePlugin\SigmaCommRun2009.dcp
[sonar:sonar] 08:31:46.717 ERROR .dproj xml error: Could not add file to project: D:\CompilsAuto\MC2\MC2_ArticlePlugin\SigmaCommRun2009.dcp
[sonar:sonar] 08:31:46.733 INFO No exclude directories found in project configuration.
[sonar:sonar] 08:31:46.733 INFO Parsing project
[sonar:sonar] 08:31:46.733 INFO Files to parse: 0

BUILD FAILED
java.lang.NullPointerException
at org.sonar.plugins.delphi.DelphiSensor.parseFiles(DelphiSensor.java:198)
at org.sonar.plugins.delphi.DelphiSensor.analyse(DelphiSensor.java:102)

Nicolas.

Show
Nicolas DOLE added a comment - 09/Mar/12 1:34 AM - edited I include my dpk and my dproj files. There is the output from ant: [sonar:sonar] 08:31:46.717 ERROR Could not add file to project: D:\CompilsAuto\MC2\MC2_ArticlePlugin\SigmaCommRun2009.dcp [sonar:sonar] 08:31:46.717 ERROR .dproj xml error: Could not add file to project: D:\CompilsAuto\MC2\MC2_ArticlePlugin\SigmaCommRun2009.dcp [sonar:sonar] 08:31:46.733 INFO No exclude directories found in project configuration. [sonar:sonar] 08:31:46.733 INFO Parsing project [sonar:sonar] 08:31:46.733 INFO Files to parse: 0 BUILD FAILED java.lang.NullPointerException at org.sonar.plugins.delphi.DelphiSensor.parseFiles(DelphiSensor.java:198) at org.sonar.plugins.delphi.DelphiSensor.analyse(DelphiSensor.java:102) Nicolas.
Hide
Permalink
Przemyslaw Kociolek added a comment - 09/Mar/12 5:38 AM

Please try the following patch.

Show
Przemyslaw Kociolek added a comment - 09/Mar/12 5:38 AM Please try the following patch.
Hide
Permalink
Nicolas DOLE added a comment - 12/Mar/12 11:57 AM

Hello,

I tried this patch but I had some problems:

1) Sonar don't start because of constructor DelphiLanguage wich became private. I changed it to public and i could start Sonar. Sonar version 2.13.1 .
2) In method DelphiProject.addFile, there is a check for existing file before verifying valid extension. This throws IOException. I move this check after verifying the extension and now it's ok.

Nicolas.

Show
Nicolas DOLE added a comment - 12/Mar/12 11:57 AM Hello, I tried this patch but I had some problems: 1) Sonar don't start because of constructor DelphiLanguage wich became private. I changed it to public and i could start Sonar. Sonar version 2.13.1 . 2) In method DelphiProject.addFile, there is a check for existing file before verifying valid extension. This throws IOException. I move this check after verifying the extension and now it's ok. Nicolas.
Hide
Permalink
Przemyslaw Kociolek added a comment - 12/Mar/12 12:05 PM

Nicolas, could you post a fixed patch?

Show
Przemyslaw Kociolek added a comment - 12/Mar/12 12:05 PM Nicolas, could you post a fixed patch?
Hide
Permalink
Nicolas DOLE added a comment - 12/Mar/12 12:29 PM

I join my patch.
This patch is merged with the first one.

Show
Nicolas DOLE added a comment - 12/Mar/12 12:29 PM I join my patch. This patch is merged with the first one.

People

  • Assignee:
    Przemyslaw Kociolek
    Reporter:
    Nicolas DOLE
Vote (0)
Watch (2)

Dates

  • Created:
    07/Mar/12 4:48 PM
    Updated:
    27/Aug/12 7:08 AM
    Resolved:
    27/Aug/12 7:08 AM
  • 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.