<div dir="ltr">Hello!<br><div><br></div><div>Nginx is famous for code readability and neat code format. I use the tool(<a href="https://github.com/openresty/openresty-devel-utils">https://github.com/openresty/openresty-devel-utils</a>) to try to unify the incorrect front spaces, Here is my attempt at core.</div><div><br></div><div># HG changeset patch<br># User Jinhua Tan <<a href="mailto:312841925@qq.com">312841925@qq.com</a>><br># Date 1589948492 -28800<br>#      Wed May 20 12:21:32 2020 +0800<br># Node ID 10678810de74edc4c02d5cd7303f0099eee9fac3<br># Parent  3c8082c3f98ab7fdec8a598b55609701452b5254<br>Style(core): fix the incorrect front spaces to unite style.<br><br>diff -r 3c8082c3f98a -r 10678810de74 src/core/ngx_conf_file.c<br>--- a/src/core/ngx_conf_file.c Wed May 13 22:02:47 2020 +0800<br>+++ b/src/core/ngx_conf_file.c  Wed May 20 12:21:32 2020 +0800<br>@@ -544,8 +544,8 @@<br>                     }<br> <br>                     ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,<br>-                                  "unexpected end of file, "<br>-                                  "expecting \";\" or \"}\"");<br>+                                       "unexpected end of file, "<br>+                                       "expecting \";\" or \"}\"");<br>                     return NGX_ERROR;<br>                 }<br> <br>@@ -1047,9 +1047,9 @@<br> <br>     } else {<br>         ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,<br>-                     "invalid value \"%s\" in \"%s\" directive, "<br>-                     "it must be \"on\" or \"off\"",<br>-                     value[1].data, cmd->name.data);<br>+                           "invalid value \"%s\" in \"%s\" directive, "<br>+                           "it must be \"on\" or \"off\"",<br>+                           value[1].data, cmd->name.data);<br>         return NGX_CONF_ERROR;<br>     }<br> <br>diff -r 3c8082c3f98a -r 10678810de74 src/core/ngx_cycle.c<br>--- a/src/core/ngx_cycle.c    Wed May 13 22:02:47 2020 +0800<br>+++ b/src/core/ngx_cycle.c      Wed May 20 12:21:32 2020 +0800<br>@@ -1308,9 +1308,9 @@<br> <br>         if (tag != shm_zone[i].tag) {<br>             ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,<br>-                            "the shared memory zone \"%V\" is "<br>-                            "already declared for a different use",<br>-                            &shm_zone[i].<a href="http://shm.name">shm.name</a>);<br>+                               "the shared memory zone \"%V\" is "<br>+                               "already declared for a different use",<br>+                               &shm_zone[i].<a href="http://shm.name">shm.name</a>);<br>             return NULL;<br>         }<br> <br>diff -r 3c8082c3f98a -r 10678810de74 src/core/ngx_file.c<br>--- a/src/core/ngx_file.c        Wed May 13 22:02:47 2020 +0800<br>+++ b/src/core/ngx_file.c       Wed May 20 12:21:32 2020 +0800<br>@@ -1005,7 +1005,7 @@<br>         name = ngx_de_name(&dir);<br> <br>         ngx_log_debug2(NGX_LOG_DEBUG_CORE, ctx->log, 0,<br>-                      "tree name %uz:\"%s\"", len, name);<br>+                       "tree name %uz:\"%s\"", len, name);<br> <br>         if (len == 1 && name[0] == '.') {<br>             continue;<br>diff -r 3c8082c3f98a -r 10678810de74 src/core/ngx_log.c<br>--- a/src/core/ngx_log.c  Wed May 13 22:02:47 2020 +0800<br>+++ b/src/core/ngx_log.c        Wed May 20 12:21:32 2020 +0800<br>@@ -121,7 +121,7 @@<br> <br>     /* pid#tid */<br>     p = ngx_slprintf(p, last, "%P#" NGX_TID_T_FMT ": ",<br>-                    ngx_log_pid, ngx_log_tid);<br>+                     ngx_log_pid, ngx_log_tid);<br> <br>     if (log->connection) {<br>         p = ngx_slprintf(p, last, "*%uA ", log->connection);<br>@@ -385,8 +385,8 @@<br>                        ngx_open_file_n " \"%s\" failed", name);<br> #if (NGX_WIN32)<br>         ngx_event_log(ngx_errno,<br>-                       "could not open error log file: "<br>-                       ngx_open_file_n " \"%s\" failed", name);<br>+                      "could not open error log file: "<br>+                      ngx_open_file_n " \"%s\" failed", name);<br> #endif<br> <br>         ngx_log_file.fd = ngx_stderr;<br>diff -r 3c8082c3f98a -r 10678810de74 src/core/ngx_regex.c<br>--- a/src/core/ngx_regex.c      Wed May 13 22:02:47 2020 +0800<br>+++ b/src/core/ngx_regex.c      Wed May 20 12:21:32 2020 +0800<br>@@ -111,8 +111,8 @@<br>     if (re == NULL) {<br>         if ((size_t) erroff == rc->pattern.len) {<br>            rc->err.len = ngx_snprintf(rc->err.data, rc->err.len,<br>-                              "pcre_compile() failed: %s in \"%V\"",<br>-                               errstr, &rc->pattern)<br>+                                      "pcre_compile() failed: %s in \"%V\"",<br>+                                      errstr, &rc->pattern)<br>                       - rc->err.data;<br> <br>         } else {<br>diff -r 3c8082c3f98a -r 10678810de74 src/core/ngx_resolver.c<br>--- a/src/core/ngx_resolver.c       Wed May 13 22:02:47 2020 +0800<br>+++ b/src/core/ngx_resolver.c   Wed May 20 12:21:32 2020 +0800<br>@@ -3265,8 +3265,8 @@<br>         }<br> <br>         ngx_log_debug3(NGX_LOG_DEBUG_CORE, r->log, 0,<br>-                      "resolver qt:%ui cl:%ui len:%uz",<br>-                      type, class, len);<br>+                       "resolver qt:%ui cl:%ui len:%uz",<br>+                       type, class, len);<br> <br>         i += sizeof(ngx_resolver_an_t);<br> <br></div><div>Thanks!</div></div>