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

Improved formatter #248

Merged
merged 7 commits into from
Aug 29, 2022
Merged

Improved formatter #248

merged 7 commits into from
Aug 29, 2022

Conversation

JCWasmx86
Copy link
Contributor

This improves the formatter:

  1. Break long lines (At the moment 120, but this should be configurable somehow, maybe use the average or something like that)
  2. Indent broken up parameter lists
  3. Fix _("Foo") and so on
  4. Fix the bug that new Gee.HashMap<string, List<string>> () is reformatted as new Gee.HashMap<string, List<string> > ()
  5. If formatting fails, print commandline to stderr in order to debug e.g. uncrustify failures

src/codehelp/formatter.vala Outdated Show resolved Hide resolved
src/codehelp/formatter.vala Outdated Show resolved Hide resolved
src/codehelp/formatter.vala Outdated Show resolved Hide resolved
src/codehelp/formatter.vala Show resolved Hide resolved
src/codehelp/formatter.vala Show resolved Hide resolved
@JCWasmx86
Copy link
Contributor Author

Is this mergeable (After squashing the commits)?

@JCWasmx86
Copy link
Contributor Author

@Prince781: Do you have any time to rereview these changes?

@Prince781
Copy link
Member

uncrustify will fix a space before the call to x() and remove the space before the translation function, but it will not do anything to the hashmap calls.

void x () {
}

void main () {
    new Gee.HashMap<string, Gee.List<string>> ();
    new Gee.HashMap<string, Gee.List<string>> ();
    new Gee.HashMap<string, Gee.List<string>> ();
    new Gee.HashMap<string, Gee.List<string>> ();
    new Gee.HashMap<string, Gee.List<string>>();
    x();
    _ ("Foo");
}

@JCWasmx86
Copy link
Contributor Author

JCWasmx86 commented Aug 15, 2022

Should be fixed now, failed CI for Vala Daily seems to be unrelated

@Prince781
Copy link
Member

Prince781 commented Aug 25, 2022

I haven't forgotten about this. I promise I'll get to it after I get through my latest crunch.

@Prince781 Prince781 merged commit 40d3754 into vala-lang:master Aug 29, 2022
@Prince781
Copy link
Member

@JCWasmx86 thank you very much

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

Successfully merging this pull request may close these issues.

None yet

2 participants