├── images └── .gitkeep ├── .gitignore ├── Makefile ├── src ├── graphics.vala ├── main.vala ├── config.vala └── net.vala └── uncrustify.vala.cfg /images/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /settings.json 2 | /eveminmon 3 | /images 4 | 5 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | TARGET := eveminmon 2 | SRCS := src/*.vala 3 | 4 | ${TARGET}: ${SRCS} 5 | uncrustify -c uncrustify.vala.cfg --replace --no-backup ${SRCS} 6 | valac --output ${TARGET} --pkg gio-2.0 --pkg libsoup-2.4 --pkg gtk+-3.0 --pkg librsvg-2.0 \ 7 | --pkg json-glib-1.0 --pkg posix \ 8 | --pkg lua -X '-I/usr/include/lua5.3' -X '-llua5.3' ${SRCS} 9 | 10 | watch: 11 | while true; do inotifywait -r src -e MODIFY; make; done 12 | -------------------------------------------------------------------------------- /src/graphics.vala: -------------------------------------------------------------------------------- 1 | class Graphics { 2 | public static void setup (string[] args) { 3 | Gtk.init (ref args); 4 | try { 5 | Gtk.Window.set_default_icon_from_file ("icon.svg"); 6 | } catch (GLib.Error e) { 7 | } 8 | } 9 | } 10 | 11 | class Window : Gtk.Window { 12 | 13 | Gtk.Label character_name; 14 | Gtk.Label station_name; 15 | Gtk.Image character_profile; 16 | Gtk.Image ship_image; 17 | Gtk.Label ship_name; 18 | 19 | public Window () { 20 | var vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 2); 21 | var title_label = new Gtk.Label ("EVE MinMon"); 22 | vbox.add (title_label); 23 | character_name = new Gtk.Label ("-"); 24 | vbox.add (character_name); 25 | add (vbox); 26 | station_name = new Gtk.Label ("-"); 27 | vbox.add (station_name); 28 | add (vbox); 29 | character_profile = new Gtk.Image.from_file ("images/blank.png"); 30 | vbox.add (character_profile); 31 | add (vbox); 32 | ship_image = new Gtk.Image.from_file ("images/blank.png"); 33 | vbox.add (ship_image); 34 | add (vbox); 35 | ship_name = new Gtk.Label ("-"); 36 | vbox.add (ship_name); 37 | add (vbox); 38 | show_all (); 39 | } 40 | 41 | public void setCharacterName (string title) { 42 | character_name.set_markup (title); 43 | } 44 | 45 | public void setStationId (string title) { 46 | station_name.set_markup (title); 47 | } 48 | 49 | public void setImage (int64 id) { 50 | var filename = "images/" + id.to_string () + ".jpg"; 51 | stdout.printf ("setting img from file " + filename + "\n"); 52 | character_profile.set_from_file (filename); 53 | } 54 | 55 | public void setShipImage (int64 id) { 56 | var filename = "images/" + id.to_string () + ".png"; 57 | stdout.printf ("setting img from file " + filename + "\n"); 58 | ship_image.set_from_file (filename); 59 | } 60 | 61 | public void setShipName (string name) { 62 | ship_name.set_markup (name); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main.vala: -------------------------------------------------------------------------------- 1 | int main (string[] args) { 2 | var config = new Config (); 3 | var net = new Net (config); 4 | 5 | if (!config.has_refresh_token ()) { 6 | config.give_oauth_step1 (); 7 | var token = net.wait_token (); 8 | if (token != null) { 9 | config.set_refresh_token (token); 10 | } 11 | } 12 | 13 | game_loop (config, net); 14 | return 0; 15 | } 16 | 17 | void game_loop (Config config, Net net) { 18 | 19 | var loop = new MainLoop (); 20 | Graphics.setup ({}); 21 | var window = new Window (); 22 | window.destroy.connect (loop.quit); 23 | 24 | 25 | net.refresh_access_token ((token) => { 26 | stdout.printf ("got token %s\n", token); 27 | api_loop (token, net, window); 28 | Timeout.add (30000, () => api_loop (token, net, window)); 29 | }); 30 | 31 | loop.run (); 32 | } 33 | 34 | bool api_loop (string token, Net net, Window window) { 35 | var jo = net.api (token, "https://login.eveonline.com/oauth/verify"); 36 | var name = jo.get_string_member ("CharacterName"); 37 | stdout.printf ("Hello %s.\n", name); 38 | window.setCharacterName (name); 39 | net.getCharacterImage (jo.get_int_member ("CharacterID")); 40 | window.setImage (jo.get_int_member ("CharacterID")); 41 | var location = net.api (token, "https://esi.tech.ccp.is/latest/characters/" + jo.get_int_member ("CharacterID").to_string () + "/location/"); 42 | var skills = net.api (token, "https://esi.tech.ccp.is/latest/characters/" + jo.get_int_member ("CharacterID").to_string () + "/skills/"); 43 | var station = net.api (token, "https://esi.tech.ccp.is/latest/universe/stations/" + location.get_int_member ("station_id").to_string () + "/"); 44 | var station_name_parts = station.get_string_member ("name").split ("-"); 45 | window.setStationId (station_name_parts[0]); 46 | stdout.printf ("station name %s\n", station.get_string_member ("name")); 47 | var ship = net.api (token, "https://esi.tech.ccp.is/latest/characters/" + jo.get_int_member ("CharacterID").to_string () + "/ship/"); 48 | net.getShipImage (ship.get_int_member ("ship_type_id")); 49 | window.setShipImage (ship.get_int_member ("ship_type_id")); 50 | window.setShipName (ship.get_string_member ("ship_name")); 51 | 52 | var status = net.api (token, "https://esi.tech.ccp.is/latest/status/"); 53 | /* {"start_time":"2018-03-13T11:08:44Z","players":23245,"server_version":"1268960"} */ 54 | 55 | return true; 56 | } 57 | -------------------------------------------------------------------------------- /src/config.vala: -------------------------------------------------------------------------------- 1 | using Json; 2 | 3 | class Config { 4 | public string oauth_url; 5 | public string refresh_token; 6 | public string client_id; 7 | public string client_secret; 8 | 9 | public string config_filename = "settings.json"; 10 | public string oauth_scope = "characterLocationRead characterNavigationWrite characterSkillsRead characterAccountRead esi-location.read_location.v1 esi-location.read_ship_type.v1 esi-skills.read_skills.v1 esi-skills.read_skillqueue.v1 esi-fittings.read_fittings.v1 esi-fittings.write_fittings.v1"; 11 | 12 | public Config () { 13 | try { 14 | var jobject = read_file (config_filename); 15 | refresh_config (jobject); 16 | } catch (Error e) { 17 | stdout.printf ("Unable to parse `%s': %s\n", config_filename, e.message); 18 | } 19 | } 20 | 21 | public void set_refresh_token (string token) { 22 | stdout.printf ("set refresh %s\n", token); 23 | refresh_token = token; 24 | save_config (); 25 | } 26 | 27 | public void save_config () { 28 | try { 29 | var jobject = read_file (config_filename); 30 | freeze_config (jobject); 31 | write_file (jobject, config_filename); 32 | } catch (Error e) { 33 | stdout.printf ("Unable to parse `%s': %s\n", config_filename, e.message); 34 | } 35 | } 36 | 37 | public bool has_refresh_token () { 38 | return refresh_token != null && refresh_token.length > 0; 39 | } 40 | 41 | public void give_oauth_step1 () { 42 | var step1 = "https://login.eveonline.com/oauth/authorize/?response_type=code&redirect_uri=http://localhost:8081/&client_id=f523af04922f4256bbd3d295ce60ca89&scope=" 43 | + Soup.URI.encode (oauth_scope, "") + "&state=uniquestate123"; 44 | stdout.printf ("%s\n", step1); 45 | } 46 | 47 | void refresh_config (Json.Object settings) { 48 | oauth_url = settings.get_string_member ("oauth_url"); 49 | refresh_token = settings.get_string_member ("refresh_token"); 50 | client_id = settings.get_string_member ("client_id"); 51 | client_secret = settings.get_string_member ("client_secret"); 52 | } 53 | 54 | Json.Object freeze_config (Json.Object settings) { 55 | settings.set_string_member ("refresh_token", refresh_token); 56 | return settings; 57 | } 58 | 59 | void write_file (Json.Object settings, string filename) throws GLib.Error { 60 | var gen = new Generator (); 61 | var wtfnode = new Json.Node (Json.NodeType.OBJECT); 62 | wtfnode.init_object (settings); 63 | gen.set_pretty (true); 64 | gen.set_root (wtfnode); 65 | size_t length; 66 | string json = gen.to_data (out length); 67 | stdout.printf ("write_file json: %s\n", json); 68 | GLib.FileUtils.set_contents (filename, json); 69 | } 70 | 71 | Json.Object read_file (string filename) throws GLib.Error { 72 | // Load a file: 73 | Json.Parser parser = new Json.Parser (); 74 | parser.load_from_file (filename); 75 | Json.Object settings = parser.get_root ().get_object (); 76 | return settings; 77 | } 78 | } 79 | 80 | -------------------------------------------------------------------------------- /src/net.vala: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | using Json; 4 | 5 | delegate void TokenCall (string a); 6 | 7 | class Net { 8 | Config config; 9 | 10 | public Net (Config config) { 11 | this.config = config; 12 | } 13 | 14 | public string ? wait_token () { 15 | InetAddress address = new InetAddress.loopback (SocketFamily.IPV4); 16 | InetSocketAddress inetaddress = new InetSocketAddress (address, 8081); 17 | 18 | string token = null; 19 | try { 20 | Socket socket = new Socket (SocketFamily.IPV4, SocketType.STREAM, SocketProtocol.TCP); 21 | assert (socket != null); 22 | 23 | socket.bind (inetaddress, true); 24 | socket.set_listen_backlog (10); 25 | socket.listen (); 26 | stdout.printf ("socket listen\n"); 27 | 28 | Socket connection = socket.accept (); 29 | stdout.printf ("Connected \n"); 30 | 31 | uint8 buffer[150]; 32 | ssize_t len; 33 | 34 | len = connection.receive (buffer); 35 | var line = dataToStr (buffer, (int) len); 36 | if (line.substring (0, 11) == "GET /?code=") { 37 | var auth_token = line.substring (11, 65); 38 | stdout.printf ("TOKEN FOUND %s\n", auth_token); 39 | token = auth_to_access (auth_token); 40 | } else { 41 | stdout.printf ("oauth token not found in %s\n", line); 42 | } 43 | } catch (GLib.Error e) { 44 | stdout.printf ("socket err %s", e.message); 45 | } 46 | return token; 47 | } 48 | 49 | public Json.Object api (string token, string url) { 50 | var session = new Soup.Session (); 51 | stdout.printf ("api %s\n", url); 52 | var message = new Soup.Message ("GET", url); 53 | message.got_headers.connect (() => { 54 | message.request_headers.foreach ((name, val) => { 55 | }); 56 | }); 57 | 58 | message.request_headers.replace ("Authorization", "Bearer " + token); 59 | session.send_message (message); 60 | message.response_headers.foreach ((name, val) => { 61 | }); 62 | stdout.printf ("api body: %s\n", bodyToData (message.response_body)); 63 | string body = bodyToData (message.response_body); 64 | var node = strToObject (body); 65 | return node; 66 | } 67 | 68 | public string auth_to_access (string token) { 69 | var session = new Soup.Session (); 70 | 71 | var verb = "post"; 72 | var url = config.oauth_url; 73 | var authUri = new Soup.URI (url); 74 | authUri.set_user (config.client_id); 75 | authUri.set_password (config.client_secret); 76 | var message = new Soup.Message.from_uri (verb, authUri); 77 | 78 | var formdata = "grant_type=authorization_code&code=" + token; 79 | message.request_headers.replace ("Authorization", "Basic YTpi"); 80 | message.set_request ("application/x-www-form-urlencoded", Soup.MemoryUse.COPY, formdata.data); 81 | session.send_message (message); 82 | string body = bodyToData (message.response_body); 83 | stdout.printf ("auth to access %s\n", body); 84 | var oauth_response = strToObject (body); 85 | return oauth_response.get_string_member ("refresh_token"); 86 | } 87 | 88 | public bool refresh_access_token (TokenCall tcall) { 89 | var session = new Soup.Session (); 90 | 91 | var verb = "post"; 92 | var url = config.oauth_url; 93 | var authUri = new Soup.URI (url); 94 | authUri.set_user (config.client_id); 95 | authUri.set_password (config.client_secret); 96 | var request = new Soup.Message.from_uri (verb, authUri); 97 | 98 | var formdata = "grant_type=refresh_token&refresh_token=" + config.refresh_token; 99 | request.request_headers.replace ("Authorization", "Basic YTpi"); 100 | request.set_request ("application/x-www-form-urlencoded", Soup.MemoryUse.COPY, formdata.data); 101 | 102 | session.queue_message (request, (sess, response) => { 103 | stderr.printf ("token refresh status: %u\n", response.status_code); 104 | if (response.status_code != 200) { 105 | response.response_headers.foreach ((name, val) => { 106 | stdout.printf ("resp %s: %s\n", name, val); 107 | }); 108 | } 109 | 110 | string body = bodyToData (response.response_body); 111 | var node = strToObject (body); 112 | tcall (node.get_string_member ("access_token")); 113 | }); 114 | 115 | return true; 116 | } 117 | 118 | public void getCharacterImage (int64 id) { 119 | getImage ("Character", id, "jpg"); 120 | } 121 | 122 | public void getShipImage (int64 id) { 123 | getImage ("Render", id, "png"); 124 | } 125 | 126 | public void getImage (string section, int64 id, string imgtype) { 127 | var filename = "images/" + id.to_string () + "." + imgtype; 128 | var file = File.new_for_path (filename); 129 | if (!file.query_exists ()) { 130 | stdout.printf ("Character image %s missing. requesting. \n", filename); 131 | var session = new Soup.Session (); 132 | var url = "https://imageserver.eveonline.com/" + section + "/" + id.to_string () + "_128." + imgtype; 133 | stdout.printf ("%s \n", url); 134 | var message = new Soup.Message ("GET", url); 135 | session.send_message (message); 136 | try { 137 | GLib.FileUtils.set_data (filename, message.response_body.data); 138 | stdout.printf ("file write %s: %d bytes\n", filename, (int) message.response_body.length); 139 | } catch (GLib.FileError e) { 140 | stdout.printf ("file write err `%s': %s\n", filename, e.message); 141 | } 142 | } 143 | } 144 | 145 | Json.Object strToObject (string json) { 146 | var obj = new Json.Object (); 147 | try { 148 | Json.Parser parser = new Json.Parser (); 149 | parser.load_from_data (json); 150 | return parser.get_root ().get_object (); 151 | } catch (Error e) { 152 | stdout.printf ("Unable to parse `%s': %s\n", json, e.message); 153 | } 154 | return obj; 155 | } 156 | 157 | string bodyToData (Soup.MessageBody body) { 158 | return dataToStr (body.data, (int) body.length); 159 | } 160 | 161 | string dataToStr (uint8[] data, int length) { 162 | string bodystr = ""; 163 | for (int i = 0; i < length; i++) { 164 | char newchar = (char) data[i]; 165 | bodystr += newchar.to_string (); 166 | } 167 | return bodystr; 168 | } 169 | } 170 | -------------------------------------------------------------------------------- /uncrustify.vala.cfg: -------------------------------------------------------------------------------- 1 | # Uncrustify 0.60 2 | # Rules for vala 3 | # Version: 0.5 4 | # Refactored to match the style used on this project: https://github.com/GNOME/vala 5 | 6 | # 7 | # General options 8 | # 9 | 10 | # The type of line endings 11 | newlines = auto # auto/lf/crlf/cr 12 | 13 | # The original size of tabs in the input 14 | input_tab_size = 8 # number 15 | 16 | # The size of tabs in the output (only used if align_with_tabs=true) 17 | output_tab_size = 4 # number 18 | 19 | # The ASCII value of the string escape char, usually 92 (\) or 94 (^). (Pawn) 20 | string_escape_char = 92 # number 21 | 22 | # Alternate string escape char for Pawn. Only works right before the quote char. 23 | string_escape_char2 = 0 # number 24 | 25 | # Allow interpreting '>=' and '>>=' as part of a template in 'void f(list>=val);'. 26 | # If true (default), 'assert(x<0 && y>=3)' will be broken. 27 | # Improvements to template detection may make this option obsolete. 28 | tok_split_gte = false # false/true 29 | 30 | # Control what to do with the UTF-8 BOM (recommend 'remove') 31 | utf8_bom = ignore # ignore/add/remove/force 32 | 33 | # If the file contains bytes with values between 128 and 255, but is not UTF-8, then output as UTF-8 34 | utf8_byte = false # false/true 35 | 36 | # Force the output encoding to UTF-8 37 | utf8_force = false # false/true 38 | 39 | # 40 | # Indenting 41 | # 42 | 43 | # The number of columns to indent per level. 44 | # Usually 2, 3, 4, or 8. 45 | indent_columns = 4 # number 46 | 47 | # The continuation indent. If non-zero, this overrides the indent of '(' and '=' continuation indents. 48 | # For FreeBSD, this is set to 4. Negative value is absolute and not increased for each ( level 49 | indent_continue = 0 # number 50 | 51 | # How to use tabs when indenting code 52 | # 0=spaces only 53 | # 1=indent with tabs to brace level, align with spaces 54 | # 2=indent and align with tabs, using spaces when not on a tabstop 55 | indent_with_tabs = 0 # number 56 | 57 | # Comments that are not a brace level are indented with tabs on a tabstop. 58 | # Requires indent_with_tabs=2. If false, will use spaces. 59 | indent_cmt_with_tabs = false # false/true 60 | 61 | # Whether to indent strings broken by '\' so that they line up 62 | indent_align_string = false # false/true 63 | 64 | # The number of spaces to indent multi-line XML strings. 65 | # Requires indent_align_string=True 66 | indent_xml_string = 0 # number 67 | 68 | # Spaces to indent '{' from level 69 | indent_brace = 0 # number 70 | 71 | # Whether braces are indented to the body level 72 | indent_braces = false # false/true 73 | 74 | # Disabled indenting function braces if indent_braces is true 75 | indent_braces_no_func = false # false/true 76 | 77 | # Disabled indenting class braces if indent_braces is true 78 | indent_braces_no_class = false # false/true 79 | 80 | # Disabled indenting struct braces if indent_braces is true 81 | indent_braces_no_struct = false # false/true 82 | 83 | # Indent based on the size of the brace parent, i.e. 'if' => 3 spaces, 'for' => 4 spaces, etc. 84 | indent_brace_parent = false # false/true 85 | 86 | # Whether the 'namespace' body is indented 87 | indent_namespace = true # false/true 88 | 89 | # The number of spaces to indent a namespace block 90 | indent_namespace_level = 0 # number 91 | 92 | # If the body of the namespace is longer than this number, it won't be indented. 93 | # Requires indent_namespace=true. Default=0 (no limit) 94 | indent_namespace_limit = 0 # number 95 | 96 | # Whether the 'extern "C"' body is indented 97 | indent_extern = false # false/true 98 | 99 | # Whether the 'class' body is indented 100 | indent_class = true # false/true 101 | 102 | # Whether to indent the stuff after a leading class colon 103 | indent_class_colon = false # false/true 104 | # Whether to indent the stuff after a leading class initializer colon 105 | indent_constr_colon = false # false/true 106 | 107 | # Virtual indent from the ':' for member initializers. Default is 2 108 | indent_ctor_init_leading = 2 # number 109 | 110 | # Additional indenting for constructor initializer list 111 | indent_ctor_init = 0 # number 112 | 113 | # False=treat 'else\nif' as 'else if' for indenting purposes 114 | # True=indent the 'if' one level 115 | indent_else_if = false # false/true 116 | 117 | # Amount to indent variable declarations after a open brace. neg=relative, pos=absolute 118 | indent_var_def_blk = 0 # number 119 | 120 | # Indent continued variable declarations instead of aligning. 121 | indent_var_def_cont = false # false/true 122 | 123 | # True: force indentation of function definition to start in column 1 124 | # False: use the default behavior 125 | indent_func_def_force_col1 = false # false/true 126 | 127 | # True: indent continued function call parameters one indent level 128 | # False: align parameters under the open paren 129 | indent_func_call_param = false # false/true 130 | 131 | # Same as indent_func_call_param, but for function defs 132 | indent_func_def_param = false # false/true 133 | 134 | # Same as indent_func_call_param, but for function protos 135 | indent_func_proto_param = false # false/true 136 | 137 | # Same as indent_func_call_param, but for class declarations 138 | indent_func_class_param = false # false/true 139 | 140 | # Same as indent_func_call_param, but for class variable constructors 141 | indent_func_ctor_var_param = false # false/true 142 | 143 | # Same as indent_func_call_param, but for templates 144 | indent_template_param = false # false/true 145 | 146 | # Double the indent for indent_func_xxx_param options 147 | indent_func_param_double = false # false/true 148 | 149 | # Indentation column for standalone 'const' function decl/proto qualifier 150 | indent_func_const = 0 # number 151 | 152 | # Indentation column for standalone 'throw' function decl/proto qualifier 153 | indent_func_throw = 0 # number 154 | 155 | # The number of spaces to indent a continued '->' or '.' 156 | # Usually set to 0, 1, or indent_columns. 157 | indent_member = 1 # number 158 | 159 | # Spaces to indent single line ('//') comments on lines before code 160 | indent_sing_line_comments = 0 # number 161 | 162 | # If set, will indent trailing single line ('//') comments relative 163 | # to the code instead of trying to keep the same absolute column 164 | indent_relative_single_line_comments = false # false/true 165 | 166 | # Spaces to indent 'case' from 'switch' 167 | # Usually 0 or indent_columns. 168 | indent_switch_case = 0 # number 169 | 170 | # Spaces to shift the 'case' line, without affecting any other lines 171 | # Usually 0. 172 | indent_case_shift = 0 # number 173 | 174 | # Spaces to indent '{' from 'case'. 175 | # By default, the brace will appear under the 'c' in case. 176 | # Usually set to 0 or indent_columns. 177 | indent_case_brace = 0 # number 178 | 179 | # Whether to indent comments found in first column 180 | indent_col1_comment = false # false/true 181 | 182 | # How to indent goto labels 183 | # >0 : absolute column where 1 is the leftmost column 184 | # <=0 : subtract from brace indent 185 | indent_label = 1 # number 186 | 187 | # Same as indent_label, but for access specifiers that are followed by a colon 188 | indent_access_spec = 1 # number 189 | 190 | # Indent the code after an access specifier by one level. 191 | # If set, this option forces 'indent_access_spec=0' 192 | indent_access_spec_body = false # false/true 193 | 194 | # If an open paren is followed by a newline, indent the next line so that it lines up after the open paren (not recommended) 195 | indent_paren_nl = false # false/true 196 | 197 | # Controls the indent of a close paren after a newline. 198 | # 0: Indent to body level 199 | # 1: Align under the open paren 200 | # 2: Indent to the brace level 201 | indent_paren_close = 0 # number 202 | 203 | # Controls the indent of a comma when inside a paren.If TRUE, aligns under the open paren 204 | indent_comma_paren = false # false/true 205 | 206 | # Controls the indent of a BOOL operator when inside a paren.If TRUE, aligns under the open paren 207 | indent_bool_paren = false # false/true 208 | 209 | # If 'indent_bool_paren' is true, controls the indent of the first expression. If TRUE, aligns the first expression to the following ones 210 | indent_first_bool_expr = false # false/true 211 | 212 | # If an open square is followed by a newline, indent the next line so that it lines up after the open square (not recommended) 213 | indent_square_nl = false # false/true 214 | 215 | # Don't change the relative indent of ESQL/C 'EXEC SQL' bodies 216 | indent_preserve_sql = false # false/true 217 | 218 | # Align continued statements at the '='. Default=True 219 | # If FALSE or the '=' is followed by a newline, the next line is indent one tab. 220 | indent_align_assign = true # false/true 221 | 222 | # Indent OC blocks at brace level instead of usual rules. 223 | indent_oc_block = false # false/true 224 | 225 | # Indent OC blocks in a message relative to the parameter name. 226 | # 0=use indent_oc_block rules, 1+=spaces to indent 227 | indent_oc_block_msg = 0 # number 228 | 229 | # Minimum indent for subsequent parameters 230 | indent_oc_msg_colon = 0 # number 231 | 232 | # Objective C 233 | 234 | # If true, prioritize aligning with initial colon (and stripping spaces from lines, if necessary). 235 | # Default is true. 236 | indent_oc_msg_prioritize_first_colon = true 237 | 238 | # If indent_oc_block_msg and this option are on, blocks will be indented the way that Xcode does by default (from keyword if the parameter is on its own line; otherwise, from the previous indentation level). 239 | indent_oc_block_msg_xcode_style = true 240 | 241 | # If indent_oc_block_msg and this option are on, blocks will be indented from where the brace is relative to a msg keyword. 242 | indent_oc_block_msg_from_keyword = true 243 | 244 | # If indent_oc_block_msg and this option are on, blocks will be indented from where the brace is relative to a msg colon. 245 | indent_oc_block_msg_from_colon = true 246 | 247 | # If indent_oc_block_msg and this option are on, blocks will be indented from where the block caret is. 248 | indent_oc_block_msg_from_caret = true 249 | 250 | # If indent_oc_block_msg and this option are on, blocks will be indented from where the brace is. 251 | indent_oc_block_msg_from_brace = true 252 | 253 | # 254 | # Spacing options 255 | # 256 | 257 | # Add or remove space around arithmetic operator '+', '-', '/', '*', etc 258 | sp_arith = force # ignore/add/remove/force 259 | 260 | # Add or remove space around assignment operator '=', '+=', etc 261 | sp_assign = force # ignore/add/remove/force 262 | 263 | # Add or remove space around '=' in C++11 lambda capture specifications. Overrides sp_assign 264 | sp_cpp_lambda_assign = force # ignore/add/remove/force 265 | 266 | # Add or remove space after the capture specification in C++11 lambda. 267 | sp_cpp_lambda_paren = force # ignore/add/remove/force 268 | 269 | # Add or remove space around assignment operator '=' in a prototype 270 | sp_assign_default = force # ignore/add/remove/force 271 | 272 | # Add or remove space before assignment operator '=', '+=', etc. Overrides sp_assign. 273 | sp_before_assign = force # ignore/add/remove/force 274 | 275 | # Add or remove space after assignment operator '=', '+=', etc. Overrides sp_assign. 276 | sp_after_assign = force # ignore/add/remove/force 277 | 278 | # Add or remove space around assignment '=' in enum 279 | sp_enum_assign = force # ignore/add/remove/force 280 | 281 | # Add or remove space before assignment '=' in enum. Overrides sp_enum_assign. 282 | sp_enum_before_assign = ignore # ignore/add/remove/force 283 | 284 | # Add or remove space after assignment '=' in enum. Overrides sp_enum_assign. 285 | sp_enum_after_assign = force # ignore/add/remove/force 286 | 287 | # Add or remove space around preprocessor '##' concatenation operator. Default=Add 288 | sp_pp_concat = add # ignore/add/remove/force 289 | 290 | # Add or remove space after preprocessor '#' stringify operator. Also affects the '#@' charizing operator. 291 | sp_pp_stringify = ignore # ignore/add/remove/force 292 | 293 | # Add or remove space before preprocessor '#' stringify operator as in '#define x(y) L#y'. 294 | sp_before_pp_stringify = ignore # ignore/add/remove/force 295 | 296 | # Add or remove space around boolean operators '&&' and '||' 297 | sp_bool = force # ignore/add/remove/force 298 | 299 | # Add or remove space around compare operator '<', '>', '==', etc 300 | sp_compare = force # ignore/add/remove/force 301 | 302 | # Add or remove space inside '(' and ')' 303 | sp_inside_paren = remove # ignore/add/remove/force 304 | 305 | # Add or remove space between nested parens 306 | sp_paren_paren = remove # ignore/add/remove/force 307 | 308 | # Add or remove space between back-to-back parens: ')(' vs ') (' 309 | sp_cparen_oparen = remove # ignore/add/remove/force 310 | # Whether to balance spaces inside nested parens 311 | sp_balance_nested_parens = false # false/true 312 | 313 | # Add or remove space between ')' and '{' 314 | sp_paren_brace = force # ignore/add/remove/force 315 | 316 | # Add or remove space before pointer star '*' 317 | sp_before_ptr_star = force # ignore/add/remove/force 318 | 319 | # Add or remove space before pointer star '*' that isn't followed by a variable name 320 | # If set to 'ignore', sp_before_ptr_star is used instead. 321 | sp_before_unnamed_ptr_star = force # ignore/add/remove/force 322 | 323 | # Add or remove space between pointer stars '*' 324 | sp_between_ptr_star = force # ignore/add/remove/force 325 | 326 | # Add or remove space after pointer star '*', if followed by a word. 327 | sp_after_ptr_star = force # ignore/add/remove/force 328 | 329 | # Add or remove space after a pointer star '*', if followed by a func proto/def. 330 | sp_after_ptr_star_func = force # ignore/add/remove/force 331 | 332 | # Add or remove space after a pointer star '*', if followed by an open paren (function types). 333 | sp_ptr_star_paren = force # ignore/add/remove/force 334 | 335 | # Add or remove space before a pointer star '*', if followed by a func proto/def. 336 | sp_before_ptr_star_func = force # ignore/add/remove/force 337 | 338 | # Add or remove space before a reference sign '&' 339 | sp_before_byref = force # ignore/add/remove/force 340 | 341 | # Add or remove space before a reference sign '&' that isn't followed by a variable name 342 | # If set to 'ignore', sp_before_byref is used instead. 343 | sp_before_unnamed_byref = ignore # ignore/add/remove/force 344 | 345 | # Add or remove space after reference sign '&', if followed by a word. 346 | sp_after_byref = ignore # ignore/add/remove/force 347 | 348 | # Add or remove space after a reference sign '&', if followed by a func proto/def. 349 | sp_after_byref_func = remove # ignore/add/remove/force 350 | 351 | # Add or remove space before a reference sign '&', if followed by a func proto/def. 352 | sp_before_byref_func = force # ignore/add/remove/force 353 | 354 | # Add or remove space between type and word. Default=Force 355 | sp_after_type = force # ignore/add/remove/force 356 | 357 | # Add or remove space before the paren in the D constructs 'template Foo(' and 'class Foo('. 358 | sp_before_template_paren = ignore # ignore/add/remove/force 359 | 360 | # Add or remove space in 'template <' vs 'template<'. 361 | # If set to ignore, sp_before_angle is used. 362 | sp_template_angle = ignore # ignore/add/remove/force 363 | 364 | # Add or remove space before '<>' 365 | sp_before_angle = remove # ignore/add/remove/force 366 | 367 | # Add or remove space inside '<' and '>' 368 | sp_inside_angle = remove # ignore/add/remove/force 369 | 370 | # Add or remove space after '<>' 371 | sp_after_angle = remove # ignore/add/remove/force 372 | 373 | # Add or remove space between '<>' and '(' as found in 'new List();' 374 | sp_angle_paren = remove # ignore/add/remove/force 375 | 376 | # Add or remove space between '<>' and a word as in 'List m;' 377 | sp_angle_word = force # ignore/add/remove/force 378 | 379 | # Add or remove space between '>' and '>' in '>>' (template stuff C++/C# only). Default=Add 380 | sp_angle_shift = add # ignore/add/remove/force 381 | 382 | # Permit removal of the space between '>>' in 'foo >' (C++11 only). Default=False 383 | # sp_angle_shift cannot remove the space without this option. 384 | sp_permit_cpp11_shift = false # false/true 385 | 386 | # Add or remove space before '(' of 'if', 'for', 'switch', and 'while' 387 | sp_before_sparen = force # ignore/add/remove/force 388 | 389 | # Add or remove space inside if-condition '(' and ')' 390 | sp_inside_sparen = remove # ignore/add/remove/force 391 | 392 | # Add or remove space before if-condition ')'. Overrides sp_inside_sparen. 393 | sp_inside_sparen_close = ignore # ignore/add/remove/force 394 | 395 | # Add or remove space before if-condition '('. Overrides sp_inside_sparen. 396 | sp_inside_sparen_open = ignore # ignore/add/remove/force 397 | 398 | # Add or remove space after ')' of 'if', 'for', 'switch', and 'while' 399 | sp_after_sparen = remove # ignore/add/remove/force 400 | 401 | # Add or remove space between ')' and '{' of 'if', 'for', 'switch', and 'while' 402 | sp_sparen_brace = force # ignore/add/remove/force 403 | 404 | # Add or remove space between 'invariant' and '(' in the D language. 405 | sp_invariant_paren = ignore # ignore/add/remove/force 406 | 407 | # Add or remove space after the ')' in 'invariant (C) c' in the D language. 408 | sp_after_invariant_paren = ignore # ignore/add/remove/force 409 | 410 | # Add or remove space before empty statement ';' on 'if', 'for' and 'while' 411 | sp_special_semi = remove # ignore/add/remove/force 412 | 413 | # Add or remove space before ';'. Default=Remove 414 | sp_before_semi = remove # ignore/add/remove/force 415 | 416 | # Add or remove space before ';' in non-empty 'for' statements 417 | sp_before_semi_for = remove # ignore/add/remove/force 418 | 419 | # Add or remove space before a semicolon of an empty part of a for statement. 420 | sp_before_semi_for_empty = force # ignore/add/remove/force 421 | 422 | # Add or remove space after ';', except when followed by a comment. Default=Add 423 | sp_after_semi = add # ignore/add/remove/force 424 | 425 | # Add or remove space after ';' in non-empty 'for' statements. Default=Force 426 | sp_after_semi_for = force # ignore/add/remove/force 427 | 428 | # Add or remove space after the final semicolon of an empty part of a for statement: for ( ; ; ). 429 | sp_after_semi_for_empty = force # ignore/add/remove/force 430 | 431 | # Add or remove space before '[' (except '[]') 432 | sp_before_square = remove # ignore/add/remove/force 433 | 434 | # Add or remove space before '[]' 435 | sp_before_squares = remove # ignore/add/remove/force 436 | 437 | # Add or remove space inside a non-empty '[' and ']' 438 | sp_inside_square = remove # ignore/add/remove/force 439 | 440 | # Add or remove space after ',' 441 | sp_after_comma = force # ignore/add/remove/force 442 | 443 | # Add or remove space before ',' 444 | sp_before_comma = remove # ignore/add/remove/force 445 | 446 | # Add or remove space between an open paren and comma: '(,' vs '( ,' 447 | sp_paren_comma = force # ignore/add/remove/force 448 | 449 | # Add or remove space before the variadic '...' when preceded by a non-punctuator 450 | sp_before_ellipsis = remove # ignore/add/remove/force 451 | 452 | # Add or remove space after class ':' 453 | sp_after_class_colon = force # ignore/add/remove/force 454 | 455 | # Add or remove space before class ':' 456 | sp_before_class_colon = force # ignore/add/remove/force 457 | 458 | # Add or remove space after class constructor ':' 459 | sp_after_constr_colon = ignore # ignore/add/remove/force 460 | 461 | # Add or remove space before class constructor ':' 462 | sp_before_constr_colon = ignore # ignore/add/remove/force 463 | 464 | # Add or remove space before case ':'. Default=Remove 465 | sp_before_case_colon = remove # ignore/add/remove/force 466 | 467 | # Add or remove space between 'operator' and operator sign 468 | sp_after_operator = force # ignore/add/remove/force 469 | 470 | # Add or remove space between the operator symbol and the open paren, as in 'operator ++(' 471 | sp_after_operator_sym = ignore # ignore/add/remove/force 472 | 473 | # Add or remove space after C/D cast, i.e. 'cast(int)a' vs 'cast(int) a' or '(int)a' vs '(int) a' 474 | sp_after_cast = force # ignore/add/remove/force 475 | 476 | # Add or remove spaces inside cast parens 477 | sp_inside_paren_cast = remove # ignore/add/remove/force 478 | 479 | # Add or remove space between the type and open paren in a C++ cast, i.e. 'int(exp)' vs 'int (exp)' 480 | sp_cpp_cast_paren = ignore # ignore/add/remove/force 481 | 482 | # Add or remove space between 'sizeof' and '(' 483 | sp_sizeof_paren = force # ignore/add/remove/force 484 | 485 | # Add or remove space after the tag keyword (Pawn) 486 | sp_after_tag = ignore # ignore/add/remove/force 487 | 488 | # Add or remove space inside enum '{' and '}' 489 | sp_inside_braces_enum = force # ignore/add/remove/force 490 | 491 | # Add or remove space inside struct/union '{' force '}' 492 | sp_inside_braces_struct = force # ignore/add/remove/force 493 | 494 | # Add or remove space inside '{' and '}' 495 | sp_inside_braces = force # ignore/add/remove/force 496 | 497 | # Add or remove space inside '{}' 498 | sp_inside_braces_empty = remove # ignore/add/remove/force 499 | 500 | # Add or remove space between return type and function name 501 | # A minimum of 1 is forced except for pointer return types. 502 | sp_type_func = remove # ignore/add/remove/force 503 | 504 | # Add or remove space between function name and '(' on function declaration 505 | sp_func_proto_paren = force # ignore/add/remove/force 506 | 507 | # CARL duplicates ERROR ?? 508 | # Add or remove space between function name and '(' on function definition 509 | sp_func_def_paren = force # ignore/add/remove/force 510 | 511 | # Add or remove space inside empty function '()' 512 | sp_inside_fparens = remove # ignore/add/remove/force 513 | 514 | # Add or remove space inside function '(' and ')' 515 | sp_inside_fparen = remove # ignore/add/remove/force 516 | 517 | # Add or remove space inside the first parens in the function type: 'void (*x)(...)' 518 | sp_inside_tparen = remove # ignore/add/remove/force 519 | 520 | # Add or remove between the parens in the function type: 'void (*x)(...)' 521 | sp_after_tparen_close = remove # ignore/add/remove/force 522 | 523 | # Add or remove space between ']' and '(' when part of a function call. 524 | sp_square_fparen = force # ignore/add/remove/force 525 | 526 | # Add or remove space between ')' and '{' of function 527 | sp_fparen_brace = force # ignore/add/remove/force 528 | 529 | # Add or remove space between function name and '(' on function calls 530 | sp_func_call_paren = force # ignore/add/remove/force 531 | 532 | # Add or remove space between function name and '()' on function calls without parameters. 533 | # If set to 'ignore' (the default), sp_func_call_paren is used. 534 | sp_func_call_paren_empty = force # ignore/add/remove/force 535 | 536 | # Add or remove space between the user function name and '(' on function calls 537 | # You need to set a keyword to be a user function, like this: 'set func_call_user _' in the config file. 538 | sp_func_call_user_paren = ignore # ignore/add/remove/force 539 | 540 | # Add or remove space between a constructor/destructor and the open paren 541 | sp_func_class_paren = force # ignore/add/remove/force 542 | 543 | # Add or remove space between 'return' and '(' 544 | sp_return_paren = force # ignore/add/remove/force 545 | 546 | # Add or remove space between '__attribute__' and '(' 547 | sp_attribute_paren = force # ignore/add/remove/force 548 | 549 | # Add or remove space between 'defined' and '(' in '#if defined (FOO)' 550 | sp_defined_paren = force # ignore/add/remove/force 551 | 552 | # Add or remove space between 'throw' and '(' in 'throw (something)' 553 | sp_throw_paren = force # ignore/add/remove/force 554 | 555 | # Add or remove space between 'throw' and anything other than '(' as in '@throw [...];' 556 | sp_after_throw = force # ignore/add/remove/force 557 | 558 | # Add or remove space between 'catch' and '(' in 'catch (something) { }' 559 | # If set to ignore, sp_before_sparen is used. 560 | sp_catch_paren = force # ignore/add/remove/force 561 | 562 | # D 563 | # Add or remove space between 'version' and '(' in 'version (something) { }' (D language) 564 | # If set to ignore, sp_before_sparen is used. 565 | sp_version_paren = ignore # ignore/add/remove/force 566 | 567 | # D 568 | # Add or remove space between 'scope' and '(' in 'scope (something) { }' (D language) 569 | # If set to ignore, sp_before_sparen is used. 570 | sp_scope_paren = ignore # ignore/add/remove/force 571 | 572 | # Add or remove space between macro and value 573 | sp_macro = ignore # ignore/add/remove/force 574 | 575 | # MACRO 576 | # Add or remove space between macro function ')' and value 577 | sp_macro_func = ignore # ignore/add/remove/force 578 | 579 | # Add or remove space between 'else' and '{' if on the same line 580 | sp_else_brace = force # ignore/add/remove/force 581 | 582 | # Add or remove space between '}' and 'else' if on the same line 583 | sp_brace_else = force # ignore/add/remove/force 584 | 585 | # Add or remove space between '}' and the name of a typedef on the same line 586 | sp_brace_typedef = force # ignore/add/remove/force 587 | 588 | # Add or remove space between 'catch' and '{' if on the same line 589 | sp_catch_brace = force # ignore/add/remove/force 590 | 591 | # Add or remove space between '}' and 'catch' if on the same line 592 | sp_brace_catch = force # ignore/add/remove/force 593 | 594 | # Add or remove space between 'finally' and '{' if on the same line 595 | sp_finally_brace = force # ignore/add/remove/force 596 | 597 | # Add or remove space between '}' and 'finally' if on the same line 598 | sp_brace_finally = force # ignore/add/remove/force 599 | 600 | # Add or remove space between 'try' and '{' if on the same line 601 | sp_try_brace = force # ignore/add/remove/force 602 | 603 | # Add or remove space between get/set and '{' if on the same line 604 | sp_getset_brace = force # ignore/add/remove/force 605 | 606 | # CARL TODO 607 | 608 | # Add or remove space between a variable and '{' for C++ uniform initialization 609 | sp_word_brace = ignore 610 | 611 | # Add or remove space between a variable and '{' for a namespace 612 | sp_word_brace_ns = force 613 | 614 | # C++ 615 | # Add or remove space before the '::' operator 616 | sp_before_dc = remove # ignore/add/remove/force 617 | 618 | # C++ 619 | # Add or remove space after the '::' operator 620 | sp_after_dc = remove # ignore/add/remove/force 621 | 622 | # Add or remove around the D named array initializer ':' operator 623 | sp_d_array_colon = ignore # ignore/add/remove/force 624 | 625 | # Add or remove space after the '!' (not) operator. Default=Remove 626 | sp_not = remove # ignore/add/remove/force 627 | 628 | # Add or remove space after the '~' (invert) operator. Default=Remove 629 | sp_inv = remove # ignore/add/remove/force 630 | 631 | # Add or remove space after the '&' (address-of) operator. Default=Remove 632 | # This does not affect the spacing after a '&' that is part of a type. 633 | sp_addr = remove # ignore/add/remove/force 634 | 635 | # Add or remove space around the '.' or '->' operators. Default=Remove 636 | sp_member = remove # ignore/add/remove/force 637 | 638 | # Add or remove space after the '*' (dereference) operator. Default=Remove 639 | # This does not affect the spacing after a '*' that is part of a type. 640 | sp_deref = remove # ignore/add/remove/force 641 | 642 | # Add or remove space after '+' or '-', as in 'x = -5' or 'y = +7'. Default=Remove 643 | sp_sign = remove # ignore/add/remove/force 644 | 645 | # Add or remove space before or after '++' and '--', as in '(--x)' or 'y++;'. Default=Remove 646 | sp_incdec = remove # ignore/add/remove/force 647 | 648 | # Add or remove space before a backslash-newline at the end of a line. Default=Add 649 | sp_before_nl_cont = add # ignore/add/remove/force 650 | 651 | # Obj c 652 | # Add or remove space after the scope '+' or '-', as in '-(void) foo;' or '+(int) bar;' 653 | sp_after_oc_scope = ignore # ignore/add/remove/force 654 | 655 | # Obj c 656 | # Add or remove space after the colon in message specs 657 | # '-(int) f:(int) x;' vs '-(int) f: (int) x;' 658 | sp_after_oc_colon = ignore # ignore/add/remove/force 659 | 660 | # Obj c 661 | # Add or remove space before the colon in message specs 662 | # '-(int) f: (int) x;' vs '-(int) f : (int) x;' 663 | sp_before_oc_colon = ignore # ignore/add/remove/force 664 | 665 | # Obj c 666 | # Add or remove space after the colon in immutable dictionary expression 667 | # 'NSDictionary *test = @{@"foo" :@"bar"};' 668 | sp_after_oc_dict_colon = ignore # ignore/add/remove/force 669 | 670 | # Obj c 671 | # Add or remove space before the colon in immutable dictionary expression 672 | # 'NSDictionary *test = @{@"foo" :@"bar"};' 673 | sp_before_oc_dict_colon = ignore # ignore/add/remove/force 674 | 675 | # Obj c 676 | # Add or remove space after the colon in message specs 677 | # '[object setValue:1];' vs '[object setValue: 1];' 678 | sp_after_send_oc_colon = ignore # ignore/add/remove/force 679 | 680 | # Obj c 681 | # Add or remove space before the colon in message specs 682 | # '[object setValue:1];' vs '[object setValue :1];' 683 | sp_before_send_oc_colon = ignore # ignore/add/remove/force 684 | 685 | # Obj c 686 | # Add or remove space after the (type) in message specs 687 | # '-(int)f: (int) x;' vs '-(int)f: (int)x;' 688 | sp_after_oc_type = ignore # ignore/add/remove/force 689 | 690 | # Obj c 691 | # Add or remove space after the first (type) in message specs 692 | # '-(int) f:(int)x;' vs '-(int)f:(int)x;' 693 | sp_after_oc_return_type = ignore # ignore/add/remove/force 694 | 695 | # Obj c 696 | # Add or remove space between '@selector' and '(' 697 | # '@selector(msgName)' vs '@selector (msgName)' 698 | # Also applies to @protocol() constructs 699 | sp_after_oc_at_sel = ignore # ignore/add/remove/force 700 | 701 | # Obj c 702 | # Add or remove space between '@selector(x)' and the following word 703 | # '@selector(foo) a:' vs '@selector(foo)a:' 704 | sp_after_oc_at_sel_parens = ignore # ignore/add/remove/force 705 | 706 | # Obj c 707 | # Add or remove space inside '@selector' parens 708 | # '@selector(foo)' vs '@selector( foo )' 709 | # Also applies to @protocol() constructs 710 | sp_inside_oc_at_sel_parens = ignore # ignore/add/remove/force 711 | 712 | # Obj c 713 | # Add or remove space before a block pointer caret 714 | # '^int (int arg){...}' vs. ' ^int (int arg){...}' 715 | sp_before_oc_block_caret = ignore # ignore/add/remove/force 716 | 717 | # Obj c 718 | # Add or remove space after a block pointer caret 719 | # '^int (int arg){...}' vs. '^ int (int arg){...}' 720 | sp_after_oc_block_caret = ignore # ignore/add/remove/force 721 | 722 | # Obj c 723 | # Add or remove space between the receiver and selector in a message. 724 | # '[receiver selector ...]' 725 | sp_after_oc_msg_receiver = ignore # ignore/add/remove/force 726 | 727 | # Obj c 728 | # Add or remove space after @property. 729 | sp_after_oc_property = ignore # ignore/add/remove/force 730 | 731 | # Add or remove space around the ':' in 'b ? t : f' 732 | sp_cond_colon = force # ignore/add/remove/force 733 | # TODO 734 | 735 | # Add or remove space before the ':' in 'b ? t : f'. Overrides sp_cond_colon. 736 | sp_cond_colon_before = force 737 | # Add or remove space after the ':' in 'b ? t : f'. Overrides sp_cond_colon. 738 | sp_cond_colon_after = force 739 | # Add or remove space around the '?' in 'b ? t : f' 740 | sp_cond_question = force 741 | 742 | # Add or remove space before the '?' in 'b ? t : f'. Overrides sp_cond_question. 743 | sp_cond_question_before = force 744 | 745 | # Add or remove space after the '?' in 'b ? t : f'. Overrides sp_cond_question. 746 | sp_cond_question_after = force 747 | 748 | # In the abbreviated ternary form (a ?: b), add/remove space between ? and :.'. Overrides all other sp_cond_* options. 749 | sp_cond_ternary_short = force 750 | 751 | # Fix the spacing between 'case' and the label. Only 'ignore' and 'force' make sense here. 752 | sp_case_label = force # ignore/add/remove/force 753 | 754 | # Control the space around the D '..' operator. 755 | sp_range = ignore # ignore/add/remove/force 756 | 757 | # Control the spacing after ':' in 'for (TYPE VAR : EXPR)' (Java) 758 | sp_after_for_colon = ignore # ignore/add/remove/force 759 | 760 | # Control the spacing before ':' in 'for (TYPE VAR : EXPR)' (Java) 761 | sp_before_for_colon = ignore # ignore/add/remove/force 762 | 763 | # Control the spacing in 'extern (C)' (D) 764 | sp_extern_paren = ignore # ignore/add/remove/force 765 | 766 | # Control the space after the opening of a C++ comment '// A' vs '//A' 767 | sp_cmt_cpp_start = force # ignore/add/remove/force 768 | 769 | # Controls the spaces between #else or #endif and a trailing comment 770 | sp_endif_cmt = remove # ignore/add/remove/force 771 | 772 | # Controls the spaces after 'new', 'delete', and 'delete[]' 773 | sp_after_new = force # ignore/add/remove/force 774 | 775 | # Controls the spaces before a trailing or embedded comment 776 | sp_before_tr_emb_cmt = force # ignore/add/remove/force 777 | 778 | # Number of spaces before a trailing or embedded comment 779 | sp_num_before_tr_emb_cmt = 0 # number 780 | 781 | # Control space between a Java annotation and the open paren. 782 | sp_annotation_paren = ignore # ignore/add/remove/force 783 | 784 | # 785 | # Code alignment (not left column spaces/tabs) 786 | # 787 | 788 | # Whether to keep non-indenting tabs 789 | align_keep_tabs = false # false/true 790 | 791 | # Whether to use tabs for aligning 792 | align_with_tabs = false # false/true 793 | 794 | # Whether to bump out to the next tab when aligning 795 | align_on_tabstop = false # false/true 796 | 797 | # Whether to left-align numbers 798 | #align_number_left = false # false/true 799 | 800 | # TODO DOC 801 | # Whether to keep whitespace not required for alignment. 802 | align_keep_extra_space = true 803 | 804 | # Align variable definitions in prototypes and functions 805 | align_func_params = false # false/true 806 | 807 | # Align parameters in single-line functions that have the same name. 808 | # The function names must already be aligned with each other. 809 | align_same_func_call_params = false # false/true 810 | 811 | # The span for aligning variable definitions (0=don't align) 812 | align_var_def_span = 0 # number 813 | 814 | # How to align the star in variable definitions. 815 | # 0=Part of the type 'void * foo;' 816 | # 1=Part of the variable 'void *foo;' 817 | # 2=Dangling 'void *foo;' 818 | align_var_def_star_style = 0 # number 819 | 820 | # How to align the '&' in variable definitions. 821 | # 0=Part of the type 822 | # 1=Part of the variable 823 | # 2=Dangling 824 | align_var_def_amp_style = 0 # number 825 | 826 | # The threshold for aligning variable definitions (0=no limit) 827 | align_var_def_thresh = 0 # number 828 | 829 | # The gap for aligning variable definitions 830 | align_var_def_gap = 0 # number 831 | 832 | # Whether to align the colon in struct bit fields 833 | align_var_def_colon = false # false/true 834 | 835 | # Whether to align any attribute after the variable name 836 | align_var_def_attribute = false # false/true 837 | 838 | # Whether to align inline struct/enum/union variable definitions 839 | align_var_def_inline = false # false/true 840 | 841 | # The span for aligning on '=' in assignments (0=don't align) 842 | align_assign_span = 0 # number 843 | 844 | # The threshold for aligning on '=' in assignments (0=no limit) 845 | align_assign_thresh = 0 # number 846 | 847 | # The span for aligning on '=' in enums (0=don't align) 848 | align_enum_equ_span = 0 # number 849 | 850 | # The threshold for aligning on '=' in enums (0=no limit) 851 | align_enum_equ_thresh = 0 # number 852 | 853 | # The span for aligning struct/union (0=don't align) 854 | align_var_struct_span = 0 # number 855 | 856 | # The threshold for aligning struct/union member definitions (0=no limit) 857 | align_var_struct_thresh = 0 # number 858 | 859 | # The gap for aligning struct/union member definitions 860 | align_var_struct_gap = 0 # number 861 | 862 | # The span for aligning struct initializer values (0=don't align) 863 | align_struct_init_span = 0 # number 864 | 865 | # The minimum space between the type and the synonym of a typedef 866 | align_typedef_gap = 0 # number 867 | 868 | # The span for aligning single-line typedefs (0=don't align) 869 | align_typedef_span = 0 # number 870 | 871 | # How to align typedef'd functions with other typedefs 872 | # 0: Don't mix them at all 873 | # 1: align the open paren with the types 874 | # 2: align the function type name with the other type names 875 | align_typedef_func = 0 # number 876 | 877 | # Controls the positioning of the '*' in typedefs. Just try it. 878 | # 0: Align on typedef type, ignore '*' 879 | # 1: The '*' is part of type name: typedef int *pint; 880 | # 2: The '*' is part of the type, but dangling: typedef int *pint; 881 | align_typedef_star_style = 0 # number 882 | 883 | # Controls the positioning of the '&' in typedefs. Just try it. 884 | # 0: Align on typedef type, ignore '&' 885 | # 1: The '&' is part of type name: typedef int &pint; 886 | # 2: The '&' is part of the type, but dangling: typedef int &pint; 887 | align_typedef_amp_style = 0 # number 888 | 889 | # The span for aligning comments that end lines (0=don't align) 890 | align_right_cmt_span = 0 # number 891 | 892 | # If aligning comments, mix with comments after '}' and #endif with less than 3 spaces before the comment 893 | align_right_cmt_mix = false # false/true 894 | 895 | # If a trailing comment is more than this number of columns away from the text it follows, 896 | # it will qualify for being aligned. This has to be > 0 to do anything. 897 | align_right_cmt_gap = 0 # number 898 | 899 | # Align trailing comment at or beyond column N; 'pulls in' comments as a bonus side effect (0=ignore) 900 | align_right_cmt_at_col = 0 # number 901 | 902 | # The span for aligning function prototypes (0=don't align) 903 | align_func_proto_span = 0 # number 904 | 905 | # Minimum gap between the return type and the function name. 906 | align_func_proto_gap = 0 # number 907 | 908 | # Align function protos on the 'operator' keyword instead of what follows 909 | align_on_operator = false # false/true 910 | 911 | # Whether to mix aligning prototype and variable declarations. 912 | # If true, align_var_def_XXX options are used instead of align_func_proto_XXX options. 913 | align_mix_var_proto = false # false/true 914 | 915 | # Align single-line functions with function prototypes, uses align_func_proto_span 916 | align_single_line_func = false # false/true 917 | 918 | # Aligning the open brace of single-line functions. 919 | # Requires align_single_line_func=true, uses align_func_proto_span 920 | align_single_line_brace = false # false/true 921 | 922 | # Gap for align_single_line_brace. 923 | align_single_line_brace_gap = 0 # number 924 | 925 | # The span for aligning ObjC msg spec (0=don't align) 926 | align_oc_msg_spec_span = 0 # number 927 | 928 | # Whether to align macros wrapped with a backslash and a newline. 929 | # This will not work right if the macro contains a multi-line comment. 930 | align_nl_cont = false # false/true 931 | 932 | # # Align macro functions and variables together 933 | align_pp_define_together = false # false/true 934 | 935 | # The minimum space between label and value of a preprocessor define 936 | align_pp_define_gap = 0 # number 937 | 938 | # The span for aligning on '#define' bodies (0=don't align) 939 | align_pp_define_span = 0 # number 940 | 941 | # Align lines that start with '<<' with previous '<<'. Default=true 942 | align_left_shift = true # false/true 943 | 944 | # Span for aligning parameters in an Obj-C message call on the ':' (0=don't align) 945 | align_oc_msg_colon_span = 0 # number 946 | 947 | # If true, always align with the first parameter, even if it is too short. 948 | align_oc_msg_colon_first = false # false/true 949 | 950 | # Aligning parameters in an Obj-C '+' or '-' declaration on the ':' 951 | align_oc_decl_colon = false # false/true 952 | 953 | # 954 | # Newline adding and removing options 955 | # 956 | 957 | # Whether to collapse empty blocks between '{' and '}' 958 | nl_collapse_empty_body = false # false/true 959 | 960 | # Don't split one-line braced assignments - 'foo_t f = { 1, 2 };' 961 | nl_assign_leave_one_liners = true # false/true 962 | 963 | # Don't split one-line braced statements inside a class xx { } body 964 | nl_class_leave_one_liners = false # false/true 965 | 966 | # Don't split one-line enums: 'enum foo { BAR = 15 };' 967 | nl_enum_leave_one_liners = false # false/true 968 | 969 | # Don't split one-line get or set functions 970 | nl_getset_leave_one_liners = false # false/true 971 | 972 | # Don't split one-line function definitions - 'int foo() { return 0; }' 973 | nl_func_leave_one_liners = false # false/true 974 | 975 | # Don't split one-line if/else statements - 'if(a) b++;' 976 | nl_if_leave_one_liners = false # false/true 977 | 978 | # Don't split one-line OC messages 979 | nl_oc_msg_leave_one_liner = false # false/true 980 | 981 | # Add or remove newlines at the start of the file 982 | nl_start_of_file = ignore # ignore/add/remove/force 983 | 984 | # The number of newlines at the start of the file (only used if nl_start_of_file is 'add' or 'force' 985 | nl_start_of_file_min = 0 # number 986 | 987 | # Add or remove newline at the end of the file 988 | nl_end_of_file = ignore # ignore/add/remove/force 989 | 990 | # The number of newlines at the end of the file (only used if nl_end_of_file is 'add' or 'force') 991 | nl_end_of_file_min = 0 # number 992 | 993 | # Add or remove newline between '=' and '{' 994 | nl_assign_brace = ignore # ignore/add/remove/force 995 | 996 | # Add or remove newline between '=' and '[' (D only) 997 | nl_assign_square = ignore # ignore/add/remove/force 998 | 999 | # Add or remove newline after '= [' (D only). Will also affect the newline before the ']' 1000 | nl_after_square_assign = ignore # ignore/add/remove/force 1001 | 1002 | # The number of blank lines after a block of variable definitions at the top of a function body 1003 | # 0 = No change (default) 1004 | nl_func_var_def_blk = 0 # number 1005 | 1006 | # The number of newlines before a block of typedefs 1007 | # 0 = No change (default) 1008 | nl_typedef_blk_start = 0 # number 1009 | 1010 | # The number of newlines after a block of typedefs 1011 | # 0 = No change (default) 1012 | nl_typedef_blk_end = 0 # number 1013 | 1014 | # The maximum consecutive newlines within a block of typedefs 1015 | # 0 = No change (default) 1016 | nl_typedef_blk_in = 0 # number 1017 | 1018 | # The number of newlines before a block of variable definitions not at the top of a function body 1019 | # 0 = No change (default) 1020 | nl_var_def_blk_start = 0 # number 1021 | 1022 | # The number of newlines after a block of variable definitions not at the top of a function body 1023 | # 0 = No change (default) 1024 | nl_var_def_blk_end = 0 # number 1025 | 1026 | # The maximum consecutive newlines within a block of variable definitions 1027 | # 0 = No change (default) 1028 | nl_var_def_blk_in = 0 # number 1029 | 1030 | # Add or remove newline between a function call's ')' and '{', as in: 1031 | # list_for_each(item, &list) { } 1032 | nl_fcall_brace = ignore # ignore/add/remove/force 1033 | 1034 | # Add or remove newline between 'enum' and '{' 1035 | nl_enum_brace = remove # ignore/add/remove/force 1036 | 1037 | # Add or remove newline between 'struct and '{' 1038 | nl_struct_brace = remove # ignore/add/remove/force 1039 | 1040 | # Add or remove newline between 'union' and '{' 1041 | nl_union_brace = remove # ignore/add/remove/force 1042 | 1043 | # Add or remove newline between 'if' and '{' 1044 | nl_if_brace = remove # ignore/add/remove/force 1045 | 1046 | # Add or remove newline between '}' and 'else' 1047 | nl_brace_else = remove # ignore/add/remove/force 1048 | 1049 | # Add or remove newline between 'else if' and '{' 1050 | # If set to ignore, nl_if_brace is used instead 1051 | nl_elseif_brace = remove # ignore/add/remove/force 1052 | 1053 | # Add or remove newline between 'else' and '{' 1054 | nl_else_brace = remove # ignore/add/remove/force 1055 | 1056 | # Add or remove newline between 'else' and 'if' 1057 | nl_else_if = remove # ignore/add/remove/force 1058 | 1059 | # Add or remove newline between '}' and 'finally' 1060 | nl_brace_finally = remove # ignore/add/remove/force 1061 | 1062 | # Add or remove newline between 'finally' and '{' 1063 | nl_finally_brace = remove # ignore/add/remove/force 1064 | 1065 | # Add or remove newline between 'try' and '{' 1066 | nl_try_brace = remove # ignore/add/remove/force 1067 | 1068 | # Add or remove newline between get/set and '{' 1069 | nl_getset_brace = remove # ignore/add/remove/force 1070 | 1071 | # Add or remove newline between 'for' and '{' 1072 | nl_for_brace = remove # ignore/add/remove/force 1073 | 1074 | # Add or remove newline between 'catch' and '{' 1075 | nl_catch_brace = remove # ignore/add/remove/force 1076 | 1077 | # Add or remove newline between '}' and 'catch' 1078 | nl_brace_catch = remove # ignore/add/remove/force 1079 | 1080 | # Add or remove newline between '}' and ']' 1081 | nl_brace_square = remove # ignore/add/remove/force 1082 | 1083 | # Add or remove newline between '}' and ')' in a function invocation 1084 | nl_brace_fparen = remove # ignore/add/remove/force 1085 | # Add or remove newline between 'while' and '{' 1086 | nl_while_brace = remove # ignore/add/remove/force 1087 | 1088 | # Add or remove newline between 'scope (x)' and '{' (D) 1089 | nl_scope_brace = ignore # ignore/add/remove/force 1090 | 1091 | # Add or remove newline between 'unittest' and '{' (D) 1092 | nl_unittest_brace = ignore # ignore/add/remove/force 1093 | 1094 | # Add or remove newline between 'version (x)' and '{' (D) 1095 | nl_version_brace = ignore # ignore/add/remove/force 1096 | 1097 | # Add or remove newline between 'using' and '{' 1098 | nl_using_brace = remove # ignore/add/remove/force 1099 | 1100 | # Add or remove newline between two open or close braces. 1101 | # Due to general newline/brace handling, REMOVE may not work. 1102 | nl_brace_brace = ignore # ignore/add/remove/force 1103 | 1104 | # Add or remove newline between 'do' and '{' 1105 | nl_do_brace = remove # ignore/add/remove/force 1106 | 1107 | # Add or remove newline between '}' and 'while' of 'do' statement 1108 | nl_brace_while = remove # ignore/add/remove/force 1109 | 1110 | # Add or remove newline between 'switch' and '{' 1111 | nl_switch_brace = remove # ignore/add/remove/force 1112 | 1113 | # Add a newline between ')' and '{' if the ')' is on a different line than the if/for/etc. 1114 | # Overrides nl_for_brace, nl_if_brace, nl_switch_brace, nl_while_switch, and nl_catch_brace. 1115 | nl_multi_line_cond = false # false/true 1116 | 1117 | # Force a newline in a define after the macro name for multi-line defines. 1118 | nl_multi_line_define = false # false/true 1119 | 1120 | # Whether to put a newline before 'case' statement 1121 | nl_before_case = false # false/true 1122 | 1123 | # Add or remove newline between ')' and 'throw' 1124 | nl_before_throw = remove # ignore/add/remove/force 1125 | 1126 | # Whether to put a newline after 'case' statement 1127 | nl_after_case = false # false/true 1128 | 1129 | # Add or remove a newline between a case ':' and '{'. Overrides nl_after_case. 1130 | nl_case_colon_brace = ignore # ignore/add/remove/force 1131 | 1132 | # Newline between namespace and { 1133 | nl_namespace_brace = remove # ignore/add/remove/force 1134 | 1135 | # Add or remove newline between 'template<>' and whatever follows. 1136 | nl_template_class = ignore # ignore/add/remove/force 1137 | 1138 | # Add or remove newline between 'class' and '{' 1139 | nl_class_brace = remove # ignore/add/remove/force 1140 | 1141 | # Add or remove newline after each ',' in the class base list 1142 | nl_class_init_args = remove # ignore/add/remove/force 1143 | # Add or remove newline after each ',' in the constructor member initialization 1144 | nl_class_init_args = remove # ignore/add/remove/force 1145 | 1146 | # Add or remove newline between return type and function name in a function definition 1147 | nl_func_type_name = remove # ignore/add/remove/force 1148 | 1149 | # Add or remove newline between return type and function name inside a class {} 1150 | # Uses nl_func_type_name or nl_func_proto_type_name if set to ignore. 1151 | nl_func_type_name_class = remove # ignore/add/remove/force 1152 | 1153 | # Add or remove newline between function scope and name in a definition 1154 | # Controls the newline after '::' in 'void A::f() { }' 1155 | nl_func_scope_name = ignore # ignore/add/remove/force 1156 | 1157 | # Add or remove newline between return type and function name in a prototype 1158 | nl_func_proto_type_name = remove # ignore/add/remove/force 1159 | 1160 | # Add or remove newline between a function name and the opening '(' 1161 | nl_func_paren = remove # ignore/add/remove/force 1162 | 1163 | # Add or remove newline between a function name and the opening '(' in the definition 1164 | nl_func_def_paren = remove # ignore/add/remove/force 1165 | 1166 | # Add or remove newline after '(' in a function declaration 1167 | nl_func_decl_start = remove # ignore/add/remove/force 1168 | 1169 | # Add or remove newline after '(' in a function definition 1170 | nl_func_def_start = remove # ignore/add/remove/force 1171 | 1172 | # Overrides nl_func_decl_start when there is only one parameter. 1173 | nl_func_decl_start_single = ignore # ignore/add/remove/force 1174 | 1175 | # Overrides nl_func_def_start when there is only one parameter. 1176 | nl_func_def_start_single = ignore # ignore/add/remove/force 1177 | 1178 | # Add or remove newline after each ',' in a function declaration 1179 | nl_func_decl_args = ignore # ignore/add/remove/force 1180 | 1181 | # Add or remove newline after each ',' in a function definition 1182 | nl_func_def_args = ignore # ignore/add/remove/force 1183 | 1184 | # Add or remove newline before the ')' in a function declaration 1185 | nl_func_decl_end = remove # ignore/add/remove/force 1186 | 1187 | # Add or remove newline before the ')' in a function definition 1188 | nl_func_def_end = remove # ignore/add/remove/force 1189 | 1190 | # Overrides nl_func_decl_end when there is only one parameter. 1191 | nl_func_decl_end_single = ignore # ignore/add/remove/force 1192 | 1193 | # Overrides nl_func_def_end when there is only one parameter. 1194 | nl_func_def_end_single = ignore # ignore/add/remove/force 1195 | 1196 | # Add or remove newline between '()' in a function declaration. 1197 | nl_func_decl_empty = remove # ignore/add/remove/force 1198 | 1199 | # Add or remove newline between '()' in a function definition. 1200 | nl_func_def_empty = remove # ignore/add/remove/force 1201 | 1202 | # Whether to put each OC message parameter on a separate line 1203 | # See nl_oc_msg_leave_one_liner 1204 | nl_oc_msg_args = false # false/true 1205 | 1206 | # Add or remove newline between function signature and '{' 1207 | nl_fdef_brace = remove # ignore/add/remove/force 1208 | 1209 | # Add or remove newline between C++11 lambda signature and '{' 1210 | nl_cpp_ldef_brace = ignore # ignore/add/remove/force 1211 | 1212 | # Add or remove a newline between the return keyword and return expression. 1213 | nl_return_expr = remove # ignore/add/remove/force 1214 | 1215 | # Whether to put a newline after semicolons, except in 'for' statements 1216 | nl_after_semicolon = false # false/true 1217 | 1218 | # CARL ?? 1219 | # Whether to put a newline after brace open. 1220 | # This also adds a newline before the matching brace close. 1221 | nl_after_brace_open = false # false/true 1222 | 1223 | # If nl_after_brace_open and nl_after_brace_open_cmt are true, a newline is 1224 | # placed between the open brace and a trailing single-line comment. 1225 | nl_after_brace_open_cmt = false # false/true 1226 | 1227 | # Whether to put a newline after a virtual brace open with a non-empty body. 1228 | # These occur in un-braced if/while/do/for statement bodies. 1229 | nl_after_vbrace_open = false # false/true 1230 | 1231 | # Whether to put a newline after a virtual brace open with an empty body. 1232 | # These occur in un-braced if/while/do/for statement bodies. 1233 | nl_after_vbrace_open_empty = false # false/true 1234 | 1235 | # Whether to put a newline after a brace close. 1236 | # Does not apply if followed by a necessary ';'. 1237 | nl_after_brace_close = false # false/true 1238 | 1239 | # Whether to put a newline after a virtual brace close. 1240 | # Would add a newline before return in: 'if (foo) a++; return;' 1241 | nl_after_vbrace_close = false # false/true 1242 | 1243 | # Control the newline between the close brace and 'b' in: 'struct { int a; } b;' 1244 | # Affects enums, unions, and structures. If set to ignore, uses nl_after_brace_close 1245 | nl_brace_struct_var = ignore # ignore/add/remove/force 1246 | 1247 | # Whether to alter newlines in '#define' macros 1248 | nl_define_macro = false # false/true 1249 | 1250 | # Whether to not put blanks after '#ifxx', '#elxx', or before '#endif' 1251 | nl_squeeze_ifdef = false # false/true 1252 | 1253 | # Add or remove blank line before 'if' 1254 | nl_before_if = ignore # ignore/add/remove/force 1255 | 1256 | # Add or remove blank line after 'if' statement 1257 | nl_after_if = ignore # ignore/add/remove/force 1258 | 1259 | # Add or remove blank line before 'for' 1260 | nl_before_for = ignore # ignore/add/remove/force 1261 | 1262 | # Add or remove blank line after 'for' statement 1263 | nl_after_for = ignore # ignore/add/remove/force 1264 | 1265 | # Add or remove blank line before 'while' 1266 | nl_before_while = ignore # ignore/add/remove/force 1267 | 1268 | # Add or remove blank line after 'while' statement 1269 | nl_after_while = ignore # ignore/add/remove/force 1270 | 1271 | # Add or remove blank line before 'switch' 1272 | nl_before_switch = ignore # ignore/add/remove/force 1273 | 1274 | # Add or remove blank line after 'switch' statement 1275 | nl_after_switch = ignore # ignore/add/remove/force 1276 | 1277 | # Add or remove blank line before 'do' 1278 | nl_before_do = ignore # ignore/add/remove/force 1279 | 1280 | # Add or remove blank line after 'do/while' statement 1281 | nl_after_do = ignore # ignore/add/remove/force 1282 | 1283 | # Whether to double-space commented-entries in struct/enum 1284 | nl_ds_struct_enum_cmt = false # false/true 1285 | 1286 | # Whether to double-space before the close brace of a struct/union/enum 1287 | # (lower priority than 'eat_blanks_before_close_brace') 1288 | nl_ds_struct_enum_close_brace = false # false/true 1289 | 1290 | # Add or remove a newline around a class colon. 1291 | # Related to pos_class_colon, nl_class_init_args, and pos_comma. 1292 | nl_class_colon = ignore # ignore/add/remove/force 1293 | 1294 | # Add or remove a newline around a class constructor colon. 1295 | # Related to pos_constr_colon, nl_constr_init_args, and pos_constr_comma. 1296 | nl_constr_colon = ignore # ignore/add/remove/force 1297 | 1298 | 1299 | # Change simple unbraced if statements into a one-liner 1300 | # 'if(b)\n i++;' => 'if(b) i++;' 1301 | nl_create_if_one_liner = false # false/true 1302 | 1303 | # Change simple unbraced for statements into a one-liner 1304 | # 'for (i=0;i<5;i++)\n foo(i);' => 'for (i=0;i<5;i++) foo(i);' 1305 | nl_create_for_one_liner = false # false/true 1306 | 1307 | # Change simple unbraced while statements into a one-liner 1308 | # 'while (i<5)\n foo(i++);' => 'while (i<5) foo(i++);' 1309 | nl_create_while_one_liner = false # false/true 1310 | 1311 | # 1312 | # Positioning options 1313 | # 1314 | 1315 | # The position of arithmetic operators in wrapped expressions 1316 | pos_arith = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force 1317 | 1318 | # The position of assignment in wrapped expressions. 1319 | # Do not affect '=' followed by '{' 1320 | pos_assign = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force 1321 | 1322 | # The position of boolean operators in wrapped expressions 1323 | pos_bool = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force 1324 | 1325 | # The position of comparison operators in wrapped expressions 1326 | pos_compare = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force 1327 | 1328 | # The position of conditional (b ? t : f) operators in wrapped expressions 1329 | pos_conditional = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force 1330 | 1331 | # The position of the comma in wrapped expressions 1332 | pos_comma = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force 1333 | 1334 | # The position of the comma in the class base list 1335 | pos_class_comma = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force 1336 | 1337 | # The position of the comma in the constructor initialization list 1338 | pos_constr_comma = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force 1339 | 1340 | # The position of colons between class and base class list 1341 | pos_class_colon = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force 1342 | 1343 | # The position of colons between constructor and member initialization 1344 | pos_constr_colon = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force 1345 | 1346 | # 1347 | # Line Splitting options 1348 | # 1349 | 1350 | # Try to limit code width to N number of columns 1351 | code_width = 0 # number 1352 | 1353 | # Whether to fully split long 'for' statements at semi-colons 1354 | ls_for_split_full = false # false/true 1355 | 1356 | # Whether to fully split long function protos/calls at commas 1357 | ls_func_split_full = false # false/true 1358 | 1359 | # Whether to split lines as close to code_width as possible and ignore some groupings 1360 | ls_code_width = false # false/true 1361 | 1362 | # 1363 | # Blank line options 1364 | # 1365 | 1366 | # The maximum consecutive newlines 1367 | nl_max = 0 # number 1368 | 1369 | # The number of newlines after a function prototype, if followed by another function prototype 1370 | nl_after_func_proto = 0 # number 1371 | 1372 | # The number of newlines after a function prototype, if not followed by another function prototype 1373 | nl_after_func_proto_group = 2 # number 1374 | 1375 | # The number of newlines after '}' of a multi-line function body 1376 | nl_after_func_body = 2 # number 1377 | 1378 | # The number of newlines after '}' of a multi-line function body in a class declaration 1379 | nl_after_func_body_class = 2 # number 1380 | 1381 | # The number of newlines after '}' of a single line function body 1382 | nl_after_func_body_one_liner = 0 # number 1383 | 1384 | # The minimum number of newlines before a multi-line comment. 1385 | # Doesn't apply if after a brace open or another multi-line comment. 1386 | nl_before_block_comment = 0 # number 1387 | 1388 | # The minimum number of newlines before a single-line C comment. 1389 | # Doesn't apply if after a brace open or other single-line C comments. 1390 | nl_before_c_comment = 0 # number 1391 | 1392 | # The minimum number of newlines before a CPP comment. 1393 | # Doesn't apply if after a brace open or other CPP comments. 1394 | nl_before_cpp_comment = 0 # number 1395 | 1396 | # Whether to force a newline after a multi-line comment. 1397 | nl_after_multiline_comment = false # false/true 1398 | 1399 | # The number of newlines after '}' or ';' of a struct/enum/union definition 1400 | nl_after_struct = 0 # number 1401 | 1402 | # The number of newlines after '}' or ';' of a class definition 1403 | nl_after_class = 0 # number 1404 | 1405 | # The number of newlines before a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label. 1406 | # Will not change the newline count if after a brace open. 1407 | # 0 = No change. 1408 | nl_before_access_spec = 0 # number 1409 | 1410 | # The number of newlines after a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label. 1411 | # 0 = No change. 1412 | nl_after_access_spec = 0 # number 1413 | 1414 | # The number of newlines between a function def and the function comment. 1415 | # 0 = No change. 1416 | nl_comment_func_def = 0 # number 1417 | 1418 | # The number of newlines after a try-catch-finally block that isn't followed by a brace close. 1419 | # 0 = No change. 1420 | nl_after_try_catch_finally = 0 # number 1421 | 1422 | # The number of newlines before and after a property, indexer or event decl. 1423 | # 0 = No change. 1424 | nl_around_cs_property = 0 # number 1425 | 1426 | # The number of newlines between the get/set/add/remove handlers in C#. 1427 | # 0 = No change. 1428 | nl_between_get_set = 0 # number 1429 | 1430 | # Add or remove newline between C# property and the '{' 1431 | nl_property_brace = ignore # ignore/add/remove/force 1432 | 1433 | # Whether to remove blank lines after '{' 1434 | eat_blanks_after_open_brace = false # false/true 1435 | 1436 | # Whether to remove blank lines before '}' 1437 | eat_blanks_before_close_brace = true # false/true 1438 | 1439 | # How aggressively to remove extra newlines not in preproc. 1440 | # 0: No change 1441 | # 1: Remove most newlines not handled by other config 1442 | # 2: Remove all newlines and reformat completely by config 1443 | nl_remove_extra_newlines = 0 # number 1444 | 1445 | # Whether to put a blank line before 'return' statements, unless after an open brace. 1446 | nl_before_return = false # false/true 1447 | 1448 | # Whether to put a blank line after 'return' statements, unless followed by a close brace. 1449 | nl_after_return = false # false/true 1450 | 1451 | # Whether to put a newline after a Java annotation statement. 1452 | # Only affects annotations that are after a newline. 1453 | nl_after_annotation = ignore # ignore/add/remove/force 1454 | 1455 | # Controls the newline between two annotations. 1456 | nl_between_annotation = ignore # ignore/add/remove/force 1457 | 1458 | # 1459 | # Code modifying options (non-whitespace) 1460 | # 1461 | 1462 | # Add or remove braces on single-line 'do' statement 1463 | mod_full_brace_do = ignore # ignore/add/remove/force 1464 | 1465 | # Add or remove braces on single-line 'for' statement 1466 | mod_full_brace_for = ignore # ignore/add/remove/force 1467 | 1468 | # Add or remove braces on single-line function definitions. (Pawn) 1469 | mod_full_brace_function = ignore # ignore/add/remove/force 1470 | 1471 | # Add or remove braces on single-line 'if' statement. Will not remove the braces if they contain an 'else'. 1472 | mod_full_brace_if = ignore # ignore/add/remove/force 1473 | 1474 | # Make all if/elseif/else statements in a chain be braced or not. Overrides mod_full_brace_if. 1475 | # If any must be braced, they are all braced. If all can be unbraced, then the braces are removed. 1476 | mod_full_brace_if_chain = false # false/true 1477 | 1478 | # Don't remove braces around statements that span N newlines 1479 | mod_full_brace_nl = 0 # number 1480 | 1481 | # Add or remove braces on single-line 'while' statement 1482 | mod_full_brace_while = ignore # ignore/add/remove/force 1483 | 1484 | # Add or remove braces on single-line 'using ()' statement 1485 | mod_full_brace_using = ignore # ignore/add/remove/force 1486 | 1487 | # Add or remove unnecessary paren on 'return' statement 1488 | mod_paren_on_return = ignore # ignore/add/remove/force 1489 | 1490 | # Whether to change optional semicolons to real semicolons 1491 | mod_pawn_semicolon = false # false/true 1492 | 1493 | # Add parens on 'while' and 'if' statement around bools 1494 | mod_full_paren_if_bool = false # false/true 1495 | 1496 | # Whether to remove superfluous semicolons 1497 | mod_remove_extra_semicolon = false # false/true 1498 | 1499 | # If a function body exceeds the specified number of newlines and doesn't have a comment after 1500 | # the close brace, a comment will be added. 1501 | mod_add_long_function_closebrace_comment = 0 # number 1502 | 1503 | # If a namespace body exceeds the specified number of newlines and doesn't have a comment after 1504 | # the close brace, a comment will be added. 1505 | mod_add_long_namespace_closebrace_comment = 0 # number 1506 | # If a switch body exceeds the specified number of newlines and doesn't have a comment after 1507 | # the close brace, a comment will be added. 1508 | mod_add_long_switch_closebrace_comment = 0 # number 1509 | 1510 | # If an #ifdef body exceeds the specified number of newlines and doesn't have a comment after 1511 | # the #endif, a comment will be added. 1512 | mod_add_long_ifdef_endif_comment = 0 # number 1513 | 1514 | # If an #ifdef or #else body exceeds the specified number of newlines and doesn't have a comment after 1515 | # the #else, a comment will be added. 1516 | mod_add_long_ifdef_else_comment = 0 # number 1517 | 1518 | # If TRUE, will sort consecutive single-line 'import' statements [Java, D] 1519 | mod_sort_import = false # false/true 1520 | 1521 | # If TRUE, will sort consecutive single-line 'using' statements [C#] 1522 | mod_sort_using = false # false/true 1523 | 1524 | # If TRUE, will sort consecutive single-line '#include' statements [C/C++] and '#import' statements [Obj-C] 1525 | # This is generally a bad idea, as it may break your code. 1526 | mod_sort_include = false # false/true 1527 | 1528 | # If TRUE, it will move a 'break' that appears after a fully braced 'case' before the close brace. 1529 | mod_move_case_break = false # false/true 1530 | 1531 | # Will add or remove the braces around a fully braced case statement. 1532 | # Will only remove the braces if there are no variable declarations in the block. 1533 | mod_case_brace = ignore # ignore/add/remove/force 1534 | 1535 | # If TRUE, it will remove a void 'return;' that appears as the last statement in a function. 1536 | mod_remove_empty_return = false # false/true 1537 | 1538 | # 1539 | # Comment modifications 1540 | # 1541 | 1542 | # Try to wrap comments at cmt_width columns 1543 | cmt_width = 0 # number 1544 | 1545 | # Set the comment reflow mode (default: 0) 1546 | # 0: no reflowing (apart from the line wrapping due to cmt_width) 1547 | # 1: no touching at all 1548 | # 2: full reflow 1549 | cmt_reflow_mode = 0 # number 1550 | 1551 | # If false, disable all multi-line comment changes, including cmt_width. keyword substitution, and leading chars. 1552 | # Default is true. 1553 | cmt_indent_multi = true # false/true 1554 | 1555 | # Whether to group c-comments that look like they are in a block 1556 | cmt_c_group = false # false/true 1557 | 1558 | # Whether to put an empty '/*' on the first line of the combined c-comment 1559 | cmt_c_nl_start = false # false/true 1560 | 1561 | # Whether to put a newline before the closing '*/' of the combined c-comment 1562 | cmt_c_nl_end = false # false/true 1563 | 1564 | # Whether to group cpp-comments that look like they are in a block 1565 | cmt_cpp_group = false # false/true 1566 | 1567 | # Whether to put an empty '/*' on the first line of the combined cpp-comment 1568 | cmt_cpp_nl_start = false # false/true 1569 | 1570 | # Whether to put a newline before the closing '*/' of the combined cpp-comment 1571 | cmt_cpp_nl_end = false # false/true 1572 | 1573 | # Whether to change cpp-comments into c-comments 1574 | cmt_cpp_to_c = false # false/true 1575 | 1576 | # Whether to put a star on subsequent comment lines 1577 | cmt_star_cont = false # false/true 1578 | 1579 | # The number of spaces to insert at the start of subsequent comment lines 1580 | cmt_sp_before_star_cont = 0 # number 1581 | 1582 | # The number of spaces to insert after the star on subsequent comment lines 1583 | cmt_sp_after_star_cont = 0 # number 1584 | 1585 | # For multi-line comments with a '*' lead, remove leading spaces if the first and last lines of 1586 | # the comment are the same length. Default=True 1587 | cmt_multi_check_last = true # false/true 1588 | 1589 | # The filename that contains text to insert at the head of a file if the file doesn't start with a C/C++ comment. 1590 | # Will substitute $(filename) with the current file's name. 1591 | cmt_insert_file_header = "" # string 1592 | 1593 | # The filename that contains text to insert at the end of a file if the file doesn't end with a C/C++ comment. 1594 | # Will substitute $(filename) with the current file's name. 1595 | cmt_insert_file_footer = "" # string 1596 | 1597 | # The filename that contains text to insert before a function implementation if the function isn't preceded with a C/C++ comment. 1598 | # Will substitute $(function) with the function name and $(javaparam) with the javadoc @param and @return stuff. 1599 | # Will also substitute $(fclass) with the class name: void CFoo::Bar() { ... } 1600 | cmt_insert_func_header = "" # string 1601 | 1602 | # The filename that contains text to insert before a class if the class isn't preceded with a C/C++ comment. 1603 | # Will substitute $(class) with the class name. 1604 | cmt_insert_class_header = "" # string 1605 | 1606 | # The filename that contains text to insert before a Obj-C message specification if the method isn't preceeded with a C/C++ comment. 1607 | # Will substitute $(message) with the function name and $(javaparam) with the javadoc @param and @return stuff. 1608 | cmt_insert_oc_msg_header = "" # string 1609 | 1610 | # If a preprocessor is encountered when stepping backwards from a function name, then 1611 | # this option decides whether the comment should be inserted. 1612 | # Affects cmt_insert_oc_msg_header, cmt_insert_func_header and cmt_insert_class_header. 1613 | cmt_insert_before_preproc = false # false/true 1614 | 1615 | # 1616 | # Preprocessor options 1617 | # 1618 | 1619 | # Control indent of preprocessors inside #if blocks at brace level 0 1620 | pp_indent = ignore # ignore/add/remove/force 1621 | 1622 | # Whether to indent #if/#else/#endif at the brace level (true) or from column 1 (false) 1623 | pp_indent_at_level = false # false/true 1624 | 1625 | # If pp_indent_at_level=false, specifies the number of columns to indent per level. Default=1. 1626 | pp_indent_count = 1 # number 1627 | 1628 | # Add or remove space after # based on pp_level of #if blocks 1629 | pp_space = ignore # ignore/add/remove/force 1630 | 1631 | # Sets the number of spaces added with pp_space 1632 | pp_space_count = 0 # number 1633 | 1634 | # The indent for #region and #endregion in C# and '#pragma region' in C/C++ 1635 | pp_indent_region = 0 # number 1636 | 1637 | # Whether to indent the code between #region and #endregion 1638 | pp_region_indent_code = false # false/true 1639 | 1640 | # If pp_indent_at_level=true, sets the indent for #if, #else, and #endif when not at file-level 1641 | pp_indent_if = 0 # number 1642 | 1643 | # Control whether to indent the code between #if, #else and #endif when not at file-level 1644 | pp_if_indent_code = false # false/true 1645 | 1646 | # Whether to indent '#define' at the brace level (true) or from column 1 (false) 1647 | pp_define_at_level = false # false/true 1648 | 1649 | --------------------------------------------------------------------------------