swift-syntax icon indicating copy to clipboard operation
swift-syntax copied to clipboard

Re-enable three swift-format rules.

Open allevato opened this issue 1 year ago • 3 comments

This PR re-enables the following three rules, with the associated fixes:

  • UseSynthesizedInitializer
  • ~NoBlockComments~ removed during PR discussion
  • UseLetInEveryBoundCaseVariable

allevato avatar Oct 02 '24 18:10 allevato

  • NoBlockComments: I highlighted the cases where I think that block comments are actually the right choice. I’m mildly leaning towards keeping that rule off. Pretty impartial to migrating the block comments that I didn’t comment on to line comments.

After making the actual changes, I tend to agree for these cases. I've dropped that commit from the PR.

I think it reveals a potential improvement to the NoBlockComments rule: it could be refined to diagnose multiline block comments and block comments that are entirely on their own line, but not small inline comments between other tokens.

allevato avatar Oct 03 '24 13:10 allevato

@swift-ci Please test

ahoppen avatar Oct 03 '24 21:10 ahoppen

@swift-ci please test macOS platform

allevato avatar Oct 04 '24 11:10 allevato