{"action":"created","issue":{"url":"https://api.github.com/repos/coala/coala/issues/3441","repository_url":"https://api.github.com/repos/coala/coala","labels_url":"https://api.github.com/repos/coala/coala/issues/3441/labels{/name}","comments_url":"https://api.github.com/repos/coala/coala/issues/3441/comments","events_url":"https://api.github.com/repos/coala/coala/issues/3441/events","html_url":"https://github.com/coala/coala/issues/3441","id":198197822,"number":3441,"title":"IgnoreResultAction.py: Can use multiline_comment_delimiter as a fallback when comment_delimiter doesn't exist for a language","user":{"login":"hemangsk","id":13018570,"avatar_url":"https://avatars.githubusercontent.com/u/13018570?v=3","gravatar_id":"","url":"https://api.github.com/users/hemangsk","html_url":"https://github.com/hemangsk","followers_url":"https://api.github.com/users/hemangsk/followers","following_url":"https://api.github.com/users/hemangsk/following{/other_user}","gists_url":"https://api.github.com/users/hemangsk/gists{/gist_id}","starred_url":"https://api.github.com/users/hemangsk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hemangsk/subscriptions","organizations_url":"https://api.github.com/users/hemangsk/orgs","repos_url":"https://api.github.com/users/hemangsk/repos","events_url":"https://api.github.com/users/hemangsk/events{/privacy}","received_events_url":"https://api.github.com/users/hemangsk/received_events","type":"User","site_admin":false},"labels":[{"id":308852190,"url":"https://api.github.com/repos/coala/coala/labels/difficulty/low","name":"difficulty/low","color":"207de5","default":false}],"state":"closed","locked":false,"assignee":{"login":"nemaniarjun","id":15715894,"avatar_url":"https://avatars.githubusercontent.com/u/15715894?v=3","gravatar_id":"","url":"https://api.github.com/users/nemaniarjun","html_url":"https://github.com/nemaniarjun","followers_url":"https://api.github.com/users/nemaniarjun/followers","following_url":"https://api.github.com/users/nemaniarjun/following{/other_user}","gists_url":"https://api.github.com/users/nemaniarjun/gists{/gist_id}","starred_url":"https://api.github.com/users/nemaniarjun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nemaniarjun/subscriptions","organizations_url":"https://api.github.com/users/nemaniarjun/orgs","repos_url":"https://api.github.com/users/nemaniarjun/repos","events_url":"https://api.github.com/users/nemaniarjun/events{/privacy}","received_events_url":"https://api.github.com/users/nemaniarjun/received_events","type":"User","site_admin":false},"assignees":[{"login":"nemaniarjun","id":15715894,"avatar_url":"https://avatars.githubusercontent.com/u/15715894?v=3","gravatar_id":"","url":"https://api.github.com/users/nemaniarjun","html_url":"https://github.com/nemaniarjun","followers_url":"https://api.github.com/users/nemaniarjun/followers","following_url":"https://api.github.com/users/nemaniarjun/following{/other_user}","gists_url":"https://api.github.com/users/nemaniarjun/gists{/gist_id}","starred_url":"https://api.github.com/users/nemaniarjun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nemaniarjun/subscriptions","organizations_url":"https://api.github.com/users/nemaniarjun/orgs","repos_url":"https://api.github.com/users/nemaniarjun/repos","events_url":"https://api.github.com/users/nemaniarjun/events{/privacy}","received_events_url":"https://api.github.com/users/nemaniarjun/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2016-12-30T21:43:06Z","updated_at":"2017-01-06T17:33:44Z","closed_at":"2017-01-06T17:33:44Z","body":"[Initial discussion](https://github.com/coala/coala-bears/issues/1225)\r\nPresently IgnoreResultAction.py uses `comment_delimiter` attribute to add ignore comments.\r\nSome bears such as CSSLintBear have `multiline_comment_delimiter` attribute and not a `comment_delimiter` and therefore this causes failure to add ignore comment in css files.\r\n\r\nSteps for reproduction:\r\n\r\n1. Create file style.css\r\n```\r\n.low{\r\nfont-family:Roboto;\r\ncolor:white;\r\n}\r\n\r\n```\r\n2. Execute `coala --bears CSSLintBear --files style.css`\r\n```\r\nstyle.css\r\n|   1| .low•{\r\n|    | [NORMAL] CSSLintBear:\r\n|    | Rule doesn't have all its properties in alphabetical order. (order-alphabetical)\r\n|    | *0: Do nothing\r\n|    |  1: Open file(s)\r\n|    |  2: Add ignore comment\r\n|    | Enter number (Ctrl-D to exit): 2\r\n|    | Please enter a value for the parameter 'language' (No description given.): css\r\n[ERROR][14:26:06] Failed to execute the action IgnoreResultAction with error: 'comment_delimiter'.\r\n|    | *0: Do nothing\r\n|    |  1: Open file(s)\r\n|    |  2: Add ignore comment\r\n|    | Enter number (Ctrl-D to exit): 2\r\n|    | Please enter a value for the parameter 'language' (No description given.): css\r\n[ERROR][14:26:13] Failed to execute the action IgnoreResultAction with error: 'comment_delimiter'.\r\n|    | *0: Do nothing\r\n|    |  1: Open file(s)\r\n|    |  2: Add ignore comment\r\n|    | Enter number (Ctrl-D to exit): 2\r\n|    | Please enter a value for the parameter 'language' (No description given.): scss\r\n[ERROR][14:26:19] Failed to execute the action IgnoreResultAction with error: .\r\n```\r\nIt is asking for the parameter 'language' from the user and then if there is no language found with name `css`, it returns \r\n```\r\nFailed to execute the action IgnoreResultAction with error: 'comment_delimiter'.\r\n```\r\n\r\nPossible Solution\r\nWe can add an option in IgnoreResultAction,\r\n```\r\n if language has attribute comment delimiter then\r\n    use comment_delimiter to add ignore comment\r\n elif language.hasattr(multiline_comment_delimiter) and not language.hasattr(comment_delimiter):\r\n   use multilime_comment_delimiter to add ignore comment\r\nelse\r\n  print (\"We don't have a comment_delimiter for this language, What would you like to wrap the ignore comment in ?\")\r\n   take comment delimiter as an input from user\r\n```"},"comment":{"url":"https://api.github.com/repos/coala/coala/issues/comments/270957359","html_url":"https://github.com/coala/coala/issues/3441#issuecomment-270957359","issue_url":"https://api.github.com/repos/coala/coala/issues/3441","id":270957359,"user":{"login":"sils","id":5716520,"avatar_url":"https://avatars.githubusercontent.com/u/5716520?v=3","gravatar_id":"","url":"https://api.github.com/users/sils","html_url":"https://github.com/sils","followers_url":"https://api.github.com/users/sils/followers","following_url":"https://api.github.com/users/sils/following{/other_user}","gists_url":"https://api.github.com/users/sils/gists{/gist_id}","starred_url":"https://api.github.com/users/sils/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sils/subscriptions","organizations_url":"https://api.github.com/users/sils/orgs","repos_url":"https://api.github.com/users/sils/repos","events_url":"https://api.github.com/users/sils/events{/privacy}","received_events_url":"https://api.github.com/users/sils/received_events","type":"User","site_admin":false},"created_at":"2017-01-06T17:33:44Z","updated_at":"2017-01-06T17:33:44Z","body":"you had a # before the URL, typo"}}
{"actor":{"display_login":"sils"}}