On Sat, Jan 4, 2014 at 4:35 PM, Tony Arcieri <[email protected]> wrote: > On Sat, Jan 4, 2014 at 1:25 PM, Daniel Micay <[email protected]> wrote: >> >> I can believe that people are using poor tooling, as I can't >> understand how a tab character would sneak in otherwise. It can be >> easily prevented at both the text editor and version control layers. >> Git can be asked to prevent commits with whitespace problems by >> enabling the default pre-commit hook and setting either tabs or space >> (and the width) in gitattributes. > > > Believe it or not, not all problems of this nature can be caught by > automatic tools, and this is particularly problematic in YAML. Let's look at > a particular one, which is a *semantic* error in the structure of YAML which > I don't think any automated tools can catch, but please, correct me if I'm > wrong. > > What if the programmer intended to write: > > stuff: > one: > foo: > - a > - b > bar: > - c > - d > two: > foo: > - e > - f > bar: > - g > - h > > But instead wrote: > > stuff: > one: > foo: > - a > - b > bar: > - c > - d > two: > foo: > - e > - f > bar: > - g > - h > > ?
Not much of a problem with 8-space indents. This is not really any different than messing up brace nesting. If you go out of the way to obfuscate the code with 2-space indents then it's a problem. > So if we're talking to a payment gateway, our automated tests should run > against the live payment gateway? Surely you see there are many cases where > this simply doesn't work. I don't really. Wouldn't you want to test that it works with some dummy accounts after you've done testing against a mocked one? _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
