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

"if" without an "else" triggers "Nothing to parse" warning #222

Closed
mpaluchowski opened this issue Dec 6, 2016 · 3 comments
Closed

"if" without an "else" triggers "Nothing to parse" warning #222

mpaluchowski opened this issue Dec 6, 2016 · 3 comments

Comments

@mpaluchowski
Copy link
Contributor

The following code will cause CFLint to produce a "Nothing to parse" warning:

component {
    public void function foo() {
        if (something) {
            doSomething();
        }
    }
}

while the following code will not:

component {
    public void function foo() {
        if (something) {
            doSomething();
        } else {
            doSomethingElse();
        }
    }
}

The warnings multiply, so if a component has 5 instances of an if clause without an else, it'll trigger 5 "Nothing to parse" warnings.

ryaneberly added a commit that referenced this issue Dec 10, 2016
add tests.
@ryaneberly
Copy link
Contributor

@mpaluchowski , Thanks. I cannot duplicate this issue with the latest code, but I don't think the PARSE_NOTHING is a useful warning regardless. I disabled it (dev branch)

@mpaluchowski
Copy link
Contributor Author

@denuno's a303ef4 commit to dev seems to have fixed it. I was just waiting for it to merge to main.

@ryaneberly
Copy link
Contributor

ryaneberly commented Dec 10, 2016 via email

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

No branches or pull requests

2 participants