test: Add a check for too long or badly reflowed docstrings
This ensures that docstring comments are wrapped to 80 chars. ffrank seemed to be making this mistake far too often, and it's a silly thing to look for manually. As it turns out, I've made it too, as have many others. Now we have a test that checks for most cases. There are still a few stray cases that aren't checked automatically, but this can be improved upon if someone is motivated to do so. Before anyone complains about the 80 character limit: this only checks docstring comments, not source code length or inline source code comments. There's no excuse for having docstrings that are badly reflowed or over 80 chars, particularly if you have an automated test.
This commit is contained in:
@@ -82,9 +82,9 @@ var (
|
||||
// update the metadata pointer to point to the new blob. This might seem slow,
|
||||
// but it has the unique advantage of being relatively straight forward to
|
||||
// implement, and repeated uploads of the same file cost almost nothing. Since
|
||||
// etcd isn't meant for large file systems, this fits the desired use case.
|
||||
// This implementation is designed to have a single writer for each superblock,
|
||||
// but as many readers as you like.
|
||||
// etcd isn't meant for large file systems, this fits the desired use case. This
|
||||
// implementation is designed to have a single writer for each superblock, but
|
||||
// as many readers as you like.
|
||||
// FIXME: this is not currently thread-safe, nor is it clear if it needs to be.
|
||||
// XXX: we probably aren't updating the modification time everywhere we should!
|
||||
// XXX: because we never delete data blocks, we need to occasionally "vacuum".
|
||||
@@ -656,10 +656,10 @@ func (obj *Fs) RemoveAll(path string) error {
|
||||
}
|
||||
|
||||
// Rename moves or renames a file or directory.
|
||||
// TODO: seems it's okay to move files or directories, but you can't clobber dirs
|
||||
// but you can clobber single files. a dir can't clobber a file and a file can't
|
||||
// clobber a dir. but a file can clobber another file but a dir can't clobber
|
||||
// another dir. you can also transplant dirs or files into other dirs.
|
||||
// TODO: seems it's okay to move files or directories, but you can't clobber
|
||||
// dirs but you can clobber single files. a dir can't clobber a file and a file
|
||||
// can't clobber a dir. but a file can clobber another file but a dir can't
|
||||
// clobber another dir. you can also transplant dirs or files into other dirs.
|
||||
func (obj *Fs) Rename(oldname, newname string) error {
|
||||
// XXX: do we need to check if dest path is inside src path?
|
||||
// XXX: if dirs/files are next to each other, do we mess up the .Children list of the common parent?
|
||||
|
||||
Reference in New Issue
Block a user