cfeclipse / cfeclipse

cfeclipse
http://cfeclipse.org
73 stars 25 forks source link

Inaccurate parsing issues #76

Closed tvanderlois closed 1 year ago

tvanderlois commented 7 years ago

Recently upgraded to Neon.2 (4.6.2) and cfeclipse 1.5.1.201605220951 and getting lots of parsing info warnings. I realize I could simply turn these off, but they have been helpful when accurate. See image for details... yes maybe I'm old school but still prefer tags (it's just easier to read for myself and others.) cfeclipseparsingissue - Thanks

cybersonic commented 7 years ago

does it work if you do <cfif isDefined("...")> (capital D) ?

MD

On 3 January 2017 at 19:36, tvanderlois notifications@github.com wrote:

Recently upgraded to Neon.2 (4.6.2) and cfeclipse 1.5.1.201605220951 and getting lots of parsing info warnings. I realize I could simply turn these off, but they have been helpful when accurate. See image for details... yes maybe I'm old school but still prefer tags (it's just easier to read for myself and others.) [image: cfeclipseparsingissue] https://cloud.githubusercontent.com/assets/9574425/21620255/11f6e4ea-d1b9-11e6-8348-dd8bb9e1a9d9.gif

  • Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cfeclipse/cfeclipse/issues/76, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJDHBAMy-MXOtzTbku7Tm3SruWXChvVks5rOqM6gaJpZM4LZ8vj .

tvanderlois commented 7 years ago

case is irrelevant...

Another note is I have attempted to modify the cfeclipse property : CFML Language Version values from Coldfusion 9 - 11 with no luck. I noticed the cfeclipse 1.5.1 properties have significant enhancements from 1.4.6

Perhaps something with the dictionary??

cybersonic commented 7 years ago

You mean if you change the case to what I described, you still get the same error? I realise that in CFML case doesn't matter. Hence I am asking for clarification sir.

tvanderlois commented 7 years ago

changing the case gets the same error

bardware commented 7 years ago

Under Window => Preferences => CFEclipse => File parser in Eclipse, which checkboxes are set? I unchecked all, after CFLint was integrated into CFEclipse.

tvanderlois commented 7 years ago

All File Parser options checked or unchecked - same results even after restarting eclipse.

SebastianZ commented 7 years ago

The issue even occurs with this simple code:

<cfoutput>
<cfif condition>
</cfif>
</cfoutput>

Line 2 says " requires at least one attribute" and line 4 "'' does not match the current parent item: 'cfif'" (even twice).

Syntax error in CFEclipse

Sebastian

bardware commented 7 years ago

The original poster states he uses CFEclipse from May 2016; try December 2016 or January 2017

SebastianZ commented 7 years ago

The original poster states he uses CFEclipse from May 2016; try December 2016 or January 2017

Trying to install those versions I run into issue #77.

Sebastian

SebastianZ commented 7 years ago

I've tested this now on another machine using the January 2017 release (i.e. 1.5.3201701082224) and this issue is still there.

Sebastian

bardware commented 7 years ago

I'm used to write single cftransaction-tags as self closing tags <cftransaction action="commit" />

KeithETruesdell commented 7 years ago

I am getting the same thing regardless of case. Its mostly with CFIF and CFCOMPONENT and CFFUNCTION

One thing that I noticed that is "my bad" is that if the project I had wasn't a CFEclipse project, but the file was still a CFM or CFC (etc) file, this would happen. I am not saying that is 100% of the cases, but that was a mistake I have made in the past. Currently, I have projects that were started from scratch in CFEclipse as CFEclipse projects and I still get that.

In general, this is not consistent, such that ALL CFIFs in a file or a segment get the warning, while another file does not, nor is it only CFIFs. I have files where line 10 is a "valid" CFIF tag without any "problems" according to CFEclipse, but then lines 11 and 12 have almost the identical CFIF and get a "problem" (i) informational message stating the same thing that "cfif requires at least one attribute", and then line 13 and 14 will have again almost the same CFIF but NOT have the "problem" message. Along these lines, another "thing" that I noticed is that this mostly seems to happen when I don't complete the tag in one "go through". For instance.... I start typing the CFIF tag, I forget what variable I am looking for, so i click out of that CFIF tag and copy the variable I had define 100 lines further up in the code...I go back into the the CFIF tag and paste the variable name and finish typing the operand and value to test. This is mostly when / where / why the problem happens. The closing angle bracket for the CFIF is already there (but not the closing "CFIF" tag) when I click outside of the CFIF to copy-paste the variable. The really funny thing is that when I go to copy-paste that CFIF with the problem to somewhere else in the code (thinking it was a parsing at the time of typing), it will also have the "problem" message as well. This may seem very little and minuscule, but hopefully this will get someone to look in the right area for what the source of the problem is. WITH this problem existing, I can't rely on the Information, warnings, errors or CFLint in CFEclipse...making CFEclipse a glorified bracket matcher for Eclipse (sorry to say such a harsh thing, but its true...take away all that parsing and validation and such from CFEclipse and what is left?).

Again, hope this helps someone.

Superfly-fr commented 6 years ago

AOD, problem is still here. Would add some to the finding : The info message "cfif requires at least 1 attribute" remains even after the whole line where the tag was typed is removed . (and yes, still after document close/reopen, even after close + Eclipse restart + open)

capture

Subsequently, it messes up (alleged) following tag(s), in my case.

EDIT : Just checked my Eclipse install and found that the "MXUnit test runner" appeared to be a standalone install (I mean at the same level than CFEclipse in the Help/about Eclipse/installation details panel). Uninstalling it + CFeclipse then reinstalling CFEclipse from the marketplace seems to fix the problem for now. Notes :

sv-seancmw commented 5 years ago

Even following the above comment, I am still having inaccurate parsing issues. I have done the following:

The main errors I'm getting are: <cfset> requires at least one attribute for:

<cffunction name="demoAssertIsQuery">
    <cfargument name="query">

    <cfset assertIsQuery("#query#")>
</cffunction>

and Closing tag '</cfcomponent>' does not match the current parent item: 'cffunction'

when I have properly nested tags.

IMMEDIATE EDIT: By disabling and then enabling the "Report Parse Errors" checkbox, the incorrectly flagged parser errors have gone away.