Skip to content
Snippets Groups Projects
Select Git revision
  • d5e616fc1c1dd673c53b682877e2d35a2862263c
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

checkpatch.pl

Blame
  • checkpatch.pl 114.13 KiB
    #!/usr/bin/perl -w
    # (c) 2001, Dave Jones. (the file handling bit)
    # (c) 2005, Joel Schopp <jschopp@austin.ibm.com> (the ugly bit)
    # (c) 2007,2008, Andy Whitcroft <apw@uk.ibm.com> (new conditions, test suite)
    # (c) 2008-2010 Andy Whitcroft <apw@canonical.com>
    # Licensed under the terms of the GNU GPL License version 2
    
    use strict;
    use POSIX;
    
    my $P = $0;
    $P =~ s@.*/@@g;
    
    my $V = '0.32';
    
    use Getopt::Long qw(:config no_auto_abbrev);
    
    my $quiet = 0;
    my $tree = 1;
    my $chk_signoff = 1;
    my $chk_patch = 1;
    my $tst_only;
    my $emacs = 0;
    my $terse = 0;
    my $file = 0;
    my $check = 0;
    my $summary = 1;
    my $mailback = 0;
    my $summary_file = 0;
    my $show_types = 0;
    my $fix = 0;
    my $root;
    my %debug;
    my %ignore_type = ();
    my %camelcase = ();
    my @ignore = ();
    my $help = 0;
    my $configuration_file = ".checkpatch.conf";
    my $max_line_length = 80;
    
    sub help {
    	my ($exitcode) = @_;
    
    	print << "EOM";
    Usage: $P [OPTION]... [FILE]...
    Version: $V
    
    Options:
      -q, --quiet                quiet
      --no-tree                  run without a kernel tree
      --no-signoff               do not check for 'Signed-off-by' line
      --patch                    treat FILE as patchfile (default)
      --emacs                    emacs compile window format
      --terse                    one line per report
      -f, --file                 treat FILE as regular source file
      --subjective, --strict     enable more subjective tests
      --ignore TYPE(,TYPE2...)   ignore various comma separated message types
      --max-line-length=n        set the maximum line length, if exceeded, warn
      --show-types               show the message "types" in the output
      --root=PATH                PATH to the kernel tree root
      --no-summary               suppress the per-file summary
      --mailback                 only produce a report in case of warnings/errors
      --summary-file             include the filename in summary
      --debug KEY=[0|1]          turn on/off debugging of KEY, where KEY is one of
                                 'values', 'possible', 'type', and 'attr' (default
                                 is all off)
      --test-only=WORD           report only warnings/errors containing WORD
                                 literally
      --fix                      EXPERIMENTAL - may create horrible results
                                 If correctable single-line errors exist, create