darklua
DocumentationTry itGitHub

Rules Reference


All Rules

    append_text_comment

    Append a comment at the start or end of a file

    compute_expression

    Computes expressions statically

    convert_index_to_field

    Convert index expression into field expressions

    convert_local_function_to_assign

    Convert local function definitions to variable declarations

    convert_require

    Convert require calls from one environment to another

    filter_after_early_return

    Removes unreachable statements following return statements

    group_local_assignment

    Groups local assignments into a single statement

    inject_global_value

    Inject a global variable

    remove_assertions

    Removes call to the assert function

    remove_comments

    Removes comments

    remove_compound_assignment

    Convert compound assignments into regular assignments

    remove_debug_profiling

    Removes call to debug.profilebegin and debug.profileend

    remove_empty_do

    Removes empty do statements

    remove_function_call_parens

    Removes functions call parentheses

    remove_interpolated_string

    Removes interpolated strings (backtick strings)

    remove_method_definition

    Converts function defined using `:` to use a `.`

    remove_nil_declaration

    Removes explicit declaration to `nil`

    remove_spaces

    Removes spaces

    remove_types

    Removes types

    remove_unused_if_branch

    Removes unused if branch

    remove_unused_while

    Removes unused while statement

    rename_variables

    Renames variables and function parameters

Unreleased Rules

These rules will be added in the next release:



    SEA OF VOICES

    . BUILT WITH 

    GATSBY