Skip to content

Commit 00cbda2

Browse files
JIghtusealexcrichton
authored andcommitted
Improve searching for XXX in tidy script (rust-lang#3303)
Few places where previous version of tidy script cannot find XXX: * inside one-line comment preceding by a few spaces; * inside multiline comments (now it finds it if multiline comment starts on the same line with XXX). Change occurences of XXX found by new tidy script.
1 parent de2567d commit 00cbda2

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

src/etc/tidy.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,11 @@ def do_license_check(name, contents):
6565
check_tab = False
6666
if line.find(linelength_flag) != -1:
6767
check_linelength = False
68-
if line.find("// XXX") != -1:
69-
report_err("XXX is no longer necessary, use FIXME")
7068
if line.find("TODO") != -1:
7169
report_err("TODO is deprecated; use FIXME")
70+
match = re.match(r'^.*/(\*|/!?)\s*XXX', line)
71+
if match:
72+
report_err("XXX is no longer necessary, use FIXME")
7273
match = re.match(r'^.*//\s*(NOTE.*)$', line)
7374
if match:
7475
m = match.group(1)

src/librustuv/addrinfo.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ impl Drop for Addrinfo {
120120
}
121121

122122
fn each_ai_flag(_f: |c_int, ai::Flag|) {
123-
/* XXX: do we really want to support these?
123+
/* FIXME: do we really want to support these?
124124
unsafe {
125125
f(uvll::rust_AI_ADDRCONFIG(), ai::AddrConfig);
126126
f(uvll::rust_AI_ALL(), ai::All);
@@ -150,7 +150,7 @@ pub fn accum_addrinfo(addr: &Addrinfo) -> ~[ai::Info] {
150150
}
151151
});
152152

153-
/* XXX: do we really want to support these
153+
/* FIXME: do we really want to support these
154154
let protocol = match (*addr).ai_protocol {
155155
p if p == uvll::rust_IPPROTO_UDP() => Some(ai::UDP),
156156
p if p == uvll::rust_IPPROTO_TCP() => Some(ai::TCP),

src/libstd/rt/local_ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
//!
1313
//! The runtime will use this for storing ~Task.
1414
//!
15-
//! XXX: Add runtime checks for usage of inconsistent pointer types.
15+
//! FIXME: Add runtime checks for usage of inconsistent pointer types.
1616
//! and for overwriting an existing pointer.
1717
1818
#![allow(dead_code)]

src/test/bench/shootout-threadring.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use std::os;
1515
fn start(n_tasks: int, token: int) {
1616
let (tx, mut rx) = channel();
1717
tx.send(token);
18-
// XXX could not get this to work with a range closure
18+
// FIXME could not get this to work with a range closure
1919
let mut i = 2;
2020
while i <= n_tasks {
2121
let (tx, next_rx) = channel();

0 commit comments

Comments
 (0)