about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClar Charr <clar@charr.xyz>2017-05-30 00:17:11 -0400
committerClar Charr <clar@charr.xyz>2017-06-07 22:44:53 -0400
commitdd23fda9bd6c79ef8e0a389622352759dc159b15 (patch)
tree2d7131389fe3ec6f47a4aae3fea84020d3f99c2c
parent03eb7109c722117322064390bc66578cde3f7b8e (diff)
downloadrust-dd23fda9bd6c79ef8e0a389622352759dc159b15.tar.gz
rust-dd23fda9bd6c79ef8e0a389622352759dc159b15.zip
Make rustdoc.js use license comments.
-rw-r--r--src/librustdoc/html/static/main.js20
-rw-r--r--src/tools/tidy/src/style.rs4
2 files changed, 14 insertions, 10 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index 53e341226af..38f83687d1d 100644
--- a/src/librustdoc/html/static/main.js
+++ b/src/librustdoc/html/static/main.js
@@ -1,12 +1,14 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
+/*!
+ * Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+ * file at the top-level directory of this distribution and at
+ * http://rust-lang.org/COPYRIGHT.
+ *
+ * Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+ * http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+ * <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+ * option. This file may not be copied, modified, or distributed
+ * except according to those terms.
+ */
 
 /*jslint browser: true, es5: true */
 /*globals $: true, rootPath: true */
diff --git a/src/tools/tidy/src/style.rs b/src/tools/tidy/src/style.rs
index 8bf683de870..35073b63723 100644
--- a/src/tools/tidy/src/style.rs
+++ b/src/tools/tidy/src/style.rs
@@ -169,8 +169,10 @@ fn licenseck(file: &Path, contents: &str) -> bool {
     lines.windows(LICENSE.lines().count()).any(|window| {
         let offset = if window.iter().all(|w| w.starts_with("//")) {
             2
-        } else if window.iter().all(|w| w.starts_with("#")) {
+        } else if window.iter().all(|w| w.starts_with('#')) {
             1
+        } else if window.iter().all(|w| w.starts_with(" *")) {
+            2
         } else {
             return false
         };