Open mildm8nnered opened 1 month ago
1 Error | |
---|---|
:no_entry_sign: | Could not build branch |
1 Warning | |
---|---|
:warning: | If this is a user-facing change, please include a CHANGELOG entry to credit yourself! You can find it at CHANGELOG.md. |
Here's an example of your CHANGELOG entry:
* Add update checker.
[mildm8nnered](https://github.com/mildm8nnered)
[#issue_number](https://github.com/realm/SwiftLint/issues/issue_number)
note: There are two invisible spaces after the entry's text.
Generated by :no_entry_sign: Danger
Adds an update check facility to SwiftLint - addresses #5551
This has been added as a
--check-for-updates
command line option to theversion
,lint
, andanalyze
commands.It can also be enabled via the configuration file, as
check_for_updates
.Although the usefulness of an opt-in option is limited, at least this provides a good story for how users can keep their installs up to date. And it could easily be changed to opt-out either here or at some later date.
The update checker code is pretty closely based on Periphery's implementation, and should probably be credited in the source file.
The update check is performed after all other processing, so linting will never be delayed, and the code is completely synchronous, as we do not have to worry about blocking the main thread.
The messaging for a new version is:
A new version of SwiftLint is available: 0.51.1
We currently do not print any messaging if the update check fails, which is probably wrong.