[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 144/150: checksrc.pl: add -i and -m options
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 144/150: checksrc.pl: add -i and -m options |
Date: |
Fri, 30 Mar 2018 16:49:58 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit cd3903127fe5124e283a3a69b0baddddff3048e9
Author: Viktor Szakats <address@hidden>
AuthorDate: Mon Mar 12 18:19:24 2018 +0000
checksrc.pl: add -i and -m options
To sync it with changes made for the libssh2 project.
Also cleanup some whitespace.
---
lib/checksrc.pl | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/lib/checksrc.pl b/lib/checksrc.pl
index c222bb87c..c86222b21 100755
--- a/lib/checksrc.pl
+++ b/lib/checksrc.pl
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 2011 - 2017, Daniel Stenberg, <address@hidden>, et al.
+# Copyright (C) 2011 - 2018, Daniel Stenberg, <address@hidden>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -35,10 +35,10 @@ my $verbose;
my %whitelist;
my %warnings = (
- 'LONGLINE' => "Line longer than $max_column",
- 'TABS' => 'TAB characters not allowed',
- 'TRAILINGSPACE' => 'Trailing white space on the line',
- 'CPPCOMMENTS' => '// comment detected',
+ 'LONGLINE' => "Line longer than $max_column",
+ 'TABS' => 'TAB characters not allowed',
+ 'TRAILINGSPACE' => 'Trailing white space on the line',
+ 'CPPCOMMENTS' => '// comment detected',
'SPACEBEFOREPAREN' => 'space before an open parenthesis',
'SPACEAFTERPAREN' => 'space after open parenthesis',
'SPACEBEFORECLOSE' => 'space before a close parenthesis',
@@ -58,7 +58,7 @@ my %warnings = (
'OPENCOMMENT' => 'file ended with a /* comment still "open"',
'ASTERISKSPACE' => 'pointer declared with space after asterisk',
'ASTERISKNOSPACE' => 'pointer declared without space before asterisk',
- 'ASSIGNWITHINCONDITION' => 'assignment within conditional expression',
+ 'ASSIGNWITHINCONDITION' => 'assignment within conditional expression',
'EQUALSNOSPACE' => 'equals sign without following space',
'NOSPACEEQUALS' => 'equals sign without preceding space',
'SEMINOSPACE' => 'semicolon without following space',
@@ -142,6 +142,16 @@ while(1) {
$file = shift @ARGV;
next;
}
+ elsif($file =~ /-i([1-9])/) {
+ $indent = $1 + 0;
+ $file = shift @ARGV;
+ next;
+ }
+ elsif($file =~ /-m([0-9]+)/) {
+ $max_column = $1 + 0;
+ $file = shift @ARGV;
+ next;
+ }
elsif($file =~ /^(-h|--help)/) {
undef $file;
last;
@@ -156,6 +166,8 @@ if(!$file) {
print " -D[DIR] Directory to prepend file names\n";
print " -h Show help output\n";
print " -W[file] Whitelist the given file - ignore all its flaws\n";
+ print " -i<n> Indent spaces. Default: 2\n";
+ print " -m<n> Maximum line length. Default: 79\n";
print "\nDetects and warns for these problems:\n";
for(sort keys %warnings) {
printf (" %-18s: %s\n", $_, $warnings{$_});
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 60/150: http_chunks: don't write chunks twice with CURLOPT_HTTP_TRANSFER_DECODING on, (continued)
- [GNUnet-SVN] [gnurl] 60/150: http_chunks: don't write chunks twice with CURLOPT_HTTP_TRANSFER_DECODING on, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 62/150: sha256: build with OpenSSL < 0.9.8 too, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 72/150: curl_gssapi: make sure this file too uses our *printf(), gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 61/150: README: language fix, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 119/150: CURLOPT_NOPROXY.3: mention how to list numerical IPv6 addresses, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 80/150: Revert "KNOWN_BUGS: 2.5 curl should not offer "ALPN: h2" when using https-proxy", gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 98/150: RELEASE-NOTES: synced with 2427d94c6, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 116/150: curl_ctype: fix macro redefinition warnings, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 104/150: winbuild: Use CALL to run batch scripts, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 130/150: hostip: fix compiler warning: 'variable set but not used', gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 144/150: checksrc.pl: add -i and -m options,
gnunet <=
- [GNUnet-SVN] [gnurl] 143/150: curl-openssl.m4: fix spelling [ci skip], gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 133/150: docs/SECURITY.md -> docs/SECURITY-PROCESS.md, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 95/150: TODO: warning if curl version is not in sync with libcurl version, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 109/150: spelling fixes, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 150/150: Merge tag 'curl-7_59_0' of https://github.com/curl/curl, gnunet, 2018/03/30