Commit 29fa32b3 authored by Andrea Schaefer's avatar Andrea Schaefer
Browse files

Merge branch 'revert-6b002a6b' into 'master'

Revert "Merge branch 'coding-conventions'

See merge request !244
parents 006f2fb1 f0bf590b
Pipeline #52059 passed with stages
in 12 minutes and 55 seconds
......@@ -22,7 +22,7 @@ for good examples.
Coding Style
============
Have a look at coding-conventions.md
We're mostly using [libhandy's Coding Style][1].
API documentation
=================
......
# Coding conventions for Chatty
This document gives some information about the preferred coding style.
As a basic rule, try to maintain the style of existing files when editing them.
## Formatting:
- ident-width 2 characters
- one space before parenthesis, except casts
- Max line-length 120 characters
- 2 empty lines between declaration blocks and functions
## Code examples:
```
for (i = 0; i < num; i++) {
..
}
```
```
if (condition) {
..
..
} else if {
..
} else {
..
}
```
```
if (condition)
single_statement;
else
single_statement;
```
```
switch (view) {
case CASE_1:
statement;
break;
case CASE_2:
statement;
break;
default:
;
}
```
```
const gchar *
chatty_domain_function (GObject *object,
const char *text,
guint num,
gboolean value)
{
..
}
```
```
g_signal_connect (G_OBJECT (self),
"delete-event",
G_CALLBACK (cb_handler_name),
NULL);
```
```
x = (int)(y * 2);
self = (ChattyDomain *)object;
g_autoptr(GError) err = NULL;
gtk_widget_set_visible (GTK_WIDGET (sub_view_back_button), FALSE);
```
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment