{"action":"opened","issue":{"url":"https://api.github.com/repos/drmikehenry/vim-headerguard/issues/2","labels_url":"https://api.github.com/repos/drmikehenry/vim-headerguard/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/drmikehenry/vim-headerguard/issues/2/comments","events_url":"https://api.github.com/repos/drmikehenry/vim-headerguard/issues/2/events","html_url":"https://github.com/drmikehenry/vim-headerguard/issues/2","id":106118270,"number":2,"title":"Not compliant with 'Google C++ Style Guide'","user":{"login":"trygveu","id":763061,"avatar_url":"https://avatars.githubusercontent.com/u/763061?v=3","gravatar_id":"","url":"https://api.github.com/users/trygveu","html_url":"https://github.com/trygveu","followers_url":"https://api.github.com/users/trygveu/followers","following_url":"https://api.github.com/users/trygveu/following{/other_user}","gists_url":"https://api.github.com/users/trygveu/gists{/gist_id}","starred_url":"https://api.github.com/users/trygveu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trygveu/subscriptions","organizations_url":"https://api.github.com/users/trygveu/orgs","repos_url":"https://api.github.com/users/trygveu/repos","events_url":"https://api.github.com/users/trygveu/events{/privacy}","received_events_url":"https://api.github.com/users/trygveu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-12T01:08:57Z","updated_at":"2015-09-12T01:08:57Z","closed_at":null,"body":"First off, thank you for a very nice solution to the header guards! It is greatly appreciated.\r\n\r\nThe [Google C++ Style guide](http://google.github.io/styleguide/cppguide.html#The__define_Guard) has a point that the include guard should be based off the full project path of the file, to reduce the chance of name collision. This does result in very long include guards, which many probably wont like, others might. It's part of the default check for [cpplint.py](https://github.com/google/styleguide/tree/gh-pages/cpplint), which leads me to seeking compliance.\r\n\r\nTo do this, Vim needs to be aware of the project structure to find the root. I don't know what would be the best way to do this. Some ideas are: \r\n- look for the .git file\r\n- check CMakeLists for the project name\r\n\r\nIt's a too big task to do this for all build systems, but maybe we could do it for git repositories?\r\nWhat do you think? How would you solve it, and do you consider it worth the effort?"}}