Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
git blame // большой блок переменных близких по смыслу, выравниваю
date = controller->getDate();
period = controller->getPeriod();
object = controller->getObject();
property = controller->getProperty();
id = controller->getId();
// далее выравнивать нет смысла, так как переменные разные по смыслу, да и замучаешься равнять
model = new Model(object, period);
result = model->getResult(id, date);
propertyValue = result->getPropertyValue(property);
git-blame -w
грамотная подсветка синтаксиса
// some code here
...
$short = 'some value of short variable';
$someLongVariableNameHere = 'value of long variable name';
// and code here
...
static pthread_mutex_t stats_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t accept_lock = PTHREAD_MUTEX_INITIALIZER;
extern int max_clients;
extern fd_ctx *clients;
extern int is_finish;
extern int is_trace;
static const int const_RN_len = 2;
static const int const_END_len = 5;
static const int const_END2_len = 7;
static const int const_OK_len = 4;
static const int const_ERROR_len = 7;
typedef struct {
ev_io io; /**< io descriptor */
int cmd_len; /**< bytes in line buffer */
struct obuffer response; /**< response data */
char* value; /**< key value from last set command */
int value_len; /**< number of bytes in value buffer */
int value_size; /**< capacity of value buffer */
int data_size; /**< value size into cmd */
} mc_ctx;
int i = 0; char* state = STORED;
extern int max_clients;
extern fd_ctx *clients;
extern int is_finish;
extern int is_trace;
static const int const_RN_len = 2;
static const int const_END_len = 5;
static const int const_END2_len = 7;
static const int const_OK_len = 4;
static const int const_ERROR_len = 7;
Опрос. Выравниваете ли код по столбцам?