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

Flex grammar is incorrect

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

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

Description

Incorrect things that are allowed:

  • minus ("-") in variable names

Correct things that are not allowed:

  • empty xml tag "<></>"
  • xml binding on the xml tag name "<{name}/>"
  • xml binding on an xml attribute "<test {name}='something'/>"
  • switch statement requires default case to be last but should be allowed at any position
  • use namespace directive should be allowed in any statement
  • imports and includes should be allowed in any block
  • imports/use namespace/includes are not required to have semicolons at the end (or any other statement)

Fix is in this pull request: https://github.com/SonarCommunity/sonar-flex/pull/1

Issue Links

is related to

Bug - A problem which impairs or prevents the functions of the product. SONARPLUGINS-2195 Grammar: incorrect AST for expression statement "b = a- 1" (no space between identifier and minus)

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

Bug - A problem which impairs or prevents the functions of the product. SONARPLUGINS-2244 Grammar: switch statement requires default case to be last but should be allowed at any position

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

Bug - A problem which impairs or prevents the functions of the product. SONARPLUGINS-2246 Grammar: xml binding should be allowed for tag name and for attribute

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

Bug - A problem which impairs or prevents the functions of the product. SONARPLUGINS-2270 Grammar: semicolon can be omitted at the end of import/use namespace/include as for any other statement

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

Bug - A problem which impairs or prevents the functions of the product. SONARPLUGINS-2271 Grammar: "include" / "import" and "use namespace" directives can be used as a statement

  • 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
Evgeny Mandrikov added a comment - 07/Sep/12 10:41 AM

Hi Jeffrey,

First of all thanks for your feedback, investigations and contribution - for sure we will do our best to integrate it into upcoming version.

Regarding issue with minus in variable name - I created separate ticket SONARPLUGINS-2195 and added comment to it, which shows that fix not trivial as proposed. And that's why we prefer small separate patches. So I'm going to split your issue and pull-request on smaller pieces and verify each change by our integration tests.

Show
Evgeny Mandrikov added a comment - 07/Sep/12 10:41 AM Hi Jeffrey, First of all thanks for your feedback, investigations and contribution - for sure we will do our best to integrate it into upcoming version. Regarding issue with minus in variable name - I created separate ticket SONARPLUGINS-2195 and added comment to it, which shows that fix not trivial as proposed. And that's why we prefer small separate patches. So I'm going to split your issue and pull-request on smaller pieces and verify each change by our integration tests.
Hide
Permalink
Jeffrey Barrus added a comment - 07/Sep/12 11:48 AM

Sorry for the large request. I'm happy to split it up into separate branches/pull requests if you would like.

Show
Jeffrey Barrus added a comment - 07/Sep/12 11:48 AM Sorry for the large request. I'm happy to split it up into separate branches/pull requests if you would like.
Hide
Permalink
Evgeny Mandrikov added a comment - 18/Sep/12 4:07 AM - edited

Hi Jeffrey,

I close this ticket, because everything except empty xml tag was fixed - see related tickets. And according to ECMAScript for XML (E4X) Specification (2nd edition, december 2005) XMLTagName can't be empty.

P.S. In future please prefer creation of a small tickets (one per problem).

Show
Evgeny Mandrikov added a comment - 18/Sep/12 4:07 AM - edited Hi Jeffrey, I close this ticket, because everything except empty xml tag was fixed - see related tickets. And according to ECMAScript for XML (E4X) Specification (2nd edition, december 2005) XMLTagName can't be empty. P.S. In future please prefer creation of a small tickets (one per problem).
Hide
Permalink
Freddy Mallet added a comment - 19/Sep/12 9:05 AM

Manually tested !

Show
Freddy Mallet added a comment - 19/Sep/12 9:05 AM Manually tested !

People

  • Assignee:
    Evgeny Mandrikov
    Reporter:
    Jeffrey Barrus
Vote (0)
Watch (3)

Dates

  • Created:
    03/Sep/12 11:44 PM
    Updated:
    19/Sep/12 11:19 AM
    Resolved:
    18/Sep/12 4:09 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.