CppCXY / EmmyLuaCodeStyle

fast, powerful, and feature-rich Lua formatting and checking tool.
MIT License
140 stars 27 forks source link

Option to allow non-indented comments? #162

Closed emmericp closed 9 months ago

emmericp commented 10 months ago

I have some code that contains a few commented out sections like this:

function foo(bar, baz)
    if foo then
--      if baz then
--          return baz
--      end
        return bar
    end
end

This was likely done by some editor function that just supports commenting out like this. It currently triggers a warning that indent is expected here. It would be great to have an option that always allow comments that start at the beginning of the line (and keeps them there during formatting) instead of at the designated indention. But comments starting at a non-zero and unexpected indention level should still trigger warnings.

CppCXY commented 10 months ago

It's Chinese New Year soon, so I'll probably try it after the holidays.

emmericp commented 9 months ago

thank you!