agens-no / AGGeometryKit

Quadrilaterals on CALayer, CGGeometry-functions, UIView/CALayer properties and other invaluable tools.
Other
1.27k stars 130 forks source link

Fix warnings and static analyzer issues. #53

Closed skagedal closed 6 years ago

skagedal commented 6 years ago

When integrating the framework as a CocoaPod, warnings and issues from static analyzer shows as part of my build (with my project settings), so it's nice if issues can be silenced, even if they do not reflect any real issues.

Regarding the last nil-check issue, that was the simplest fix (i.e. with the least potential for any unexpected side-effects) I could find. If that self[index] call returns nil, we'll be in big trouble in either case, so may just as well have an NSAssert there.

hfossli commented 6 years ago

Thanks for taking the time to make this! Really appreciated!

I thought Cocoapods didn't care about changes in xcodeproj files. Carthage will, but cocoapods only cares about the podspec file and associated files/settings. Am I right? Are you getting the results you need on your end?

skagedal commented 6 years ago

Oh, quite right! That first commit that changes the project file was mostly to confirm that these warnings would appear when upgrading settings, and disappear after the fixes. If you want to, I can remove it from the PR. But on the other hand maybe it doesn't hurt?

hfossli commented 6 years ago

Awesome! I guess I also thought there would be more to fix! I'm on my phone now – I'll merge and release later. Thanks a lot

hfossli commented 6 years ago

Hey! Thanks a lot. This was great. I think you scratched an itch for many devs now. Really appreciated. Trying to publish this as version 1.2.8 now. Will be live asap (I need to install tv-os simulator first).

hfossli commented 6 years ago

Published 🎉

skagedal commented 6 years ago

Thanks a lot!

The fixes came through as expected, but unfortunately I now get a couple of other static analysis warnings of a similar kind. Maybe they were shadowed by the other ones. Sorry, I could probably have exercised this a bit more. If you want to, I can submit a new PR, and then try a bit more to make sure that it really closes things.

hfossli commented 6 years ago

The door is always open for PRs!! ❤️

I will be more responsive now 👍