Questions tagged [uncrustify]

Source Code Beautifier for C, C++, C#, ObjectiveC, D, Java, Pawn and VALA

Uncrustify is an open source project, with a goal to create a highly configurable, easily modifiable source code beautifier.

Features :

  • Ident code, aligning on parens, assignments, etc
  • Align on '=' and variable definitions
  • Align structure initializers
  • Align #define stuff
  • Align backslash-newline stuff
  • Reformat comments (a little bit)
  • Fix inter-character spacing
  • Add or remove parens on return statements
  • Add or remove braces on single-statement if/do/while/for statements
  • Supports embedded SQL 'EXEC SQL' stuff
  • Highly configurable - 515 configurable options as of version 0.63
144 questions
0
votes
1 answer

Is there a way for Uncrustify to return the style differences and not to correct them?

I'm using Uncrustify for some code styling in Obj-C, but I want to notify the developer what he is doing wrong and let him modify the code Is there a way to use this in order to get the code style differences? Thanks
Omer
  • 5,470
  • 8
  • 39
  • 64
0
votes
0 answers

Uncrustify Formatter error when code contains single hash characters

I am using the Uncrustify plugin for Xcode5 (BBUncrustifyPlugin) to format my code nicely. However when formatting the active file it gives the errors: Uncrustify Formatter error: Parsing: XDImageViewController.m as language…
MungoRae
  • 1,912
  • 1
  • 16
  • 25
0
votes
0 answers

Indentation on multi-line conditions

If we write long if-conditions in objective-c, we do the following (we try to stay below 100 or 120 chars per line): if ( foo && [foo bar] && [[foo bar] isKindOfClass:[something class]]) { [foo something]; ... } Meaning:…
Tobias
  • 1,220
  • 17
  • 35
0
votes
1 answer

error with Uncrustify in xcode for an ios app

I have installed the uncrustify through brew (as per the git instructions), and I have added the run script build phase to the xcode and tried to build an ios project, but the build is failing with the following error: **/bin/sh:…
Ravi Kiran
  • 691
  • 3
  • 9
  • 22
0
votes
0 answers

How to align C++ member access continuation on column?

How can I configure, if possible, Uncrustify to format the following code MyObject obj; obj.a_func_returning_another_object().get_a_pointer_function()->do_stuff(); AnotherObject* objPointer = new…
Torbjörn
  • 5,512
  • 7
  • 46
  • 73
0
votes
2 answers

Reformating c++ code?

How do I reformat the 'for' statement separated into three lines into one, in a automatically generated c++ code? I tried uncrustify, but I could not make it format the parts within parenthesis. sed seems not suitable for this. Could any one suggest…
user22097
  • 229
  • 3
  • 13
0
votes
2 answers

Uncrustify turning newline characters that are part of a string into actual new lines

The following Objective-C code in XCode (which compiles) NSString *someString = @"Lorem ipsum dolor.\nEget nisl nec risus"; after running Uncrustify becomes NSString *someString = @"Lorem ipsum dolor. Eget nisl nec risus"; which doesn't compile.…
Nate Cook
  • 8,395
  • 5
  • 46
  • 37
0
votes
1 answer

Format initialization list different from function parameter lists

I have as a C++ class constuctor Status::Status(QObject *parent) : QObject(parent) , m_currentPage(Status::UndefinedPage) , m_lastPage(Status::UndefinedPage) , m_currentSubPage(Status::UndefinedSubPage),…
Lorenz
  • 503
  • 2
  • 9
0
votes
2 answers

Running Uncrustify by selecting Behavior in Xcode does nothing

I installed Uncrustify as per the instructions here: http://noiseandheat.com/blog/2012/01/uncrustifying-objective-c-source-in-xcode-4/ Used brew for installation and added new behavior in Xcode(4.3.2) preferences. However running the behavior from…
NSExplorer
  • 11,849
  • 12
  • 49
  • 62
1 2 3
9
10