Skip to content

StyLua accepts wide lines in examples that require 80 columns #207

In review

Description

@tony

Summary

The Lua example style guide sets an 80-column limit. Running the project’s StyLua command accepts an 88-column line in an example, so contributors can pass the formatter and still publish code that wraps on the documentation site.

Reproduction

Put these two lines in a disposable file under examples/ and run the formatter check. Repeat with the same file under tests/unit/.

local labels = { "a private tmux pane", "a standalone Lua example", "a terminal reply" }
return labels
$ stylua --check --syntax Lua51 examples/format_width_probe.lua

Expected

The formatter should wrap the example. The same source line under tests/unit/ fits the project’s 100-column width.

Actual

StyLua 2.4.0 exited successfully for both files. Giving examples/ its documented width made the example check report the line, and the project’s existing Lua examples already passed.

References

Lua writing guide · Earlier example style PR.

Activity

  1. added
    bug
    lua
    area:examples
    p3
    topic:examples
    on Dec 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:examplesbugluap3topic:examples

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions