checksrc: force indentation of lines after an else

This extends the INDENTATION case to also handle 'else' statements
and require proper indentation on the following line. Also fixes the
offending cases found in the codebase.

Closes #2532
This commit is contained in:
Daniel Gustafsson 2018-04-25 21:53:27 +02:00 committed by Daniel Stenberg
parent 1d71ce845a
commit 2f13e3d23d
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
7 changed files with 11 additions and 17 deletions

View file

@ -456,8 +456,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
the number of resources as urlnum. */
urlnum = count_next_metalink_resource(mlfile);
}
else
if(!config->globoff) {
else if(!config->globoff) {
/* Unless explicitly shut off, we expand '{...}' and '[...]'
expressions and return total number of URLs in pattern set */
result = glob_url(&urls, urlnode->url, &urlnum,
@ -1858,8 +1857,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
*/
break;
}
else
if(urlnum > 1) {
else if(urlnum > 1) {
/* when url globbing, exit loop upon critical error */
if(is_fatal_error(result))
break;