This PR fixes the image resources rule which wasn't working for two reasons:
context.workDirectory was changed to be a URL in 7556943, and this stopped the rule from working as expected (humble mistake, it's tough to notice)
The rule used to check if the imageViews' assets matches either these of the image tags in the storyboard/xib, or what's in the asset catalog - however (at least with xcode 9 and 10), the image tag is always populated with all the unique values from the images used in the storyboard disregarding whether the images actually exists or not. I've changed the behavior so the content of the image tags and the imageViews' assets are unified and uniqued, and then solely checked against the content of asset catalog.
Finally, if using namespaces, the rule was always reporting that the asset didn't exist.
This PR fixes the image resources rule which wasn't working for two reasons:
context.workDirectory
was changed to be a URL in 7556943, and this stopped the rule from working as expected (humble mistake, it's tough to notice)imageViews
' assets matches either these of theimage
tags in the storyboard/xib, or what's in the asset catalog - however (at least with xcode 9 and 10), the image tag is always populated with all the unique values from the images used in the storyboard disregarding whether the images actually exists or not. I've changed the behavior so the content of theimage
tags and theimageView
s' assets are unified and uniqued, and then solely checked against the content of asset catalog.Finally, if using namespaces, the rule was always reporting that the asset didn't exist.
This PR also update the related tests.