Skip to content

Error when saving a file w/o formatter configured #52

Description

@cpence

In the get_module function (https://github.com/vincens2005/lite-formatters/blob/master/init.lua#L47), an empty module is returned when no formatter can be found.

But whenever the return value of get_module is tested (https://github.com/vincens2005/lite-formatters/blob/master/init.lua#L110, https://github.com/vincens2005/lite-formatters/blob/master/init.lua#L140), the return value is compared with nil. The return statement on L47 should return nil when no formatter is found.

At the moment, this causes an error to be raised every time you attempt to format a file without a formatter configured.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions