Skip to content

Commit 312faf3

Browse files
committed
Tag all remaining FIXMEs with bugs. Install rule in tidy script to enforce this.
1 parent 5710178 commit 312faf3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+460
-479
lines changed

src/cargo/cargo.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ fn test_is_uuid() {
165165
assert !is_uuid("aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaป");
166166
}
167167

168-
// FIXME: implement url/URL parsing so we don't have to resort to weak checks
169-
// (#2661)
168+
// FIXME (#2661): implement url/URL parsing so we don't have to resort
169+
// to weak checks
170170

171171
fn has_archive_extension(p: str) -> bool {
172172
str::ends_with(p, ".tar") ||
@@ -189,8 +189,8 @@ fn is_archive_path(u: str) -> bool {
189189
}
190190

191191
fn is_archive_url(u: str) -> bool {
192-
// FIXME: this requires the protocol bit - if we had proper url parsing,
193-
// we wouldn't need it (#2661)
192+
// FIXME (#2661): this requires the protocol bit - if we had proper
193+
// url parsing, we wouldn't need it
194194

195195
alt str::find_str(u, "://") {
196196
option::some(i) { has_archive_extension(u) }
@@ -957,9 +957,10 @@ fn cmd_uninstall(c: cargo) {
957957
let bin = c.bindir;
958958
let target = c.opts.free[2u];
959959

960-
// FIXME: needs stronger pattern matching
961-
// FIXME: needs to uninstall from a specified location in a cache instead
962-
// of looking for it (binaries can be uninstalled by name only) (#2662)
960+
// FIXME (#2662): needs stronger pattern matching
961+
// FIXME (#2662): needs to uninstall from a specified location in a
962+
// cache instead of looking for it (binaries can be uninstalled by
963+
// name only)
963964
if is_uuid(target) {
964965
for os::list_dir(lib).each { |file|
965966
alt str::find_str(file, "-" + target + "-") {
@@ -1060,9 +1061,9 @@ fn install_query(c: cargo, wd: str, target: str) {
10601061
}
10611062
}
10621063

1063-
// FIXME: This whole dep_cache and current_install
1064-
// thing is a bit of a hack. It should be cleaned up in the future.
1065-
// #2662
1064+
// FIXME (#2662): This whole dep_cache and current_install thing is
1065+
// a bit of a hack. It should be cleaned up in the future.
1066+
10661067
if target == c.current_install {
10671068
for c.dep_cache.each { |k, _v|
10681069
c.dep_cache.remove(k);
@@ -1895,7 +1896,7 @@ fn main(argv: [str]) {
18951896
if !first_time && o.free[1] != "init" {
18961897
cmd_init(c);
18971898

1898-
// FIXME: shouldn't need to reconfigure (#2662)
1899+
// FIXME (#2662): shouldn't need to reconfigure
18991900
c = configure(o);
19001901
}
19011902

src/compiletest/procsrv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fn target_env(_lib_path: str, _prog: str) -> [(str,str)] {
3232
}
3333

3434

35-
// FIXME: This code is duplicated in core::run::program_output (#2659)
35+
// FIXME (#2659): This code is duplicated in core::run::program_output
3636
fn run(lib_path: str,
3737
prog: str,
3838
args: [str],

src/etc/get-snapshot.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ def unpack_snapshot(triple, dl_path):
88
tar = tarfile.open(dl_path)
99
kernel = get_kernel(triple)
1010
for p in tar.getnames():
11-
12-
# FIXME: Fix this once win32 snapshot globs are fixed.
13-
name = p.replace("rust-stage0/stage3/", "", 1);
14-
name = name.replace("rust-stage0/", "", 1);
15-
11+
name = p.replace("rust-stage0/", "", 1);
1612
stagep = os.path.join(triple, "stage0")
1713
fp = os.path.join(stagep, name)
1814
print("extracting " + p)

src/etc/snapshot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def in_tar_name(fn):
183183
shutil.move(file0, file1)
184184

185185
if flag == "install":
186-
# FIXME this is an ugly quick hack; pls make it better
186+
# FIXME (#2664): this is an ugly quick hack; pls make it better
187187
path = file1
188188
comps = path.split("-")
189189
parts = { 'year': comps[2], \

src/etc/tidy.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22

3-
import sys, fileinput, subprocess
3+
import sys, fileinput, subprocess, re
44

55
err=0
66
cols=78
@@ -23,6 +23,11 @@ def report_err(s):
2323
try:
2424
for line in fileinput.input(file_names,
2525
openhook=fileinput.hook_encoded("utf-8")):
26+
27+
if fileinput.filename().find("tidy.py") == -1:
28+
if line.find("FIXME") != -1:
29+
if re.search("FIXME.*#\d+", line) == None:
30+
report_err("FIXME without issue number")
2631
if (line.find('\t') != -1 and
2732
fileinput.filename().find("Makefile") == -1):
2833
report_err("tab character")

src/libcore/cmath.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ export c_float;
22
export c_double;
33

44
// uncomment once #1433 is fixed
5-
// FIXME export c_float_math_consts;
6-
// FIXME export c_double_math_consts;
5+
// FIXME (#1433): export c_float_math_consts;
6+
// FIXME (#1433): export c_double_math_consts;
77

88
export c_float_targ_consts;
99
export c_double_targ_consts;
@@ -68,8 +68,7 @@ native mod c_double {
6868
#[link_name="ilogb"] pure fn ilog_radix(n: c_double) -> c_int;
6969
pure fn modf(n: c_double, &iptr: c_double) -> c_double;
7070
pure fn pow(n: c_double, e: c_double) -> c_double;
71-
// FIXME enable when rounding modes become available
72-
// (See Issue #1379)
71+
// FIXME (#1379): enable when rounding modes become available
7372
// pure fn rint(n: c_double) -> c_double;
7473
pure fn round(n: c_double) -> c_double;
7574
// rename: for consistency with logradix
@@ -149,8 +148,7 @@ native mod c_float {
149148
#[link_name="modff"] pure fn modf(n: c_float,
150149
&iptr: c_float) -> c_float;
151150
#[link_name="powf"] pure fn pow(n: c_float, e: c_float) -> c_float;
152-
// FIXME enable when rounding modes become available
153-
// (See Issue #1379)
151+
// FIXME (#1379): enable when rounding modes become available
154152
// #[link_name="rintf"] pure fn rint(n: c_float) -> c_float;
155153
#[link_name="roundf"] pure fn round(n: c_float) -> c_float;
156154
#[link_name="scalbnf"] pure fn ldexp_radix(n: c_float, i: c_int)
@@ -176,8 +174,8 @@ mod c_float_targ_consts {
176174
const max_exp: uint = 128u;
177175
const min_10_exp: int = -37;
178176
const max_10_exp: int = 38;
179-
// FIXME this is wrong! replace with hexadecimal (%a) constants below
180-
// (see Issue #1433)
177+
// FIXME (#1433): this is wrong, replace with hexadecimal (%a) constants
178+
// below.
181179
const min_value: f32 = 1.175494e-38_f32;
182180
const max_value: f32 = 3.402823e+38_f32;
183181
const epsilon: f32 = 0.000000_f32;
@@ -191,8 +189,8 @@ mod c_double_targ_consts {
191189
const max_exp: uint = 1024u;
192190
const min_10_exp: int = -307;
193191
const max_10_exp: int = 308;
194-
// FIXME this is wrong! replace with hexadecimal (%a) constants below
195-
// (see Issue #1433)
192+
// FIXME (#1433): this is wrong, replace with hexadecimal (%a) constants
193+
// below.
196194
const min_value: f64 = 2.225074e-308_f64;
197195
const max_value: f64 = 1.797693e+308_f64;
198196
const epsilon: f64 = 2.220446e-16_f64;

src/libcore/core.rc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ export num;
5050
// NDM seems to be necessary for resolve to work
5151
export option_iter;
5252

53-
// FIXME: This creates some APIs that I do not want to commit to. It is
54-
// currently exported for the uv code in std, but when that code moves into
55-
// core this should become unexported
53+
// FIXME (#2648): This creates some APIs that I do not want to commit
54+
// to. It is currently exported for the uv code in std, but when that
55+
// code moves into core this should become unexported
5656
export priv;
5757

5858

src/libcore/extfmt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ mod rt {
274274
enum count { count_is(int), count_implied, }
275275
enum ty { ty_default, ty_bits, ty_hex_upper, ty_hex_lower, ty_octal, }
276276

277-
// FIXME: May not want to use a vector here for flags;
278-
// instead just use a bool per flag (see Issue #1993)
277+
// FIXME (#1993): May not want to use a vector here for flags; instead
278+
// just use a bool per flag.
279279
type conv = {flags: [flag], width: count, precision: count, ty: ty};
280280

281281
fn conv_int(cv: conv, i: int) -> str {

src/libcore/f32.rs

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import cmath::c_float::*;
66
import cmath::c_float_targ_consts::*;
77
import num::num;
88

9-
// FIXME find out why these have to be exported explicitly
10-
119
export add, sub, mul, div, rem, lt, le, gt, eq, eq, ne;
1210
export is_positive, is_negative, is_nonpositive, is_nonnegative;
1311
export is_zero, is_infinite, is_finite;
@@ -55,9 +53,8 @@ pure fn ge(x: f32, y: f32) -> bool { ret x >= y; }
5553

5654
pure fn gt(x: f32, y: f32) -> bool { ret x > y; }
5755

58-
// FIXME replace the predicates below with llvm intrinsics or calls
59-
// to the libmath macros in the rust runtime for performance
60-
// See Issue #1999
56+
// FIXME (#1999): replace the predicates below with llvm intrinsics or
57+
// calls to the libmath macros in the rust runtime for performance.
6158

6259
#[doc = "
6360
Returns true if `x` is a positive number, including +0.0f320 and +Infinity
@@ -106,14 +103,13 @@ pure fn is_finite(x: f32) -> bool {
106103
ret !(is_NaN(x) || is_infinite(x));
107104
}
108105

109-
// FIXME add is_normal, is_subnormal, and fpclassify
110-
// also see Issue #1999
106+
// FIXME (#1999): add is_normal, is_subnormal, and fpclassify.
111107

112108
/* Module: consts */
113109
mod consts {
114110

115-
// FIXME replace with mathematical constants from cmath
116-
// (requires Issue #1433 to fix)
111+
// FIXME (requires Issue #1433 to fix): replace with mathematical
112+
// constants from cmath.
117113
#[doc = "Archimedes' constant"]
118114
const pi: f32 = 3.14159265358979323846264338327950288_f32;
119115

@@ -167,9 +163,8 @@ pure fn logarithm(n: f32, b: f32) -> f32 {
167163

168164
#[cfg(target_os="freebsd")]
169165
pure fn logarithm(n: f32, b: f32) -> f32 {
170-
// FIXME check if it is good to use log2 instead of ln here;
166+
// FIXME (#2000): check if it is good to use log2 instead of ln here;
171167
// in theory should be faster since the radix is 2
172-
// See Issue #2000
173168
ret ln(n) / ln(b);
174169
}
175170

src/libcore/f64.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ export num;
2929

3030
// PORT check per architecture
3131

32-
// FIXME obtain these in a different way
33-
// (perhaps related to Issue #1433)
32+
// FIXME (#1433): obtain these in a different way
3433

3534
const radix: uint = 2u;
3635

@@ -127,14 +126,13 @@ pure fn is_finite(x: f64) -> bool {
127126
ret !(is_NaN(x) || is_infinite(x));
128127
}
129128

130-
// FIXME add is_normal, is_subnormal, and fpclassify
131-
// also see Issue #1999
129+
// FIXME (#1999): add is_normal, is_subnormal, and fpclassify
132130

133131
/* Module: consts */
134132
mod consts {
135133

136-
// FIXME replace with mathematical constants from cmath
137-
// (requires Issue #1433 to fix)
134+
// FIXME (requires Issue #1433 to fix): replace with mathematical
135+
// constants from cmath.
138136
#[doc = "Archimedes' constant"]
139137
const pi: f64 = 3.14159265358979323846264338327950288_f64;
140138

@@ -188,9 +186,8 @@ pure fn logarithm(n: f64, b: f64) -> f64 {
188186

189187
#[cfg(target_os="freebsd")]
190188
pure fn logarithm(n: f64, b: f64) -> f64 {
191-
// FIXME check if it is good to use log2 instead of ln here;
192-
// in theory should be faster since the radix is 2
193-
// See Issue #2000
189+
// FIXME (#2000): check if it is good to use log2 instead of ln here; in
190+
// theory should be faster since the radix is 2
194191
ret ln(n) / ln(b);
195192
}
196193

src/libcore/float.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ const neg_infinity: float = -1.0/0.0;
3838
/* Module: consts */
3939
mod consts {
4040

41-
// FIXME replace with mathematical constants from cmath
42-
// (requires Issue #1433 to fix)
41+
// FIXME (requires Issue #1433 to fix): replace with mathematical
42+
// constants from cmath.
4343
#[doc = "Archimedes' constant"]
4444
const pi: float = 3.14159265358979323846264338327950288;
4545

src/libcore/io.rs

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ native mod rustrt {
2222

2323
// Reading
2424

25-
// FIXME This is all buffered. We might need an unbuffered variant as well
26-
// #2004
25+
// FIXME (#2004): This is all buffered. We might need an unbuffered variant
26+
// as well
2727
enum seek_style { seek_set, seek_end, seek_cur, }
2828

2929

3030
// The raw underlying reader iface. All readers must implement this.
3131
iface reader {
32-
// FIXME: Seekable really should be orthogonal. // #2004
32+
// FIXME (#2004): Seekable really should be orthogonal.
3333
fn read_bytes(uint) -> [u8];
3434
fn read_byte() -> int;
3535
fn unread_byte(int);
@@ -82,8 +82,8 @@ impl reader_util for reader {
8282
while nbread > 0u {
8383
let data = self.read_bytes(nbread);
8484
if vec::len(data) == 0u {
85-
// eof - FIXME should we do something if
86-
// we're split in a unicode char? // #2004
85+
// eof - FIXME (#2004): should we do something if
86+
// we're split in a unicode char?
8787
break;
8888
}
8989
buf += data;
@@ -234,9 +234,9 @@ fn FILE_reader(f: *libc::FILE, cleanup: bool) -> reader {
234234
}
235235
}
236236

237-
// FIXME: this should either be an iface-less impl, a set of top-level
238-
// functions that take a reader, or a set of default methods on reader
239-
// (which can then be called reader) // #2004
237+
// FIXME (#2004): this should either be an iface-less impl, a set of
238+
// top-level functions that take a reader, or a set of default methods on
239+
// reader (which can then be called reader)
240240

241241
fn stdin() -> reader { rustrt::rust_get_stdin() as reader }
242242

@@ -312,9 +312,8 @@ fn with_str_reader<T>(s: str, f: fn(reader) -> T) -> T {
312312
// Writing
313313
enum fileflag { append, create, truncate, no_flag, }
314314

315-
// FIXME: Seekable really should be orthogonal.
316-
// FIXME: eventually u64
317-
// #2004
315+
// FIXME (#2004): Seekable really should be orthogonal.
316+
// FIXME (#2004): eventually u64
318317
iface writer {
319318
fn write([const u8]/&);
320319
fn seek(int, seek_style);
@@ -586,9 +585,9 @@ fn buffered_file_writer(path: str) -> result<writer, str> {
586585
else { result::ok(FILE_writer(f, true)) }
587586
}
588587

589-
// FIXME it would be great if this could be a const
590-
// FIXME why are these different from the way stdin() is implemented?
591-
// #2004
588+
// FIXME (#2004) it would be great if this could be a const
589+
// FIXME (#2004) why are these different from the way stdin() is
590+
// implemented?
592591
fn stdout() -> writer { fd_writer(libc::STDOUT_FILENO as c_int, false) }
593592
fn stderr() -> writer { fd_writer(libc::STDERR_FILENO as c_int, false) }
594593

@@ -670,8 +669,8 @@ fn read_whole_file_str(file: str) -> result<str, str> {
670669
})
671670
}
672671

673-
// FIXME implement this in a low-level way. Going through the abstractions is
674-
// pointless. // #2004
672+
// FIXME (#2004): implement this in a low-level way. Going through the
673+
// abstractions is pointless.
675674
fn read_whole_file(file: str) -> result<[u8], str> {
676675
result::chain(file_reader(file), { |rdr|
677676
result::ok(rdr.read_whole_stream())
@@ -714,8 +713,8 @@ mod fsync {
714713
};
715714

716715
// fsync file after executing blk
717-
// FIXME find better way to create resources within lifetime of outer res
718-
// #2004
716+
// FIXME (#2004) find better way to create resources within lifetime of
717+
// outer res
719718
fn FILE_res_sync(&&file: FILE_res, opt_level: option<level>,
720719
blk: fn(&&res<*libc::FILE>)) {
721720
blk(res({

src/libcore/iter.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ fn min<A:copy,IA:base_iter<A>>(self: IA) -> A {
9797
alt foldl::<A,option<A>,IA>(self, none) {|a, b|
9898
alt a {
9999
some(a_) if a_ < b {
100-
// FIXME: Not sure if this is successfully optimized to a move
101-
// #2005
100+
// FIXME (#2005): Not sure if this is successfully optimized to
101+
// a move
102102
a
103103
}
104104
_ { some(b) }
@@ -113,8 +113,8 @@ fn max<A:copy,IA:base_iter<A>>(self: IA) -> A {
113113
alt foldl::<A,option<A>,IA>(self, none) {|a, b|
114114
alt a {
115115
some(a_) if a_ > b {
116-
// FIXME: Not sure if this is successfully optimized to a move
117-
// #2005
116+
// FIXME (#2005): Not sure if this is successfully optimized to
117+
// a move.
118118
a
119119
}
120120
_ { some(b) }

0 commit comments

Comments
 (0)