{"action":"created","issue":{"url":"https://api.github.com/repos/niosus/EasyClangComplete/issues/144","repository_url":"https://api.github.com/repos/niosus/EasyClangComplete","labels_url":"https://api.github.com/repos/niosus/EasyClangComplete/issues/144/labels{/name}","comments_url":"https://api.github.com/repos/niosus/EasyClangComplete/issues/144/comments","events_url":"https://api.github.com/repos/niosus/EasyClangComplete/issues/144/events","html_url":"https://github.com/niosus/EasyClangComplete/pull/144","id":190199389,"number":144,"title":"[WIP] Storing and generating flags per view ","user":{"login":"niosus","id":1893598,"avatar_url":"https://avatars.githubusercontent.com/u/1893598?v=3","gravatar_id":"","url":"https://api.github.com/users/niosus","html_url":"https://github.com/niosus","followers_url":"https://api.github.com/users/niosus/followers","following_url":"https://api.github.com/users/niosus/following{/other_user}","gists_url":"https://api.github.com/users/niosus/gists{/gist_id}","starred_url":"https://api.github.com/users/niosus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niosus/subscriptions","organizations_url":"https://api.github.com/users/niosus/orgs","repos_url":"https://api.github.com/users/niosus/repos","events_url":"https://api.github.com/users/niosus/events{/privacy}","received_events_url":"https://api.github.com/users/niosus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-17T23:53:43Z","updated_at":"2016-11-19T22:18:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/niosus/EasyClangComplete/pulls/144","html_url":"https://github.com/niosus/EasyClangComplete/pull/144","diff_url":"https://github.com/niosus/EasyClangComplete/pull/144.diff","patch_url":"https://github.com/niosus/EasyClangComplete/pull/144.patch"},"body":"This is a work in progress pull request. This is by far not a finished work. So far I have done:\r\n\r\n- there is a new module `flags_sources` that will allow to address the flags generation in a polymorphic way\r\n- implemented `compilation_db` flag source that handles loading flags from a compilation database\r\n- implemented `cmake_file` flag source that generates compilation database and uses `compilation_db` to parse it\r\n\r\nThere is a lot of features still missing. The implemented things are NOT run as part of the plugin, just used in unit tests for now. Eventually this will completely replace the flag manager.\r\n\r\nAll flags are generated per view with `get_flags(view_path)` method. \r\n\r\nA general idea is that we store a persistent dictionary for each possible build system that allows us to fetch  already parsed flags when we can do this. Another persistent (static) dictionary stores a found flags source file for a view path. This way we can check if the flag source has changed for a view.\r\n\r\nI am still not sure this is the best idea, but I failed to come up with something more elegant and this seems to serve the purpose.\r\n\r\nI will keep adding more stuff to this pull request in the following weeks. Feel free to comment on the current progress. "},"comment":{"url":"https://api.github.com/repos/niosus/EasyClangComplete/issues/comments/261743464","html_url":"https://github.com/niosus/EasyClangComplete/pull/144#issuecomment-261743464","issue_url":"https://api.github.com/repos/niosus/EasyClangComplete/issues/144","id":261743464,"user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars.githubusercontent.com/u/19940114?v=3","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"created_at":"2016-11-19T22:18:59Z","updated_at":"2016-11-19T22:18:59Z","body":"\n![Codacy](https://www.codacy.com/assets/images/favicon.png) Here is an overview of what got changed by this pull request:\n\n\n```diff\n\nComplexity increasing per file\n==============================\n- plugin/flags_sources/compilation_db.py  3\n- plugin/flags_sources/cmake_file.py  2\n- plugin/tools.py  1\n         \n\nComplexity decreasing per file\n==============================\n+ tests/test_cmake_file.py  -1\n         \n\nClones added\n============\n- plugin/flags_sources/compilation_db.py  1\n- tests/test_tools.py  2\n- tests/test_settings.py  2\n         \n\nClones removed\n==============\n+ tests/test_compilation_db.py  -4\n+ tests/test_unique_list.py  -1\n+ tests/test_cmake_file.py  -12\n         \n```\n\n\nSee the complete overview on [Codacy](https://www.codacy.com/app/zabugr/EasyClangComplete/pullRequest?prid=423284&bid=3919428)\n        "}}
{"actor":{"display_login":"codacy-bot"}}