Closed CraigsOverItAll closed 2 years ago
I think the config file is working and that the --selfrequired is being honoured as removing print from the list of methods triggers a warning on line 15 as well.
Yep, it looks like the issue is that --selfrequired isn't applied inside string interpolation.
Thanks @nicklockwood — can confirm it's working for our use cases. 😁
@CraigsOverItAll fix landed in 0.49.3
I think this is a bug (or I'm holding it wrong 😉 ) — Interpolated string parameters with
self
have self removed even with the method names being listed via--selfrequired
option.I hit this while moving to Logger which takes interpolated strings as an
autoclosure
. After excludingprint
and all of the Logger convenience methods via the.swiftformat
config file (below) the problem still exists..swiftformat config file
Source file:
main.swift
Output
I think the config file is working and that the
--selfrequired
is being honoured as removingprint
from the list of methods triggers a warning on line 15 as well.