{"action":"created","issue":{"url":"https://api.github.com/repos/danmar/cppcheck/issues/691","labels_url":"https://api.github.com/repos/danmar/cppcheck/issues/691/labels{/name}","comments_url":"https://api.github.com/repos/danmar/cppcheck/issues/691/comments","events_url":"https://api.github.com/repos/danmar/cppcheck/issues/691/events","html_url":"https://github.com/danmar/cppcheck/pull/691","id":108600240,"number":691,"title":"Add a dynamic rule enable/disable system","user":{"login":"bufferoverflow","id":378909,"avatar_url":"https://avatars.githubusercontent.com/u/378909?v=3","gravatar_id":"","url":"https://api.github.com/users/bufferoverflow","html_url":"https://github.com/bufferoverflow","followers_url":"https://api.github.com/users/bufferoverflow/followers","following_url":"https://api.github.com/users/bufferoverflow/following{/other_user}","gists_url":"https://api.github.com/users/bufferoverflow/gists{/gist_id}","starred_url":"https://api.github.com/users/bufferoverflow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bufferoverflow/subscriptions","organizations_url":"https://api.github.com/users/bufferoverflow/orgs","repos_url":"https://api.github.com/users/bufferoverflow/repos","events_url":"https://api.github.com/users/bufferoverflow/events{/privacy}","received_events_url":"https://api.github.com/users/bufferoverflow/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":28,"created_at":"2015-09-28T07:09:09Z","updated_at":"2015-11-16T10:20:25Z","closed_at":"2015-11-05T15:41:42Z","pull_request":{"url":"https://api.github.com/repos/danmar/cppcheck/pulls/691","html_url":"https://github.com/danmar/cppcheck/pull/691","diff_url":"https://github.com/danmar/cppcheck/pull/691.diff","patch_url":"https://github.com/danmar/cppcheck/pull/691.patch"},"body":"First, each rule now has a \"state\" attribute:\r\n\r\n<rule>\r\n\t<state>enabled</state> => rule is enabled\r\n\t...\r\n</rule>\r\n\r\n<rule>\r\n\t<state>disabled</state> => rule is disabled.\r\n\t...\r\n</rule>\r\n\r\nSecond, each rule has a list of IDs of rules to\r\ndisable and a list of rules to enable if fired:\r\n\r\n<rule>\r\n\t...\r\n\t<disable>thatrule</disable>\r\n\t<enable>thisrule</enable>\r\n</rule>\r\n\r\n<rule>\r\n\t<state>disabled</state>\r\n\t<message>\r\n\t\t<id>thisrule</id>\r\n\t...\r\n\r\n<rule>\r\n\t<message>\r\n\t\t<id>thatrule</id>\r\n\t...\r\n</rule>\r\n\r\nInitially, the first and third rule are enabled. When\r\nthe first rule gets fired, then the third rule becomes\r\ndisabled and the second rule becomes enabled.\r\n\r\nNote that the behavior of this system is undefined when\r\nthe rule to be enabled or disabled should fire on the same\r\nsource fragment which fired the controlling rule."},"comment":{"url":"https://api.github.com/repos/danmar/cppcheck/issues/comments/156979589","html_url":"https://github.com/danmar/cppcheck/pull/691#issuecomment-156979589","issue_url":"https://api.github.com/repos/danmar/cppcheck/issues/691","id":156979589,"user":{"login":"3adev","id":9527421,"avatar_url":"https://avatars.githubusercontent.com/u/9527421?v=3","gravatar_id":"","url":"https://api.github.com/users/3adev","html_url":"https://github.com/3adev","followers_url":"https://api.github.com/users/3adev/followers","following_url":"https://api.github.com/users/3adev/following{/other_user}","gists_url":"https://api.github.com/users/3adev/gists{/gist_id}","starred_url":"https://api.github.com/users/3adev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3adev/subscriptions","organizations_url":"https://api.github.com/users/3adev/orgs","repos_url":"https://api.github.com/users/3adev/repos","events_url":"https://api.github.com/users/3adev/events{/privacy}","received_events_url":"https://api.github.com/users/3adev/received_events","type":"User","site_admin":false},"created_at":"2015-11-16T10:20:25Z","updated_at":"2015-11-16T10:20:25Z","body":"Turns out that putting a .py checker elsewhere than in addons/ results in 'import cppcheckdata' failing, therefore I have to keep y2038.py directly under addons.\r\n\r\nI could have left the rest of the proposed tree unchanged, but now there would be both the `addons/y2038/` directory and the `addons/y2038.py` checker, and I'm not a big fan of having a directory and file sharing the same base path.\r\n\r\nSo I suggest moving all documentation under `doc/addons/`.\r\n\r\nI would be fine with `addons/doc/` instead of `docs/addons/`, but `docs/addons/` has the advantage of offering `docs/` as a location for general CPPcheck documentation (other than generated from code) such as tutorials or user guide.\r\n\r\nSo, here is the new proposal, with modifications in **bold** wrt the previous one:\r\n\r\n**addons/y2038.py**\r\n**doc/addons**/y2038/README\r\n**doc/addons**/y2038/examples/\r\n**doc/addons**/y2038/examples/y2038testfile1.c\r\n**doc/addons**/y2038/examples/y2038testfile2.h\r\n\r\n@danmar -- your opinion?"}}