Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
hoontee committed Jul 5, 2024
1 parent 9301157 commit 1c3210d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Useful Modules/Sound.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function Sound:PlayAt(source: Sound, position: Vector3, newProperties: {[string]
end

--- @ignore
function Sound:Init()
function Sound:Init(): ()
for _, object in SoundService.Master:GetChildren() do
if type(Sound[object.Name]) == "function" then error(`Indexing '{object.Name}' would overwrite a function`) end
Sound[object.Name] = object
Expand Down
2 changes: 1 addition & 1 deletion Useful Modules/Util/SForce.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
--- Executes a function in a new thread until it succeeds.
--- @param func -- The function to execute.
--- @param ... -- The parameters to pass to the function.
return function(func: (...any) -> (...any), ...: any)
return function(func: (...any) -> (...any), ...: any): ()
local args = {...}
task.spawn(function()
while not pcall(function()
Expand Down
2 changes: 1 addition & 1 deletion Useful Modules/Util/Tree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ end
--- @yields
--- @param instance -- The root Instance to wait in.
--- @param ... -- The Names of the children to traverse.
function Tree.Wait(instance: Instance, ...: string)
function Tree.Wait(instance: Instance, ...: string): ()
if instance and instance.Parent then
for _, childName in {...} do
instance = instance:WaitForChild(childName)
Expand Down
15 changes: 13 additions & 2 deletions selene.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,34 @@ std = "roblox"

[rules]
almost_swapped = "deny"
constant_table_comparison = "deny"
deprecated = "deny"
divide_by_zero = "deny"
duplicate_keys = "deny"
empty_if = "allow"
global_usage = "allow"
high_cyclomatic_complexity = "allow"
if_same_then_else = "deny"
ifs_same_cond = "deny"
incorrect_standard_library_use = "deny"
incorrect_standard_library_use = "allow"
manual_table_clone = "deny"
mismatched_arg_count = "deny"
mixed_table = "deny"
multiple_statements = "allow"
must_use = "allow"
parenthese_conditions = "deny"
roblox_incorrect_color3_new_bounds = "deny"
roblox_incorrect_roact_usage = "deny"
roblox_suspicious_udim2_new = "deny"
shadowing = "deny"
suspicious_reverse_loop = "deny"
type_check_inside_call = "deny"
unbalanced_assignments = "deny"
undefined_variable = "deny"
unscoped_variables = "deny"
unused_variable = "warn"

[config]
shadowing = { ignore_pattern = "^self$|^_" }
unused_variable = { ignore_pattern = "^_", allow_unused_self = true }
unscoped_variables = { ignore_pattern = "^self$" }
unused_variable = { allow_unused_self = true }

0 comments on commit 1c3210d

Please sign in to comment.