Add more tests, fix FileExistsKraken.Message#4423
Merged
HebaruSan merged 7 commits intoAug 29, 2025
Merged
Conversation
Pull Request Test Coverage Report for Build 17334875667Details
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Coveralls's list of files with the most "missed" lines now includes:
ModuleInstallerGUIModListProblem
In KSP-CKAN/NetKAN#10713, a
FileExistsKrakenwas printed in a short form that didn't include the details of the problem:Cause
In #4398, we refactored and standardized the Kraken classes to provide
Messagethemselves, mostly in their constructors. But in the case ofFileExistsKraken, some parts of the message are not known until additional properties are populated later, so we couldn't pass the proper string toException's constructor. Instead, we passed a default of null, then overrodeMessageto return the more detailed strings ifbase.Messagewas null. UnfortunatelyException's constructor seems to setMessageto a default string so it's never actually null, and we don't fall back to the messages we really want to use.Changes
ModuleInstallerandGUI.ModList-a ExcludeFromCodeCoverageto AltCover, and many untestable classes and functions are now tagged with[ExcludeFromCodeCoverage]FileExistsKraken.Messageignoresbase.Messageand instead always returns the custom messages it's supposed to. To reflect this lack of (unused) overridability, thereasonparameter is removed from its constructor.This should keep our Coveralls number moving in the right direction while remaining accurate and restore the previous clarity of file conflict errors.