{"action":"created","issue":{"url":"https://api.github.com/repos/JDevlieghere/dotfiles/issues/2","repository_url":"https://api.github.com/repos/JDevlieghere/dotfiles","labels_url":"https://api.github.com/repos/JDevlieghere/dotfiles/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/JDevlieghere/dotfiles/issues/2/comments","events_url":"https://api.github.com/repos/JDevlieghere/dotfiles/issues/2/events","html_url":"https://github.com/JDevlieghere/dotfiles/issues/2","id":173635682,"number":2,"title":"minor change to .ycm_extra_conf.py","user":{"login":"Litchiware","id":12581764,"avatar_url":"https://avatars3.githubusercontent.com/u/12581764?v=4","gravatar_id":"","url":"https://api.github.com/users/Litchiware","html_url":"https://github.com/Litchiware","followers_url":"https://api.github.com/users/Litchiware/followers","following_url":"https://api.github.com/users/Litchiware/following{/other_user}","gists_url":"https://api.github.com/users/Litchiware/gists{/gist_id}","starred_url":"https://api.github.com/users/Litchiware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Litchiware/subscriptions","organizations_url":"https://api.github.com/users/Litchiware/orgs","repos_url":"https://api.github.com/users/Litchiware/repos","events_url":"https://api.github.com/users/Litchiware/events{/privacy}","received_events_url":"https://api.github.com/users/Litchiware/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-28T08:21:18Z","updated_at":"2017-11-23T17:31:46Z","closed_at":"2017-11-23T17:31:46Z","author_association":"NONE","body":"Very good idea to define a function in [ycm_extra_conf.py](https://github.com/JDevlieghere/dotfiles/blob/master/.vim/.ycm_extra_conf.py#L105) to add project's include directory and its subdirectories to compilation flags. But I think the `flag` variable should be initialized to `[\"-I\" + include_path]` instead of `[]`, because we want to track headers not only in subdirectories but also in `include_path`.\n\n```\ndef FlagsForInclude(root):\n    try:\n        include_path = FindNearest(root, 'include')\n        flags = [\"-I\" + include_path] # flags = []\n        for dirroot, dirnames, filenames in os.walk(include_path):\n            for dir_path in dirnames:\n                real_path = os.path.join(dirroot, dir_path)\n                flags = flags + [\"-I\" + real_path]\n        return flags\n    except:\n        return None\n```\n"},"comment":{"url":"https://api.github.com/repos/JDevlieghere/dotfiles/issues/comments/346671914","html_url":"https://github.com/JDevlieghere/dotfiles/issues/2#issuecomment-346671914","issue_url":"https://api.github.com/repos/JDevlieghere/dotfiles/issues/2","id":346671914,"user":{"login":"JDevlieghere","id":712896,"avatar_url":"https://avatars3.githubusercontent.com/u/712896?v=4","gravatar_id":"","url":"https://api.github.com/users/JDevlieghere","html_url":"https://github.com/JDevlieghere","followers_url":"https://api.github.com/users/JDevlieghere/followers","following_url":"https://api.github.com/users/JDevlieghere/following{/other_user}","gists_url":"https://api.github.com/users/JDevlieghere/gists{/gist_id}","starred_url":"https://api.github.com/users/JDevlieghere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JDevlieghere/subscriptions","organizations_url":"https://api.github.com/users/JDevlieghere/orgs","repos_url":"https://api.github.com/users/JDevlieghere/repos","events_url":"https://api.github.com/users/JDevlieghere/events{/privacy}","received_events_url":"https://api.github.com/users/JDevlieghere/received_events","type":"User","site_admin":false},"created_at":"2017-11-23T17:31:45Z","updated_at":"2017-11-23T17:31:45Z","author_association":"OWNER","body":"Because `os.walk` returns its root too this isn't necessary and we'd just end up with two instances of the same path."}}
{"actor":{"display_login":"JDevlieghere"}}