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

Feature Request (if not already present) - Add option to end all lines with semi-colon ; #259

Open
Mayron opened this issue Sep 17, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@Mayron
Copy link

Mayron commented Sep 17, 2022

I'm used to programming in other languages like C# where you end each line with a semi-colon ; and I'd rather keep this style preference in my Lua code. Can I enforce this with a style config option?

For example, if any statement is missing the ; then they should be added with this requested rule enabled:

function verify(expected, actual)
  assert(actual == expected)
  return true
end

local a = "hello" local b = ", world"
local result = a .. b

if verify("hello, world", result) then
  local payload = { success = true }
  -- sendRequest(payload)
end

Should become:

function verify(expected, actual)
  assert(actual == expected);
  return true;
end

local a = "hello"; local b = ", world";
local result = a .. b;

if verify("hello, world", result) then
  local payload = { success = true };
  -- sendRequest(payload)
end
@Koihik Koihik added the enhancement New feature or request label Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants