Skip to content

Doesn't add squigly brackets when needed #1

@jfriedly

Description

@jfriedly

For and while loops (and if statements) can have the squigly brackets omitted if they only have a single statement inside. If that statement is a printf statement, the fprintf statement will be added directly below it as it should, but no squigly brackets will be inserted so the fprintf would only execute once (or would always execute in an if statement).

EXAMPLE:
for(i=0;i<10;i++) printf("Hey!");

YIELDS:
for(i=0;i<10;i++) printf("Hey!");
fprintf(outfile, "Hey!);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions