From: Joe Perches <joe@perches.com>
To: Scott Branden <scott.branden@broadcom.com>,
Andy Whitcroft <apw@canonical.com>
Cc: BCM Kernel Feedback <bcm-kernel-feedback-list@broadcom.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] checkpatch: add --max-file-size option
Date: Wed, 10 Jun 2020 14:08:21 -0700 [thread overview]
Message-ID: <fe98c147136c5625641d14bf70b13ffbfaeb025a.camel@perches.com> (raw)
In-Reply-To: <20200610205616.9965-1-scott.branden@broadcom.com>
On Wed, 2020-06-10 at 13:56 -0700, Scott Branden wrote:
> Add --max-file-size option (default off) to limit size of files
> that checkpatch processes. Such an option is useful when checkpatch
> is run automatically during checkins to a source control system and
> someone acccidently or purposely attempt to commit massive size files
> to the system. If the checkpatch script runs on such files it could take
> a long time to run and limit the server's ability to perform other
> operations.
Does everything need to be in checkpatch or can this facility
be run by a separate script that does the file size validation
before running checkpatch?
Also:
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> + if ($max_file_size > 0) {
> + my $filesize = -s$FILE;
Does this work if the input file is from STDIN?
I'd guess it does not.
I think this might be better using (stat($FILE))[7]
or at least a space between -s and $file.
prev parent reply other threads:[~2020-06-10 21:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-10 20:56 Scott Branden
2020-06-10 21:08 ` Joe Perches [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fe98c147136c5625641d14bf70b13ffbfaeb025a.camel@perches.com \
--to=joe@perches.com \
--cc=apw@canonical.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=scott.branden@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®