Skip to content

Add convert_function_to_assignment rule - #317

Merged
jeparlefrancais merged 3 commits into
mainfrom
convert-function-to-assignment
Sep 30, 2025
Merged

jeparlefrancais merged 3 commits into
mainfrom
convert-function-to-assignment

Conversation

@jeparlefrancais

@jeparlefrancais jeparlefrancais commented Sep 30, 2025 •

Copy link
Copy Markdown
Contributor

Closes #11

Add a new rule to convert function declaration statements into regular assignments.

local var = {}

function var.func() end
-- turns into:
var.func = function() end
  • add entry to the changelog

@github-actions

Copy link
Copy Markdown

Coverage after merging convert-function-to-assignment into main will be

87.29%

Coverage Report for Changed Files
FileStmtsBranchesFuncsLinesUncovered Lines
src/rules
   global_function_to_assign.rs100%100%100%100%
   mod.rs90.03%100%83.78%90.82%140–142, 161–163, 178, 199–201, 203–204, 249–251, 367, 407–409, 436, 443–446, 460

@jeparlefrancais
jeparlefrancais merged commit efb7c63 into main Sep 30, 2025
@jeparlefrancais
jeparlefrancais deleted the convert-function-to-assignment branch September 30, 2025 17:19
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

Successfully merging this pull request may close these issues.

Convert global functions to global assign statement

1 participant