Skip to content

not_globals for custom standard doesn't seem to work #72

Open
@eliw00d

Description

I have a .luacheckrc that looks something like:

std = 'lua51'

stds.custom = {
    not_globals = {
        'package',
        'golua_default_msghandler',
        'os',
        'require',
        'io',
        'module',
        'unsafe_xpcall',
        'unsafe_pcall',
        'debug',
        'dofile',
    },
    read_globals = {
        -- custom read globals
    },
}

files['**/*.custom'] = {
    std = '+custom'
}

but when I try to set require in a file matching the glob and run luacheck I get: (W121) setting read-only global variable require

How can I remove read_globals set by std from a custom standard defined in stds?

❯ luacheck --version
Luacheck: 0.26.1
Lua: PUC-Rio Lua 5.1
Argparse: 0.7.1
LuaFileSystem: 1.8.0
LuaLanes: Not found

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions