-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache #124
Cache #124
Conversation
@@ -74,6 +79,7 @@ public struct Config: Codable { | |||
viewAsDeviceRule = try container.decodeIfPresent(Optional<ViewAsDeviceConfig>.self, forKey: .viewAsDeviceRule) ?? nil | |||
reporter = try container.decodeIfPresent(String.self, forKey: .reporter) ?? "xcode" | |||
disableWhileBuildingForIB = try container.decodeIfPresent(Bool.self, forKey: .disableWhileBuildingForIB) ?? true | |||
ignoreCache = try container.decodeIfPresent(Bool.self, forKey: .ignoreCache) ?? false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about default value? Should we enable cache by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes enabled by default is the good choice if there is no way to forgot some issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand you use the modification date to re-check files
Is there is also a total re-check if iblinter version change? because of new rules added by iblinter
@phimage Your understanding is almost correct. As you said, we should re-check if IBLinter version changed.
If the top two are changed, IBLinter ignore existing cache files and re-check all files again. |
@phimage Thank you for reviewing 🦄 |
IBLinter checks whole files every time but there are many unnecessary processes when most of them are not changed.
This PR adds lint cache for each IB file.
In my project, IBLinter took 7 sec every time but this change reduced it to 2 sec when there is cache.