Skip to content

Standard library linters #5

@SquidDev

Description

@SquidDev

Just some ideas for linters which pick up on potential issues with people using standard library functions:

  • Suggest replacing pcall(function() return f() end) (or pcall(function f() end) with pcall(f). This should probably only be done if all arguments are pure/will not error.
  • Check format strings (string.format and ("foo"):format) have the correct number of arguments. And possibly that the strings are well-formed.
  • Check Lua patterns are welformed within the various string.* functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-lintersIssues relating to linters and code fixersenhancementNew feature or requestgood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions