snazzy-d/sdc

sdfmt: `sdfmt off` directive leads to wrong formatting (instead of disabling it)

kinke opened this issue · 1 comments

kinke commented

This works fine and is appropriately formatted already (sdfmt doesn't change anything):

Job repl = {
    artifactPaths: (Platform platform) {
        return null;
    },
};

Now when trying to disable formatting for that declaration, sdfmt (9325f6b) formats it wrongly:

// sdfmt off
Job repl = {
    artifactPaths: (Platform platform) {
        return null;
    },
};
// sdfmt on

=>

// sdfmt off
Job repl = {
    artifactPaths: (Platform platform) {
        return null;
},
};
// sdfmt on

This has been fixed for a while. Sorry for leaving the issue open.