Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make stylechecker ignore spaces in some aligned expressions? #189

Open
4lph4-Ph4un opened this issue Oct 1, 2024 · 1 comment
Open

Comments

@4lph4-Ph4un
Copy link

4lph4-Ph4un commented Oct 1, 2024

I tend to write shorter one-expression if-elseif-else conditions as oneliners that I aligne like this:

if     off == 0 then return mid
elseif off < 0  then hi = mid - 1
else                 lo = mid + 1
end

This causes the stylecheck to warn about: "multiple spaces after token 'if'" and "multiple spaces after token '0'". Is there a way to make stylechecker to ignore cases like this? If not yet, could that be implemented at some point?

This might have some overlap with: #188

@CppCXY
Copy link
Owner

CppCXY commented Oct 2, 2024

add ---@format disable-next :

---@format disable-next
if     off == 0 then return mid
elseif off < 0  then hi = mid - 1
else                 lo = mid + 1
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants