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-1531

LOC counter is broken

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: FLEX-0.4
  • Fix Version/s: FLEX-1.1
  • Component/s: Flex
  • Labels:
    None
  • Number of attachments :
    0

Description

It appears that there is a problem with the LOC counter for the flex plug-in. I'll use the real life example from the flex plug-in page on the sonar website – http://nemo.sonarsource.org/dashboard/index/com.adobe:as3corelib

LOC – http://nemo.sonarsource.org/drilldown/measures/com.adobe:as3corelib?metric=ncloc
Physical lines – http://nemo.sonarsource.org/drilldown/measures/com.adobe:as3corelib?metric=lines

com.adobe.net.URI has roughly 2450 physical lines, but only 1 LOC according to Sonar.

Not all files are showing this problem, however.

Issue Links

is superceded by

New Feature - A new feature of the product, which has yet to be developed. SONARPLUGINS-1906 Integrate Flex parser based on SSLR

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Fabrice Bellingard added a comment - 22/Feb/12 7:51 AM

Good catch, Josh!

I've made some tests, and the problem comes from FlexMetrics which fails to parse some files (like URI.as). The problem is that it fails silently, while printing out a report for the file in the "javancss-raw-report.xml" file (in which it sets every metric to '0', which is misleading for the Sonar Flex plugin...).

The bad news is that from what I can see on FlexMetrics (and more generally FlexPMD) website, those projects seem to be inactive and I'm afraid we won't get a fix for this

Show
Fabrice Bellingard added a comment - 22/Feb/12 7:51 AM Good catch, Josh! I've made some tests, and the problem comes from FlexMetrics which fails to parse some files (like URI.as). The problem is that it fails silently, while printing out a report for the file in the "javancss-raw-report.xml" file (in which it sets every metric to '0', which is misleading for the Sonar Flex plugin...). The bad news is that from what I can see on FlexMetrics (and more generally FlexPMD) website, those projects seem to be inactive and I'm afraid we won't get a fix for this
Hide
Permalink
Evgeny Mandrikov added a comment - 05/Jun/12 7:44 AM

This bug is vanished because we don't use FlexMetrics anymore - SONARPLUGINS-1906.

I've tested this concrete example and for URI.as we now report around 1000 lines of code.

Show
Evgeny Mandrikov added a comment - 05/Jun/12 7:44 AM This bug is vanished because we don't use FlexMetrics anymore - SONARPLUGINS-1906 . I've tested this concrete example and for URI.as we now report around 1000 lines of code.
Hide
Permalink
Fabrice Bellingard added a comment - 07/Jun/12 11:23 AM

Manually tested

Show
Fabrice Bellingard added a comment - 07/Jun/12 11:23 AM Manually tested
Hide
Permalink
Evgeny Mandrikov added a comment - 08/Jun/12 2:50 AM

Integration test updated.

Show
Evgeny Mandrikov added a comment - 08/Jun/12 2:50 AM Integration test updated.

People

  • Assignee:
    Evgeny Mandrikov
    Reporter:
    Josh Figler
Vote (7)
Watch (2)

Dates

  • Created:
    29/Nov/11 1:45 PM
    Updated:
    08/Jun/12 2:50 AM
    Resolved:
    05/Jun/12 7:44 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.