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

Allow overriding the formatter config (avoid breaking long method names into new lines) #942

Open
mauriciogeneroso opened this issue Oct 20, 2023 · 0 comments

Comments

@mauriciogeneroso
Copy link

What happened?

The formatter should allow the users to set a config file and override the default formatting. There is a special case where I'd like to override the formatter config to avoid breaking long method names into new lines and it is not possible.

In Java, sometimes we have long method names for testing, and the formatter is formatting the method name to a new line:

    @Test
    void
            i_am_a_long_method_name_that_will_break_into_a_new_line_but_I_should_not_and_allow_something_to_override_it_and_customize_according_what_the_users_want() {}

What did you want to happen?

The formatter should allow to override configurations via config file. We could have properties like line-length-limit: X and then break to new line only when the method name is bigger than what is set in the config.

The expected output I'd like to get from the above example is:

@Test
void i_am_a_long_method_name_that_will_break_into_a_new_line_but_I_should_not_and_allow_something_to_override_it_and_customize_according_what_the_users_want() {}
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

1 participant