SwiftSafeURL: Compile-Time-Checked URLs
Tool for avoiding using the
URL(string:)
initializer with optional result, instead introducing a compile time URL validity check. Note, this does not check for website availability, but if the URL is formatted correctly.[…]
If a file contains the comment
// safeurl:warn
, invalidURL
s in this file will be compiled and will show a warning instead of an error.
It’s cool how straightforward it is these days to write little plug-ins that leverage and extend the compiler.
See also: JP Simard.
Previously: