clutchski / coffeelint

Lint your CoffeeScript.
http://www.coffeelint.org
Other
1.18k stars 171 forks source link

Empty catch blocks trigger indentation errors for version > 1.11.1 #511

Closed akshat1 closed 9 years ago

akshat1 commented 9 years ago

An empty catch block (with or without comments) causes coffeelint to complain about inconsistent indentation.

Sample code

try
  console.log 'a tisket'
  console.log 'a tasket'
catch err
  # We'll eat the exception

console.log 'All done'

coffeelint@1.11.1 finds no errors with this code. However, later version (1.12.0, 1.12.1) both give the following error

$ coffeelint sample.coffee 
  ✗ sample.coffee
     ✗ #4: Line contains inconsistent indentation. Expected 2 got 0.

✗ Lint! » 1 error and 0 warnings in 1 file
akshat1 commented 9 years ago

Thanks for the fix Shuan Wang :) :+1:

swang commented 9 years ago

no prob. I just release v1.13.0 with all the fixes.

AsaAyers commented 9 years ago

Please update the changelog too.