Lines Matching refs:file
4 # (c) 2001, Dave Jones. (the file handling bit)
36 my $file = 0;
94 --showfile emit diffed file position, not input file position
105 -f, --file treat FILE as regular source file
113 requires --strict for use with --file
117 --no-summary suppress the per-file summary
119 --summary-file include the filename in summary
132 file. It's your fault if there's no backup or git
138 --typedefsfile Read additional types from this file
223 or warn "$P: Can't find a readable $configuration_file file $!\n";
247 or warn "$P: Can't read the documentation file $docsfile $!\n";
302 'f|file!' => \$file,
316 'summary-file!' => \$summary_file,
334 # Use the user provided codespell file unconditionally
358 die "$P: --git cannot be used with --file or --fix\n" if ($git && ($file || $fix));
813 ["debugfs_create_(?:file|u8|u16|u32|u64|x8|x16|x32|x64|size_t|atomic_t|bool|blob|regset32|u32_array)", 2],
950 warn "No typos will be found - file '$spelling_file': $!\n";
973 warn "No codespell typos will be found - file '$codespellfile': $!\n";
980 my ($wordsRef, $file) = @_;
982 if (open(my $words, '<', $file)) {
992 print("$file: '$line' invalid - ignored\n");
999 close($file);
1009 or warn "No structs that should be const will be found - file '$conststructsfile': $!\n";
1015 or warn "No additional types will be considered - file '$typedefsfile': $!\n";
1108 my ($file) = @_;
1110 return if (!(-f $file));
1114 open(my $include_file, '<', "$file")
1115 or warn "$P: Can't read '$file' $!\n";
1176 foreach my $file (@include_files) {
1178 localtime((stat $file)[9]));
1201 foreach my $file (@include_files) {
1202 seed_camelcase_file($file);
1258 $chk_signoff = 0 if ($file);
1301 my $oldfile = $file;
1302 $file = 1 if ($is_git_file);
1306 } elsif ($file) {
1347 $file = $oldfile if ($is_git_file);
2497 my $file = $absolute;
2502 while ($file =~ s@^[^/]*/@@) {
2503 if (-f "$root/$file") {
2504 ##print "file<$file>\n";
2514 substr($prefix, -length($file)) = '';
2643 my $in_header_lines = $file ? 0 : 1;
2665 # Trace the real file/line as we go.
2797 #extract the line range in the file after the patch is applied
2846 $here = "#$linenr: " if (!$file);
2847 $here = "#$realline: " if ($file);
2853 $realfile =~ s@^([^/]*)/@@ if (!$file);
2858 $realfile =~ s@^([^/]*)/@@ if (!$file);
2862 if (!$file && $tree && $p1_prefix ne '' &&
2879 if ($file) {
2944 # Check for incorrect file permissions
2945 if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) {
3012 # emit the "does MAINTAINERS need updating?" message on file add/move/delete
3268 # file delta changes
3401 ($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
3408 "added, moved or deleted file(s), does MAINTAINERS need updating?\n" . $herecurr);
3413 ($line =~ /^new file mode\s*\d+\s*$/) &&
3419 # Check for wrappage within a valid hunk of the file
3466 my $file = $1;
3468 if ($file =~ m{^(.*?)(?::\d+)+:?$} &&
3472 check_absolute_file($file, $herecurr);
3489 $msg_level = \&CHK if ($file);
3592 $msg_level = \&CHK if ($file);
3682 "Misordered MAINTAINERS entry - list file patterns in alphabetic order\n" . $hereprev);
3770 $msg_level = \&CHK if ($file);
3790 "It's generally not useful to have the filename in the file\n" . $herecurr);
3793 # check we are in a valid source file if not then ignore this hunk
3862 $msg_level = \&CHK if ($file);
3869 if ($line =~ /^\+/ && defined $lines[$linenr] && $lines[$linenr] =~ /^\\ No newline at end of file/) {
3871 "adding a line without newline at end of file\n" . $herecurr) &&
3873 fix_delete_line($fixlinenr+1, "No newline at end of file");
3884 # check we are in a valid source file C or perl if not then ignore this hunk
4145 # check we are in a valid C source file if not then ignore this hunk
4828 $msg_level = \&CHK if ($file);
4894 if (!$file && $line =~ /\bENOTSUPP\b/) {
5858 if (!$file && !$camelcase_file_seeded) {
5884 my $file = "$1.h";
5885 my $checkfile = "include/linux/$file";
5890 my $asminclude = `grep -Ec "#include\\s+<asm/$file>" $root/$checkfile`;
5894 "Consider using #include <linux/$file> instead of <asm/$file>\n" . $herecurr);
5897 "Use #include <linux/$file> instead of <asm/$file>\n" . $herecurr);
6296 # This does not work very well for -f --file checking as it depends on patch
6297 # context providing the function name or a single line form for in-file
7138 "found a file-scoped extern type:$st_type name:$st_name in .c file\n"
7306 $msg_level = \&CHK if ($file);
7645 if (!$file && $extracted_string eq '"GPL v2"') {
7760 if ($file) {
7776 Do _NOT_ trust the results written to this file.
7779 This EXPERIMENTAL file is simply a convenience to help rewrite patches.