{"action":"created","issue":{"url":"https://api.github.com/repos/clutchski/coffeelint/issues/417","labels_url":"https://api.github.com/repos/clutchski/coffeelint/issues/417/labels{/name}","comments_url":"https://api.github.com/repos/clutchski/coffeelint/issues/417/comments","events_url":"https://api.github.com/repos/clutchski/coffeelint/issues/417/events","html_url":"https://github.com/clutchski/coffeelint/issues/417","id":76634096,"number":417,"title":"Incorrect inconsistent indentation reported with multiline conditionals","user":{"login":"warthog618","id":2715028,"avatar_url":"https://avatars.githubusercontent.com/u/2715028?v=3","gravatar_id":"","url":"https://api.github.com/users/warthog618","html_url":"https://github.com/warthog618","followers_url":"https://api.github.com/users/warthog618/followers","following_url":"https://api.github.com/users/warthog618/following{/other_user}","gists_url":"https://api.github.com/users/warthog618/gists{/gist_id}","starred_url":"https://api.github.com/users/warthog618/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/warthog618/subscriptions","organizations_url":"https://api.github.com/users/warthog618/orgs","repos_url":"https://api.github.com/users/warthog618/repos","events_url":"https://api.github.com/users/warthog618/events{/privacy}","received_events_url":"https://api.github.com/users/warthog618/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-15T07:38:34Z","updated_at":"2015-05-15T11:39:05Z","closed_at":"2015-05-15T11:39:05Z","body":"I have found a problem with with multiline conditionals as shown in the following code which happily runs through coffee:\r\n\r\n    a = 1\r\n    b = 1\r\n    c = 0\r\n    if a and\r\n      b and\r\n      not c\r\n        console.log 'success'\r\n\r\ncoffeelint reports:\r\n\r\n      ✗ #7: Line contains inconsistent indentation. Expected 2 got 4.\r\n\r\nIf I remove the \"extra\" indentation in line 7 it passes coffeelint but coffee will no longer run it:\r\n\r\n     error: unexpected if\r\n    if a and \r\n    ^^\r\n\r\nIt passes both if I don't indent the lines of the condition: \r\n\r\n    a = 1\r\n    b = 1\r\n    c = 0\r\n    if a and\r\n    b and\r\n    not c\r\n      console.log 'success'\r\n\r\nbut that seems less readable to me."},"comment":{"url":"https://api.github.com/repos/clutchski/coffeelint/issues/comments/102375309","html_url":"https://github.com/clutchski/coffeelint/issues/417#issuecomment-102375309","issue_url":"https://api.github.com/repos/clutchski/coffeelint/issues/417","id":102375309,"user":{"login":"AsaAyers","id":324999,"avatar_url":"https://avatars.githubusercontent.com/u/324999?v=3","gravatar_id":"","url":"https://api.github.com/users/AsaAyers","html_url":"https://github.com/AsaAyers","followers_url":"https://api.github.com/users/AsaAyers/followers","following_url":"https://api.github.com/users/AsaAyers/following{/other_user}","gists_url":"https://api.github.com/users/AsaAyers/gists{/gist_id}","starred_url":"https://api.github.com/users/AsaAyers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AsaAyers/subscriptions","organizations_url":"https://api.github.com/users/AsaAyers/orgs","repos_url":"https://api.github.com/users/AsaAyers/repos","events_url":"https://api.github.com/users/AsaAyers/events{/privacy}","received_events_url":"https://api.github.com/users/AsaAyers/received_events","type":"User","site_admin":false},"created_at":"2015-05-15T11:39:05Z","updated_at":"2015-05-15T11:39:05Z","body":"The solution to this is to indent the line continuation further and then indent to body normally. It isn't required, but I like to put an extra line between the end of the condition and the body, I think it makes it a bit more clear.\r\n\r\n```\r\nif a and\r\n    b and\r\n    not c\r\n\r\n  console.log 'success'\r\n```"}}