Repository navigation
Fix newline between function name and open paren - #1356
Conversation
|
Good catch. I did not notice this change in the first PR. Could you change the tests so that both variants are available: and It would also be nice if you could add a comment to the options that are going to be overridden. The reason for this is that at some point I will continue to clean up the tests so that unnecessary options are going to be removed. See option_reducer.py, that script unfortunately bluntly removes unneeded options, including the ones that are going to be overridden. A comment in there would save up a lot of time while validating the results of this process. |
|
So as input the tests would look like: and And the ouptuts would respectively look like: and That's what we are looking for right? And should I add those comments in the config files for the tests? |
almost, in the first variant the parenthesis should be on the line with # Add or remove newline between a function name and the opening '(' in the declaration.
nl_func_paren = force # ignore/add/remove/force
# Overrides nl_func_paren for functions with no parameters.
nl_func_paren_empty = remove # ignore/add/remove/forceThe option description do not mention this, so I guess it should not.
into the config files |
|
Okay for this input: The output would be unchanged, since our config is to remove the newline between the function name and the open paren. |
|
In that case these inputs: should create those outputs: |
|
Correct. I will include all those permutations in the tests. |
The current test cases don't accurately test what these options are supposed to do, and the current implementation doesn't work correctly either. This fixes both the implementation and test cases so that they correctly format the newline between the function name and open paren. Also adds the options that these override, to prove they do in fact override them. Change-Id: Ibe2e45d254b558cbe9820769ffa5ed0e5a446532 Type: Bug Fix
26bfee4 to
f511cb9
Compare
The current test cases don't accurately test what these
options are supposed to do, and the current implementation
doesn't work correctly either. This fixes both the
implementation and test cases so that they correctly format
the newline between the function name and open paren. Also
adds the options that these override, to prove they do in
fact override them.