{"action":"created","issue":{"url":"https://api.github.com/repos/goktugyil/EZSwiftExtensions/issues/107","repository_url":"https://api.github.com/repos/goktugyil/EZSwiftExtensions","labels_url":"https://api.github.com/repos/goktugyil/EZSwiftExtensions/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/goktugyil/EZSwiftExtensions/issues/107/comments","events_url":"https://api.github.com/repos/goktugyil/EZSwiftExtensions/issues/107/events","html_url":"https://github.com/goktugyil/EZSwiftExtensions/pull/107","id":144183987,"number":107,"title":"Style fixes","user":{"login":"inket","id":679224,"avatar_url":"https://avatars.githubusercontent.com/u/679224?v=3","gravatar_id":"","url":"https://api.github.com/users/inket","html_url":"https://github.com/inket","followers_url":"https://api.github.com/users/inket/followers","following_url":"https://api.github.com/users/inket/following{/other_user}","gists_url":"https://api.github.com/users/inket/gists{/gist_id}","starred_url":"https://api.github.com/users/inket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inket/subscriptions","organizations_url":"https://api.github.com/users/inket/orgs","repos_url":"https://api.github.com/users/inket/repos","events_url":"https://api.github.com/users/inket/events{/privacy}","received_events_url":"https://api.github.com/users/inket/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-03-29T07:40:31Z","updated_at":"2016-04-07T01:12:29Z","closed_at":"2016-04-06T14:01:50Z","pull_request":{"url":"https://api.github.com/repos/goktugyil/EZSwiftExtensions/pulls/107","html_url":"https://github.com/goktugyil/EZSwiftExtensions/pull/107","diff_url":"https://github.com/goktugyil/EZSwiftExtensions/pull/107.diff","patch_url":"https://github.com/goktugyil/EZSwiftExtensions/pull/107.patch"},"body":"Major (breaking) changes:\r\n- Added [SwiftLint](https://github.com/realm/SwiftLint)\r\n- Removed the force-casting and force-unwrapping, which means some method signatures had to change:\r\n  - `Dictionary.random() -> NSObject` is now `Dictionary.random() -> Value`\r\n  - `ez.appDisplayName() -> String` is now `ez.appDisplayName() -> String?`\r\n  - `ez.appVersion() -> String` is now `ez.appVersion() -> String?`\r\n  - `ez.appBuild() -> String` is now `ez.appBuild() -> String?`\r\n  - `BlockButton.init(coder...)` is now `BlockButton.init?(coder...)`\r\n  - `BlockWebView.init(coder...)` is now `BlockWebView.init?(coder...)`\r\n  - `UIDevice.idForVendor() -> String` is now `UIDevice.idForVendor() -> String?`\r\n  - `UIImage.compressImage(rate: ...) -> NSData` is now `UIImage.compressImage(rate: ...) -> NSData?`\r\n\r\nMy reasoning behind removing force-casting and force-unwrapping is that:\r\n- It's just a matter of time before any of those start crashing. Optionals are optionals for a reason, and we shouldn't ignore the case where they may not meet our expectations.\r\n- It lays the responsibility on EZSwiftExtensions for crashes caused by that. It's better to leave that responsibility to the user.\r\n\r\nIf this looks alright for you and you would like to merge it, inform me so I can also update the readme and documentation as necessary."},"comment":{"url":"https://api.github.com/repos/goktugyil/EZSwiftExtensions/issues/comments/206641497","html_url":"https://github.com/goktugyil/EZSwiftExtensions/pull/107#issuecomment-206641497","issue_url":"https://api.github.com/repos/goktugyil/EZSwiftExtensions/issues/107","id":206641497,"user":{"login":"inket","id":679224,"avatar_url":"https://avatars.githubusercontent.com/u/679224?v=3","gravatar_id":"","url":"https://api.github.com/users/inket","html_url":"https://github.com/inket","followers_url":"https://api.github.com/users/inket/followers","following_url":"https://api.github.com/users/inket/following{/other_user}","gists_url":"https://api.github.com/users/inket/gists{/gist_id}","starred_url":"https://api.github.com/users/inket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inket/subscriptions","organizations_url":"https://api.github.com/users/inket/orgs","repos_url":"https://api.github.com/users/inket/repos","events_url":"https://api.github.com/users/inket/events{/privacy}","received_events_url":"https://api.github.com/users/inket/received_events","type":"User","site_admin":false},"created_at":"2016-04-07T01:12:29Z","updated_at":"2016-04-07T01:12:29Z","body":"> Don't you think its better to add SwittLint to the example project and not the framework itsself?\r\n\r\nBut then you would have to build the example project for SwiftLint to trigger, which some people might not do. With the current settings it also checks the example project's code, but it's only triggered by building the framework (which the example project also does iirc)\r\n\r\n> Why did you edit the appdelegate to conform to Lint while its not active in the example project?\r\n\r\nLint warning because the comments were too long. Like I said, SwiftLint checks the example project's code too, even when only building the framework.\r\n\r\n> Why were a part of this class got indented and the other part did not? Was the indentation a mistake?\r\n\r\nOops. When I looked through the file with Sublime Text (with invisible characters visible) I saw that it was partly indented with tabs (and not spaces like the rest of the project). I must have messed up when searching & replacing the tabs with spaces.\r\n\r\n> The random whitespace changes are really making it hard to read the real changes. Definitely should've been another commit\r\n\r\nAnd they mostly were. 😜\r\n\r\nThanks for merging."}}