Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rule to check for writeDump in cfset tags and script blocks #89

Merged
merged 5 commits into from
Oct 11, 2015

Conversation

justinmclean
Copy link
Contributor

No description provided.

@justinmclean
Copy link
Contributor Author

100% code coverage in unit tests

@justinmclean justinmclean changed the title rule to check for writeDump in cfset tags and script blocks Rule to check for writeDump in cfset tags and script blocks Oct 11, 2015
@ryaneberly
Copy link
Contributor

I think the expression inside cfset gets parsed. As a CFScriptExpression?. Not sure. If not it probably should be.

@justinmclean
Copy link
Contributor Author

Sadly it doesn't get parsed as a CFScriptExpression. If you comment out that method the test testWriteDumpInTag fails.

justinmclean added a commit that referenced this pull request Oct 11, 2015
Rule to check for writeDump in cfset tags and script blocks
@justinmclean justinmclean merged commit 28cee79 into dev Oct 11, 2015
@justinmclean justinmclean deleted the writeDump branch October 11, 2015 12:36
ryaneberly added a commit that referenced this pull request Oct 11, 2015
@ryaneberly
Copy link
Contributor

@justinmclean
take a look at 2337b8f

I had to dig a little big to remember how this all worked. Not processing sounded like a missing feature, but it is there.

You are correct that
public void expression(final CFScriptStatement expression, final Context context, final BugList bugs)
does not get called for

but

public void expression(final CFExpression expression, final Context context,
final BugList bugs)

gets called for all expressions regardless of whether its from , or even nested inside another expression!

So. the rule becomes quite simple. No substringing required.

@justinmclean
Copy link
Contributor Author

Great I'll fix - may need to fix a few other rules as well, but that's what's the tests are for :-)

@ryaneberly
Copy link
Contributor

right :-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants