Skip to content

Multiple runs with different output #261

@qbedard

Description

@qbedard

Running multiple times on the same file without otherwise changing the file sometimes yields different results.

  • Version: 0.10.1
  • Platform: macOS Big Sur 11.5.2

Config at /Users/tim/stylua.toml:

column_width = 88

Lua file before (at `/Users/tim/example.lua):

local thisisathing = {this_is_one = "one", this_is_two = "two", this_is_three = "three"}

First run:

stylua -v example.lua

config: starting config search from /Users/tim - recurisvely searching parents: false
config: Config {
    column_width: 88,
    line_endings: Unix,
    indent_type: Tabs,
    indent_width: 4,
    quote_style: AutoPreferDouble,
    no_call_parentheses: false,
}
creating a pool with 8 threads
formatted example.lua in 1.121355ms
local thisisathing =
	{
		this_is_one = "one",
		this_is_two = "two",
		this_is_three = "three",
	}

Second run:

stylua -v example.lua

config: starting config search from /Users/tim - recurisvely searching parents: false
config: Config {
    column_width: 88,
    line_endings: Unix,
    indent_type: Tabs,
    indent_width: 4,
    quote_style: AutoPreferDouble,
    no_call_parentheses: false,
}
creating a pool with 8 threads
formatted example.lua in 1.314414ms
local thisisathing = {
	this_is_one = "one",
	this_is_two = "two",
	this_is_three = "three",
}

Expected:

The output of the second run should be the result after the first run, and subsequent runs should result in no changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions