-
Notifications
You must be signed in to change notification settings - Fork 6
Luacheck Showcase #4
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
local function divide(a, b) | ||
return a / undefined_var | ||
end | ||
|
||
local function nestedError() | ||
if true then | ||
local x = y + 10 | ||
end | ||
local result = a + b | ||
return result | ||
end | ||
|
||
local function syntaxError() | ||
if true then | ||
print("This will cause a syntax error") | ||
|
||
local missingBracket = | ||
end | ||
Comment on lines
+13
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix syntax errors in function The function has critical syntax errors that prevent parsing:
local function syntaxError() if true then print("This will cause a syntax error") - - local missingBracket = + end + local missingBracket = nil -- or assign appropriate value end 📝 Committable suggestion
Suggested change
local function syntaxError()
if true then
print("This will cause a syntax error")
local missingBracket =
end
local function syntaxError()
if true then
print("This will cause a syntax error")
end
local missingBracket =nil-- or assign appropriate value
end
🧰 Tools🪛 Luacheck (1.2.0)[error] 18-18: expected expression near 'end' (E011) 🤖 Prompt for AI Agents
|
||
|
||
local table = {} | ||
local value = table[undefined_key] | ||
local error = function() end |