)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"3e6fb764db15e61f53e69a3276fd2e68f4116345","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add a hacking rule for string interpolation at logging"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"String interpolation should be delayed to be handled"},{"line_number":10,"context_line":"by the logging code, rather than being done"},{"line_number":11,"context_line":"at the point of the logging call."},{"line_number":12,"context_line":"So add the following hacking rule for it."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"- [N353] String interpolation should be delayed at logging calls."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"3a98d1f4_6b4c86c8","line":11,"range":{"start_line":9,"start_character":0,"end_line":11,"end_character":33},"updated":"2016-10-01 05:53:44.000000000","message":"Here.","commit_id":"aaa99599699d78956fd3b35dbddf436eabce3a35"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"9c6a57a90d424dc3c8ffc5bed58dec6576e0e77c","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"See the oslo i18n guideline."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"* http://docs.openstack.org/developer/oslo.i18n/guidelines.html"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: Ief6d3ee3539c0857098fffdb7acfeec3e0fed6eb"},{"line_number":21,"context_line":"Closes-Bug: #1596829"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"5a8bc5a2_8b196c25","line":18,"updated":"2016-09-27 23:51:19.000000000","message":"It is better to put\n\n * http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-log-messages\n\nor\n\n String interpolation should be delayed to be handled\n by the logging code, rather than being done at the point\n of the logging call.\n\nfor sharing this patch purpose.","commit_id":"aaa99599699d78956fd3b35dbddf436eabce3a35"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"3e6fb764db15e61f53e69a3276fd2e68f4116345","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"See the oslo i18n guideline."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"* http://docs.openstack.org/developer/oslo.i18n/guidelines.html"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: Ief6d3ee3539c0857098fffdb7acfeec3e0fed6eb"},{"line_number":21,"context_line":"Closes-Bug: #1596829"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"3a98d1f4_4b534a6b","line":18,"in_reply_to":"5a8bc5a2_8b196c25","updated":"2016-10-01 05:53:44.000000000","message":"The latter is in line 9- line 11.","commit_id":"aaa99599699d78956fd3b35dbddf436eabce3a35"}],"nova/hacking/checks.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"0b637968e578b4c0d4dba219af13497c94464e04","unresolved":false,"context_lines":[{"line_number":813,"context_line":""},{"line_number":814,"context_line":"    N352"},{"line_number":815,"context_line":"    \"\"\""},{"line_number":816,"context_line":"    if \"nova/tests\" in filename:"},{"line_number":817,"context_line":"        return"},{"line_number":818,"context_line":""},{"line_number":819,"context_line":"    if pep8.noqa(physical_line):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_c3f4fa88","line":816,"updated":"2016-07-08 13:20:34.000000000","message":"not sure why tests are excluded, but I am not against the idea.","commit_id":"f6c7727772db7debb602fed81df3a37999feb563"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"d4f60c9098c11381fb7da4eafbc83cd142b44d54","unresolved":false,"context_lines":[{"line_number":813,"context_line":""},{"line_number":814,"context_line":"    N352"},{"line_number":815,"context_line":"    \"\"\""},{"line_number":816,"context_line":"    if \"nova/tests\" in filename:"},{"line_number":817,"context_line":"        return"},{"line_number":818,"context_line":""},{"line_number":819,"context_line":"    if pep8.noqa(physical_line):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_0d15233f","line":816,"in_reply_to":"1aa78d24_c3f4fa88","updated":"2016-07-11 23:54:53.000000000","message":"Tests are usually executed in debug mode.\nSo all log messages are output and string interpolations are always done.\nSo IMO, it is useless to check it in terms of performance.","commit_id":"f6c7727772db7debb602fed81df3a37999feb563"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"8187c90ae5e6677eed9df06d9e28abc83497c443","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                    r\"[\\[|\u0027|\\\"](, .*)?\\)\")"},{"line_number":80,"context_line":"asse_raises_regexp \u003d re.compile(r\"assertRaisesRegexp\\(\")"},{"line_number":81,"context_line":"conf_attribute_set_re \u003d re.compile(r\"CONF\\.[a-z0-9_.]+\\s*\u003d\\s*\\w\")"},{"line_number":82,"context_line":"log_translation \u003d re.compile("},{"line_number":83,"context_line":"    r\"(.)*LOG\\.(audit|error|critical)\\(\\s*(\u0027|\\\")\")"},{"line_number":84,"context_line":"log_translation_info \u003d re.compile("},{"line_number":85,"context_line":"    r\"(.)*LOG\\.(info)\\(\\s*(_\\(|\u0027|\\\")\")"},{"line_number":86,"context_line":"log_translation_exception \u003d re.compile("},{"line_number":87,"context_line":"    r\"(.)*LOG\\.(exception)\\(\\s*(_\\(|\u0027|\\\")\")"},{"line_number":88,"context_line":"log_translation_LW \u003d re.compile("},{"line_number":89,"context_line":"    r\"(.)*LOG\\.(warning|warn)\\(\\s*(_\\(|\u0027|\\\")\")"},{"line_number":90,"context_line":"translated_log \u003d re.compile("},{"line_number":91,"context_line":"    r\"(.)*LOG\\.(audit|error|info|critical|exception)\""},{"line_number":92,"context_line":"    \"\\(\\s*_\\(\\s*(\u0027|\\\")\")"},{"line_number":93,"context_line":"mutable_default_args \u003d re.compile(r\"^\\s*def .+\\((.+\u003d\\{\\}|.+\u003d\\[\\])\")"},{"line_number":94,"context_line":"string_translation \u003d re.compile(r\"[^_]*_\\(\\s*(\u0027|\\\")\")"},{"line_number":95,"context_line":"underscore_import_check \u003d re.compile(r\"(.)*import _(.)*\")"}],"source_content_type":"text/x-python","patch_set":12,"id":"dada55a8_60cd9d84","line":92,"range":{"start_line":82,"start_character":0,"end_line":92,"end_character":24},"updated":"2016-07-21 03:29:19.000000000","message":"Here.","commit_id":"f6e6a45c250d7b78401f1b7ef176b6fb34295fd4"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"472e89eea40745e0b3bb0ec0b6cfb9c78597cf97","unresolved":false,"context_lines":[{"line_number":106,"context_line":"contextlib_nested \u003d re.compile(r\"^with (contextlib\\.)?nested\\(\")"},{"line_number":107,"context_line":"doubled_words_re \u003d re.compile("},{"line_number":108,"context_line":"    r\"\\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\\s+\\1\\b\")"},{"line_number":109,"context_line":"log_string_interpolation \u003d re.compile(r\".*LOG\\.(?:error|warn|warning|info\""},{"line_number":110,"context_line":"                                      r\"|critical|exception|debug)\""},{"line_number":111,"context_line":"                                      r\"\\([^,]*%[^,]*[,)]\")"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_ee26bbb8","line":109,"range":{"start_line":109,"start_character":40,"end_line":109,"end_character":42},"updated":"2016-07-12 09:41:51.000000000","message":"Shouldn\u0027t that be a series of spaces? Otherwise this would also match on:\n\n    SYSLOG.warn(...)\n\nand I assume we don\u0027t want that?","commit_id":"f6e6a45c250d7b78401f1b7ef176b6fb34295fd4"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"8187c90ae5e6677eed9df06d9e28abc83497c443","unresolved":false,"context_lines":[{"line_number":106,"context_line":"contextlib_nested \u003d re.compile(r\"^with (contextlib\\.)?nested\\(\")"},{"line_number":107,"context_line":"doubled_words_re \u003d re.compile("},{"line_number":108,"context_line":"    r\"\\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\\s+\\1\\b\")"},{"line_number":109,"context_line":"log_string_interpolation \u003d re.compile(r\".*LOG\\.(?:error|warn|warning|info\""},{"line_number":110,"context_line":"                                      r\"|critical|exception|debug)\""},{"line_number":111,"context_line":"                                      r\"\\([^,]*%[^,]*[,)]\")"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"dada55a8_80d09120","line":109,"range":{"start_line":109,"start_character":40,"end_line":109,"end_character":42},"in_reply_to":"1aa78d24_ee26bbb8","updated":"2016-07-21 03:29:19.000000000","message":"I cannot find where using \u0027SYSLOG\u0027 to output logs in nova source codes.\nIt is same prerequisite for other LOG statement checks.\nSee Line 82-90.","commit_id":"f6e6a45c250d7b78401f1b7ef176b6fb34295fd4"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"472e89eea40745e0b3bb0ec0b6cfb9c78597cf97","unresolved":false,"context_lines":[{"line_number":107,"context_line":"doubled_words_re \u003d re.compile("},{"line_number":108,"context_line":"    r\"\\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\\s+\\1\\b\")"},{"line_number":109,"context_line":"log_string_interpolation \u003d re.compile(r\".*LOG\\.(?:error|warn|warning|info\""},{"line_number":110,"context_line":"                                      r\"|critical|exception|debug)\""},{"line_number":111,"context_line":"                                      r\"\\([^,]*%[^,]*[,)]\")"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"opt_help_text_min_char_count \u003d 10"}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_8e173744","line":110,"range":{"start_line":110,"start_character":65,"end_line":110,"end_character":67},"updated":"2016-07-12 09:41:51.000000000","message":"We should match on \"LOG.log\" too, unless we exclude the usage. We use it in the \"nova/utils.py\" module for example: https://github.com/openstack/nova/blob/9f92a6a7bb3002190e321de5575bd5f7992993c9/nova/utils.py#L240-L240","commit_id":"f6e6a45c250d7b78401f1b7ef176b6fb34295fd4"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"8187c90ae5e6677eed9df06d9e28abc83497c443","unresolved":false,"context_lines":[{"line_number":107,"context_line":"doubled_words_re \u003d re.compile("},{"line_number":108,"context_line":"    r\"\\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\\s+\\1\\b\")"},{"line_number":109,"context_line":"log_string_interpolation \u003d re.compile(r\".*LOG\\.(?:error|warn|warning|info\""},{"line_number":110,"context_line":"                                      r\"|critical|exception|debug)\""},{"line_number":111,"context_line":"                                      r\"\\([^,]*%[^,]*[,)]\")"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"opt_help_text_min_char_count \u003d 10"}],"source_content_type":"text/x-python","patch_set":12,"id":"dada55a8_c0aba973","line":110,"range":{"start_line":110,"start_character":65,"end_line":110,"end_character":67},"in_reply_to":"1aa78d24_8e173744","updated":"2016-07-21 03:29:19.000000000","message":"It is same prerequisite for other LOG statement checks.\nSee Line 82-90.\nAnd I can only find \"LOG.log\" in nova/utils.py.\nSo, IMO, it can be regarded as an exception (special case).","commit_id":"f6e6a45c250d7b78401f1b7ef176b6fb34295fd4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"a7514a59b59622b9157d1be8fd93b34a3afa40b1","unresolved":false,"context_lines":[{"line_number":107,"context_line":"contextlib_nested \u003d re.compile(r\"^with (contextlib\\.)?nested\\(\")"},{"line_number":108,"context_line":"doubled_words_re \u003d re.compile("},{"line_number":109,"context_line":"    r\"\\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\\s+\\1\\b\")"},{"line_number":110,"context_line":"log_string_interpolation \u003d re.compile(r\".*LOG\\.(error|warning|info\""},{"line_number":111,"context_line":"                                      r\"|critical|exception|debug)\""},{"line_number":112,"context_line":"                                      r\"\\([^,]*%[^,]*[,)]\")"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"9ad45d7e_8fe15d9d","line":110,"range":{"start_line":110,"start_character":40,"end_line":110,"end_character":42},"updated":"2016-08-09 09:56:59.000000000","message":"I think what Markus is after with the series of spaces before LOG is that it might happen that we call the logger something XYZ_LOG. I grepped the code but I haven\u0027t found any real example. The closest thing is https://github.com/openstack/nova/blob/master/nova/tests/unit/virt/xenapi/test_vm_utils.py#L478 but that is also just a test case.\n\nIn the other hand in cmd.api  we call logger as \u0027log\u0027 instead of \u0027LOG\u0027: https://github.com/openstack/nova/blob/master/nova/cmd/api.py#L66\n\nI\u0027m not sure we want to check all this possible cases with a regexp so I\u0027m OK to keep the .* there.","commit_id":"5f652d0a8316d374a25c0031c44ac35d48752330"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"a7514a59b59622b9157d1be8fd93b34a3afa40b1","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    r\"\\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\\s+\\1\\b\")"},{"line_number":110,"context_line":"log_string_interpolation \u003d re.compile(r\".*LOG\\.(error|warning|info\""},{"line_number":111,"context_line":"                                      r\"|critical|exception|debug)\""},{"line_number":112,"context_line":"                                      r\"\\([^,]*%[^,]*[,)]\")"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"opt_help_text_min_char_count \u003d 10"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"9ad45d7e_9247c24a","line":112,"range":{"start_line":112,"start_character":42,"end_line":112,"end_character":47},"updated":"2016-08-09 09:56:59.000000000","message":"I think it means that the following is not a match:\n  LOG.debug(\",%s\" % \"foo\")\n\nBut I guess it should be.","commit_id":"5f652d0a8316d374a25c0031c44ac35d48752330"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"3783813ba7137681fda9c1015665f885a7e395ad","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    r\"\\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\\s+\\1\\b\")"},{"line_number":110,"context_line":"log_string_interpolation \u003d re.compile(r\".*LOG\\.(error|warning|info\""},{"line_number":111,"context_line":"                                      r\"|critical|exception|debug)\""},{"line_number":112,"context_line":"                                      r\"\\([^,]*%[^,]*[,)]\")"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"opt_help_text_min_char_count \u003d 10"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"9ad45d7e_d5d64426","line":112,"range":{"start_line":112,"start_character":42,"end_line":112,"end_character":47},"in_reply_to":"9ad45d7e_9247c24a","updated":"2016-08-09 10:20:10.000000000","message":"The check target is \u0027logical_line\u0027.\nThe logical_line is created by replacing string content with \u0027xxx\u0027 string.\n\ne.g.\noriginal line: LOG.debug(\",%s\" % \"foo\")\nlogical_line:  LOG.debug(\"xxx\" % \"foo\")\n\nSo it is no problem.","commit_id":"5f652d0a8316d374a25c0031c44ac35d48752330"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"492245e0f98635d89cf66a6822ea10e33bbf7878","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    r\"\\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\\s+\\1\\b\")"},{"line_number":110,"context_line":"log_string_interpolation \u003d re.compile(r\".*LOG\\.(error|warning|info\""},{"line_number":111,"context_line":"                                      r\"|critical|exception|debug)\""},{"line_number":112,"context_line":"                                      r\"\\([^,]*%[^,]*[,)]\")"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"opt_help_text_min_char_count \u003d 10"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"9ad45d7e_f63b7ce9","line":112,"range":{"start_line":112,"start_character":42,"end_line":112,"end_character":47},"in_reply_to":"9ad45d7e_d5d64426","updated":"2016-08-09 16:00:38.000000000","message":"I didn\u0027t know that. Then it seems OK.","commit_id":"5f652d0a8316d374a25c0031c44ac35d48752330"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"74c3a62f2d5c7c2e12c1999b8da3ee154ad6220d","unresolved":false,"context_lines":[{"line_number":805,"context_line":""},{"line_number":806,"context_line":"    N354"},{"line_number":807,"context_line":"    \"\"\""},{"line_number":808,"context_line":"    if \"nova/tests\" in filename:"},{"line_number":809,"context_line":"        return"},{"line_number":810,"context_line":""},{"line_number":811,"context_line":"    if pep8.noqa(physical_line):"},{"line_number":812,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":33,"id":"1a95cdbc_8dcd5a87","line":809,"range":{"start_line":808,"start_character":0,"end_line":809,"end_character":14},"updated":"2016-10-07 21:50:30.000000000","message":"one question: Why we need to skip nova/tests here?\n\nmaybe it is nice to write the reason as NOTE, but it is fine to go forward with current one also.","commit_id":"b9615977c71950678ade63a8813451efb5fc2a11"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"09513cb6d879b7b607e6a49e4830aa23a6def3a2","unresolved":false,"context_lines":[{"line_number":805,"context_line":""},{"line_number":806,"context_line":"    N354"},{"line_number":807,"context_line":"    \"\"\""},{"line_number":808,"context_line":"    if \"nova/tests\" in filename:"},{"line_number":809,"context_line":"        return"},{"line_number":810,"context_line":""},{"line_number":811,"context_line":"    if pep8.noqa(physical_line):"},{"line_number":812,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":33,"id":"1a95cdbc_af8e86cd","line":809,"range":{"start_line":808,"start_character":0,"end_line":809,"end_character":14},"in_reply_to":"1a95cdbc_8dcd5a87","updated":"2016-10-08 05:33:50.000000000","message":"Please check my answer for John\u0027s question in PS7.","commit_id":"b9615977c71950678ade63a8813451efb5fc2a11"}]}
