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

Pretty print issues #154

Closed
Yogpod opened this issue May 31, 2023 · 8 comments
Closed

Pretty print issues #154

Yogpod opened this issue May 31, 2023 · 8 comments

Comments

@Yogpod
Copy link

Yogpod commented May 31, 2023

Code_zeSFc9irM4

Code_6PE3aHutLQ

@Yogpod
Copy link
Author

Yogpod commented May 31, 2023

glualint --pretty-print looa.lua works fine so im gonna assume it's something with the plugin

@Yogpod Yogpod closed this as completed May 31, 2023
@FPtje
Copy link
Owner

FPtje commented May 31, 2023

Odd, I can reproduce with the plugin, but indeed not with glualint itself. It doesn't happen on glualint 1.24.3 though, so I'm not sure what's happening.

@Yogpod Yogpod reopened this May 31, 2023
@Yogpod
Copy link
Author

Yogpod commented May 31, 2023

Goz3rr/vscode-glualint#13 maybe this is involved, 🤷‍♂️

@FPtje
Copy link
Owner

FPtje commented May 31, 2023

It looks like it is, but I'm not sure how exactly. The plugin uses the legacy command, but I cannot reproduce even with that:

$ echo "local a = function() print(a) return 1 - 1 end" | cabal run glualint -- --pretty-print --indentation="    " --stdin
local a = function()
    print(a)

    return 1 - 1
end

$ echo "local a = function() print(a) return 1 - 1 end" | cabal run glualint -- --pretty-print --indentation=     --stdin
local a = function()
print(a)

return 1 - 1
end

@Yogpod
Copy link
Author

Yogpod commented May 31, 2023

Removed , `--indentation='${indentation}' from the plugin's glualintFormatter.js and it stopped doing it with the plugin

@FPtje
Copy link
Owner

FPtje commented May 31, 2023

Ah, then I think the apostrophes in the indentation are what's causing the issue. That was already fixed in this commit, though. Maybe that commit was not published? Goz3rr/vscode-glualint@8947bca

@Goz3rr
Copy link

Goz3rr commented Jun 1, 2023

Yeah it's something I've noticed while debugging Goz3rr/vscode-glualint#13 as well, it's indeed because of the indentation but I have no clue why it wasn't an issue until 1.24.4. The commit was not published yet, I'll switch over to the new CLI and release both.

The problem is (was) on my end so you can close the issue here

@FPtje
Copy link
Owner

FPtje commented Jun 1, 2023

Sorry for breaking the legacy cli in the first place and thanks for fixing it in the plugin!

I think the previous version of the legacy cli also accepted single quotes.

@FPtje FPtje closed this as completed Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants