Closed calda closed 4 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 95.14%. Comparing base (
f487996
) to head (91bf6e3
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR improves attribute handling in the
opaqueGenericParameters
rule.To fix #1684, https://github.com/nicklockwood/SwiftFormat/commit/383fd4813c7fb45e4e996242b6c7c919133f5dc1 made it so the
opaqueGenericParameters
was disabled for all functions with attributes. However, in most cases attributes don't cause any issues. For example:This PR tweaks the existing fix to check the tokens of the attributes, and whether or not they reference any of the generic arguments. #1684 remains fixed, and the above examples are now updated as expected: