Skip to content

Conversation

@jeparlefrancais
Copy link
Contributor

@jeparlefrancais jeparlefrancais commented Sep 30, 2025

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

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
6 checks passed
@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

2 participants