uncrustify

Uncrustify Collapse Multiline Function Call

穿精又带淫゛_ 提交于 2020-06-12 08:32:31
问题 I have function calls that look like this (for no apparent reason): func ( a, b, c ) Is there a way to make uncrustify collapse the function into a single line? I have been trying for two days not on and off... I got it to work for function declarations, but I don't get it to work for function calls. While we are at it I also have functions that look like so: func ( a, // (IN) the A b, // (IN) something b c // (OUT) the resulting value ) Is there a way to handle that case too, without

Uncrustify Collapse Multiline Function Call

自古美人都是妖i 提交于 2020-06-12 08:32:12
问题 I have function calls that look like this (for no apparent reason): func ( a, b, c ) Is there a way to make uncrustify collapse the function into a single line? I have been trying for two days not on and off... I got it to work for function declarations, but I don't get it to work for function calls. While we are at it I also have functions that look like so: func ( a, // (IN) the A b, // (IN) something b c // (OUT) the resulting value ) Is there a way to handle that case too, without

Ensure coding-style during a git commit [closed]

风流意气都作罢 提交于 2020-01-01 05:29:05
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . Im my company i set-up a continuous integration test and i run the tests when someone push the code on the server. Now i want to check that the code match with the our basic coding rules, the first rule is "run mogrify on your code!" There is something to do this check "out the shelf"? the output of this analisys

Uncrustify option to leave whitespace on blank lines

此生再无相见时 提交于 2019-12-23 10:24:12
问题 I'm trying to find the option that leaves whitespace on blank lines. Currently uncrustify will strip all trailing whitespace (good!), however I want to keep whitespace if it's on a blank line, because it's generally to the indent level. Is this a blank line nl_* option, or an indentation indent_* option? I can't find one to do what I want, or even to control the trailing whitespace option! It just does it by default. 回答1: I received a response from Ben Gardner, the project lead, who had this

ctags multi-line C function prototypes

穿精又带淫゛_ 提交于 2019-12-13 11:37:10
问题 Is there a way for ctags to handle multiline function prototypes in C? I've searched around and the --fields=+S is supposed to do multiline prototypes, but I can't get it to work: ctags -x --c-kinds=pf --fields=+S file file: int foo(int x, int y ); ctags only returns: foo(int (Note that the return type is also missing) Ultimately I would like to get an output similar to int foo(int x, int y); or int foo(int x, int y is --fields=+S not the correct way? Are there part of the ctags fields that I

Uncrustify - How do I align trailing comments by two-space gap?

可紊 提交于 2019-12-11 04:09:53
问题 After I applied Atom Beautify on my code using Uncrustify, the trailing comments are aligned as follow: unsigned int redLEDValue = 0; // redLED unsigned int blueLEDValue = 0; // blueLED unsigned int greenLEDValue = 0; // greenLED unsigned int redSensorValue = 0; // redSensor unsigned int blueSensorValue = 0; // blueSensor unsigned int greenSensorValue = 0; // greenSensor There is only once space between the semicolon and the trailing comment, but I want to have at least 2 spaces between them.

Uncrustify split function call parameters

∥☆過路亽.° 提交于 2019-12-10 17:18:58
问题 I want to format the code like this: a) line width maximum 120 b)- function call parameters one per line with indent if the length of the function is called is > 120 else function call in one line c)- it the function call is inside a if, for, while, etc... the parameters should be formatted as written at b) I have the code (it is just a fictive): void a_function() { if(verify_if_the_conditions_are_meet(first_parameter, second_parameter, third_parameter, fourth_parameter, fifth_parameter,

Align on colons in Objective-C headers

社会主义新天地 提交于 2019-12-06 07:53:36
问题 I want to use uncrustify to align my parameters on colon, and have some limited success. Using the information in Can Uncrustify align colons in Objective-C method calls? I have the following in my config file: align_oc_decl_colon = true align_oc_msg_colon_span = 20 My .m -files look great, like this: - (id)initWithStreetName:(NSString *)streetName areaCode:(NSString *)areaCode city:(NSString *)city country:(NSString *)country positionLatitude:(NSString *)positionLatitude positionLongitude:

Align on colons in Objective-C headers

回眸只為那壹抹淺笑 提交于 2019-12-04 12:31:45
I want to use uncrustify to align my parameters on colon, and have some limited success. Using the information in Can Uncrustify align colons in Objective-C method calls? I have the following in my config file: align_oc_decl_colon = true align_oc_msg_colon_span = 20 My .m -files look great, like this: - (id)initWithStreetName:(NSString *)streetName areaCode:(NSString *)areaCode city:(NSString *)city country:(NSString *)country positionLatitude:(NSString *)positionLatitude positionLongitude:(NSString *)positionLongitude serverAssignmentId:(NSString *)serverAssignmentId comment:(NSString *

Blank line after curly brace in function with uncrustify

最后都变了- 提交于 2019-12-04 10:33:09
I have configured xcode to use Uncrustify to beautify the code. I modified the Uncrustify configuration file and the resulting code is almost as desired. One thing I don't like is the removal of a blank line between a closing curly brace and the next line of code. For example, this is what Uncrustify currently does: Input: if (jsonData != NULL) { return [jsonData objectFromJSONData]; } NSLog(@"Data read"); Current output: if (jsonData != NULL) { return [jsonData objectFromJSONData]; } NSLog(@"Data read"); The desired output would be, in this case, the same as the input: if (jsonData != NULL) {