{"action":"created","issue":{"url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/5646","repository_url":"https://api.github.com/repos/CocoaPods/CocoaPods","labels_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/5646/labels{/name}","comments_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/5646/comments","events_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/5646/events","html_url":"https://github.com/CocoaPods/CocoaPods/issues/5646","id":166616382,"number":5646,"title":"🌈 pod spec lint gives incorrect warning","user":{"login":"asib","id":8368500,"avatar_url":"https://avatars.githubusercontent.com/u/8368500?v=3","gravatar_id":"","url":"https://api.github.com/users/asib","html_url":"https://github.com/asib","followers_url":"https://api.github.com/users/asib/followers","following_url":"https://api.github.com/users/asib/following{/other_user}","gists_url":"https://api.github.com/users/asib/gists{/gist_id}","starred_url":"https://api.github.com/users/asib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asib/subscriptions","organizations_url":"https://api.github.com/users/asib/orgs","repos_url":"https://api.github.com/users/asib/repos","events_url":"https://api.github.com/users/asib/events{/privacy}","received_events_url":"https://api.github.com/users/asib/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-20T15:51:54Z","updated_at":"2016-07-20T16:02:18Z","closed_at":null,"body":"* [x] I've read and understood the [*CONTRIBUTING guidelines and have done my best effort to follow](https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md).\r\n\r\n# Report\r\n\r\n## What did you do?\r\n\r\nI ran `pod spec lint` on my [project](https://github.com/asib/CPJSONRPC).\r\n\r\n## What did you expect to happen?\r\n\r\nExpected the linter to validate my podspec.\r\n\r\n## What happened instead?\r\n\r\nThe spec did not pass validation, due to 1 warning:\r\n\r\n`- WARN  | xcodebuild:  CPJSONRPC/CPJSONRPC/Classes/Public/CPJSONRPCResponse.m:72:23: warning: unused variable 'rpcErr' [-Wunused-variable]`\r\n\r\nThe thing is, I'm certain this variable is used for these reasons:\r\n\r\n* Line 73 (the line below the declaration of `rpcErr`) is the following:\r\n\r\n```[resp setObject:rpcErr forKey:JSON_RPC_ERROR_KEY];```\r\n\r\n* I built the project myself and Xcode did not flag an `unused variable` warning.\r\n* I even added an unused variable on line 74 (`NSError *bla;`) to be sure that Xcode was actually flagging unused variables as it's supposed to. Indeed, on building, Xcode flagged `bla` as an unused variable.\r\n\r\nI should mention that the warning was initially correct (`rpcErr` was unused). I corrected the problem, recreated the tag, pushed to remote, etc., then ran `pod spec lint` again and the warning persisted. After trying little things here and there, which didn't work, I decided to create this issue.\r\n\r\n## CocoaPods Environment\r\n\r\n\r\n### Stack\r\n\r\n```\r\n   CocoaPods : 1.0.1\r\n        Ruby : ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin13]\r\n    RubyGems : 2.5.1\r\n        Host : Mac OS X 10.11.5 (15F34)\r\n       Xcode : 7.3.1 (7D1014)\r\n         Git : git version 2.7.4 (Apple Git-66)\r\nRuby lib dir : /usr/local/Cellar/ruby/2.3.0/lib\r\nRepositories : master - https://github.com/CocoaPods/Specs.git @ 8bacc4a67fc400bca536360fb5283893027e1ddf\r\n```\r\n\r\n### Installation Source\r\n\r\n```\r\nExecutable Path: /usr/local/bin/pod\r\n```\r\n\r\n### Plugins\r\n\r\n```\r\ncocoapods-deintegrate : 1.0.0\r\ncocoapods-plugins     : 1.0.0\r\ncocoapods-search      : 1.0.0\r\ncocoapods-stats       : 1.0.0\r\ncocoapods-trunk       : 1.0.0\r\ncocoapods-try         : 1.1.0\r\n```\r\n\r\n\r\n\r\n## Project that demonstrates the issue\r\n\r\n[This](https://github.com/asib/CPJSONRPC) is the project that is giving me the problem.\r\n"},"comment":{"url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/comments/233996167","html_url":"https://github.com/CocoaPods/CocoaPods/issues/5646#issuecomment-233996167","issue_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/5646","id":233996167,"user":{"login":"orta","id":49038,"avatar_url":"https://avatars.githubusercontent.com/u/49038?v=3","gravatar_id":"","url":"https://api.github.com/users/orta","html_url":"https://github.com/orta","followers_url":"https://api.github.com/users/orta/followers","following_url":"https://api.github.com/users/orta/following{/other_user}","gists_url":"https://api.github.com/users/orta/gists{/gist_id}","starred_url":"https://api.github.com/users/orta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orta/subscriptions","organizations_url":"https://api.github.com/users/orta/orgs","repos_url":"https://api.github.com/users/orta/repos","events_url":"https://api.github.com/users/orta/events{/privacy}","received_events_url":"https://api.github.com/users/orta/received_events","type":"User","site_admin":false},"created_at":"2016-07-20T16:02:17Z","updated_at":"2016-07-20T16:02:17Z","body":"> I should mention that the warning was initially correct (rpcErr was unused). I corrected the problem, recreated the tag, pushed to remote, etc., then ran pod spec lint again and the warning persisted. After trying little things here and there, which didn't work, I decided to create this issue.\r\n\r\n\r\nSounds like you're hitting a caching problem, try [running](https://guides.cocoapods.org/terminal/commands.html#pod_cache_clean) `pod cache clean`, to see if that updates you to the latest version of that tag."}}
{"actor":{"display_login":"orta"}}