{"action":"created","issue":{"url":"https://api.github.com/repos/insidegui/WWDC/issues/344","repository_url":"https://api.github.com/repos/insidegui/WWDC","labels_url":"https://api.github.com/repos/insidegui/WWDC/issues/344/labels{/name}","comments_url":"https://api.github.com/repos/insidegui/WWDC/issues/344/comments","events_url":"https://api.github.com/repos/insidegui/WWDC/issues/344/events","html_url":"https://github.com/insidegui/WWDC/pull/344","id":303662167,"number":344,"title":"Address all warnings except cyclomatic complexity","user":{"login":"allenhumphreys","id":8225090,"avatar_url":"https://avatars1.githubusercontent.com/u/8225090?v=4","gravatar_id":"","url":"https://api.github.com/users/allenhumphreys","html_url":"https://github.com/allenhumphreys","followers_url":"https://api.github.com/users/allenhumphreys/followers","following_url":"https://api.github.com/users/allenhumphreys/following{/other_user}","gists_url":"https://api.github.com/users/allenhumphreys/gists{/gist_id}","starred_url":"https://api.github.com/users/allenhumphreys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allenhumphreys/subscriptions","organizations_url":"https://api.github.com/users/allenhumphreys/orgs","repos_url":"https://api.github.com/users/allenhumphreys/repos","events_url":"https://api.github.com/users/allenhumphreys/events{/privacy}","received_events_url":"https://api.github.com/users/allenhumphreys/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-08T22:53:02Z","updated_at":"2018-03-09T02:04:47Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/insidegui/WWDC/pulls/344","html_url":"https://github.com/insidegui/WWDC/pull/344","diff_url":"https://github.com/insidegui/WWDC/pull/344.diff","patch_url":"https://github.com/insidegui/WWDC/pull/344.patch"},"body":"I added another `.swiftlint.yml` to the `PlayerUI` directory which disables 2 rules: cyclomatic_complexity, block_based_kvo. I did this because the player part of the app is quite complicated and it could take a considerable amount of time to safely refactor the affected parts.\r\n\r\nI addressed the outstanding warnings for discarded Notification Center observers through a combination of explicitly ignoring the token in the case of singletons, using RxSwift to manage the lifetime, and using the object based tokens to manage the life time. I was unsure whether we wanted some classes to have a dependency on RxSwift just to manage notification lifetimes.\r\n\r\nI address the KVO warnings, but I'm not sure I really like the result, thoughts?\r\n\r\nI disabled the force_cast and force_try rules for certain issues. A different option would be to create a `castOrFatalError` helper function similar to the `tryOrXCTFail` function I created for silencing the warnings in the tests. "},"comment":{"url":"https://api.github.com/repos/insidegui/WWDC/issues/comments/371689258","html_url":"https://github.com/insidegui/WWDC/pull/344#issuecomment-371689258","issue_url":"https://api.github.com/repos/insidegui/WWDC/issues/344","id":371689258,"user":{"login":"allenhumphreys","id":8225090,"avatar_url":"https://avatars1.githubusercontent.com/u/8225090?v=4","gravatar_id":"","url":"https://api.github.com/users/allenhumphreys","html_url":"https://github.com/allenhumphreys","followers_url":"https://api.github.com/users/allenhumphreys/followers","following_url":"https://api.github.com/users/allenhumphreys/following{/other_user}","gists_url":"https://api.github.com/users/allenhumphreys/gists{/gist_id}","starred_url":"https://api.github.com/users/allenhumphreys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allenhumphreys/subscriptions","organizations_url":"https://api.github.com/users/allenhumphreys/orgs","repos_url":"https://api.github.com/users/allenhumphreys/repos","events_url":"https://api.github.com/users/allenhumphreys/events{/privacy}","received_events_url":"https://api.github.com/users/allenhumphreys/received_events","type":"User","site_admin":false},"created_at":"2018-03-09T02:04:47Z","updated_at":"2018-03-09T02:04:47Z","author_association":"COLLABORATOR","body":"@insidegui These changes were relatively minor, especially because I just ignored some of them 🤫. \r\n\r\nAddressing the cyclomatic complexity warnings might take a bit longer.... At least one of them I think should be ignored because it seems to be counting guards inside of blocks as part of the execution paths of a function, see `downloadStatusObservable`."}}
{"actor":{"display_login":"allenhumphreys"}}