summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-05-08 15:42:50 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-05-08 15:42:50 -0400
commit8c79f4cd441b27df6cadd11b70a50e06b3b3a2bf (patch)
tree0d7fca2a5fb43fa75b51c4cdaaee493e44d56d62 /scripts
parent2646719a48c21ba0cae82a3f57382a9573fd8400 (diff)
parentd9defe448f4c7b88ca2ae636a321ef8970fa718d (diff)
Merge tag 'docs-5.2' of git://git.lwn.net/linux
Pull documentation updates from Jonathan Corbet: "A reasonably busy cycle for docs, including: - Lots of work on the Chinese and Italian translations - Some license-rules clarifications from Christoph - Various build-script fixes - A new document on memory models - RST conversion of the live-patching docs - The usual collection of typo fixes and corrections" * tag 'docs-5.2' of git://git.lwn.net/linux: (140 commits) docs/livepatch: Unify style of livepatch documentation in the ReST format docs: livepatch: convert docs to ReST and rename to *.rst scripts/documentation-file-ref-check: detect broken :doc:`foo` scripts/documentation-file-ref-check: don't parse Next/ dir LICENSES: Rename other to deprecated LICENSES: Clearly mark dual license only licenses docs: Don't reference the ZLib license in license-rules.rst docs/vm: Minor editorial changes in the THP and hugetlbfs docs/vm: add documentation of memory models doc:it_IT: translation alignment doc: fix typo in PGP guide dontdiff: update with Kconfig build artifacts docs/zh_CN: fix typos in 1.Intro.rst file docs/zh_CN: redirect CoC docs to Chinese version doc: mm: migration doesn't use FOLL_SPLIT anymore docs: doc-guide: remove the extension from .rst files doc: kselftest: Fix KBUILD_OUTPUT usage instructions docs: trace: fix some Sphinx warnings docs: speculation.txt: mark example blocks as such docs: ntb.txt: add blank lines to clean up some Sphinx warnings ...
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl18
-rwxr-xr-xscripts/documentation-file-ref-check32
-rwxr-xr-xscripts/sphinx-pre-install1
3 files changed, 51 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a09333fd7cef..bb28b178d929 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2687,6 +2687,24 @@ sub process {
2687 } else { 2687 } else {
2688 $signatures{$sig_nospace} = 1; 2688 $signatures{$sig_nospace} = 1;
2689 } 2689 }
2690
2691# Check Co-developed-by: immediately followed by Signed-off-by: with same name and email
2692 if ($sign_off =~ /^co-developed-by:$/i) {
2693 if ($email eq $author) {
2694 WARN("BAD_SIGN_OFF",
2695 "Co-developed-by: should not be used to attribute nominal patch author '$author'\n" . "$here\n" . $rawline);
2696 }
2697 if (!defined $lines[$linenr]) {
2698 WARN("BAD_SIGN_OFF",
2699 "Co-developed-by: must be immediately followed by Signed-off-by:\n" . "$here\n" . $rawline);
2700 } elsif ($rawlines[$linenr] !~ /^\s*signed-off-by:\s*(.*)/i) {
2701 WARN("BAD_SIGN_OFF",
2702 "Co-developed-by: must be immediately followed by Signed-off-by:\n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]);
2703 } elsif ($1 ne $email) {
2704 WARN("BAD_SIGN_OFF",
2705 "Co-developed-by and Signed-off-by: name/email do not match \n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]);
2706 }
2707 }
2690 } 2708 }
2691 2709
2692# Check email subject for common tools that don't need to be mentioned 2710# Check email subject for common tools that don't need to be mentioned
diff --git a/scripts/documentation-file-ref-check b/scripts/documentation-file-ref-check
index ad9db6821824..63e9542656f1 100755
--- a/scripts/documentation-file-ref-check
+++ b/scripts/documentation-file-ref-check
@@ -30,6 +30,34 @@ print "Finding broken references. This may take a while... " if ($fix);
30 30
31my %broken_ref; 31my %broken_ref;
32 32
33my $doc_fix = 0;
34
35open IN, "git grep ':doc:\`' Documentation/|"
36 or die "Failed to run git grep";
37while (<IN>) {
38 next if (!m,^([^:]+):.*\:doc\:\`([^\`]+)\`,);
39
40 my $d = $1;
41 my $doc_ref = $2;
42
43 my $f = $doc_ref;
44
45 $d =~ s,(.*/).*,$1,;
46 $f =~ s,.*\<([^\>]+)\>,$1,;
47
48 $f ="$d$f.rst";
49
50 next if (grep -e, glob("$f"));
51
52 if ($fix && !$doc_fix) {
53 print STDERR "\nWARNING: Currently, can't fix broken :doc:`` fields\n";
54 }
55 $doc_fix++;
56
57 print STDERR "$f: :doc:`$doc_ref`\n";
58}
59close IN;
60
33open IN, "git grep 'Documentation/'|" 61open IN, "git grep 'Documentation/'|"
34 or die "Failed to run git grep"; 62 or die "Failed to run git grep";
35while (<IN>) { 63while (<IN>) {
@@ -38,6 +66,9 @@ while (<IN>) {
38 my $f = $1; 66 my $f = $1;
39 my $ln = $2; 67 my $ln = $2;
40 68
69 # On linux-next, discard the Next/ directory
70 next if ($f =~ m,^Next/,);
71
41 # Makefiles and scripts contain nasty expressions to parse docs 72 # Makefiles and scripts contain nasty expressions to parse docs
42 next if ($f =~ m/Makefile/ || $f =~ m/\.sh$/); 73 next if ($f =~ m/Makefile/ || $f =~ m/\.sh$/);
43 74
@@ -100,6 +131,7 @@ while (<IN>) {
100 } 131 }
101 } 132 }
102} 133}
134close IN;
103 135
104exit 0 if (!$fix); 136exit 0 if (!$fix);
105 137
diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
index 067459760a7b..f6a5c0bae31e 100755
--- a/scripts/sphinx-pre-install
+++ b/scripts/sphinx-pre-install
@@ -532,6 +532,7 @@ sub check_needs()
532 check_program("dot", 1); 532 check_program("dot", 1);
533 check_program("convert", 1); 533 check_program("convert", 1);
534 check_program("rsvg-convert", 1) if ($pdf); 534 check_program("rsvg-convert", 1) if ($pdf);
535 check_program("latexmk", 1) if ($pdf);
535 536
536 check_distros(); 537 check_distros();
537 538