Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI overrides not applied when formatting files in v2.0.0 #925

Closed
dubalda opened this issue Nov 17, 2024 · 2 comments · Fixed by #926
Closed

CLI overrides not applied when formatting files in v2.0.0 #925

dubalda opened this issue Nov 17, 2024 · 2 comments · Fixed by #926
Labels
bug Something isn't working

Comments

@dubalda
Copy link

dubalda commented Nov 17, 2024

I tried to run it both from Windows and from Docker for Windows

stylua.exe --line-endings Windows --check .

stylua.exe --line-endings Unix --check .

The result is the same, it gives errors in all files. Example of the first two files

Diff in ./cloud_test_tasks/runTests.luau:
1        |-require(game.ReplicatedStorage.Shared.LuTestRoblox.LuTestRunner)
    1    |+require(game.ReplicatedStorage.Shared.LuTestRoblox.LuTestRunner)
Diff in ./place_battle/replicated_storage/tests/test_workspace.luau:
1        |-local tests = {}
2        |-local Workspace = game:GetService("Workspace")
3        |-
4        |-function tests.test_server_workspace_gravity()
5        |-    assert(math.floor(Workspace.Gravity) == 196, "Gravity value is: " .. Workspace.Gravity)
6        |-end
7        |-
8        |-return tests
    1    |+local tests = {}
    2    |+local Workspace = game:GetService("Workspace")
    3    |+
    4    |+function tests.test_server_workspace_gravity()
    5    |+    assert(math.floor(Workspace.Gravity) == 196, "Gravity value is: " .. Workspace.Gravity)
    6    |+end
    7    |+
    8    |+return tests
Diff in ./place_battle/replicated_storage/tests/test_starterplayer.luau:

After reverting to 0.20.0 the results became normal again

@JohnnyMorganz
Copy link
Owner

Hm, this does look like line endings changing for some reason. Which is weird, since I don't think we touched that at all.

Do you by any chance have an example file I can test this with? Either in a public repo, or attaching a code file here (not in a code block since we need to preserve the line endings)

@dubalda
Copy link
Author

dubalda commented Nov 17, 2024

Yes, sure

runTests.zip

@JohnnyMorganz JohnnyMorganz added the bug Something isn't working label Nov 17, 2024
@JohnnyMorganz JohnnyMorganz changed the title v2.0.0 gives a verification error on all files CLI overrides not applied when formatting files in v2.0.0 Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants