[rust-dev] Configuration files library for Rust

Tony Arcieri bascule at gmail.com
Sat Jan 4 13:35:00 PST 2014


On Sat, Jan 4, 2014 at 1:25 PM, Daniel Micay <danielmicay at gmail.com> 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

?

How exactly would an automated tool spot this error?



> Testing what you plan on deploying, instead of something else.
>

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.

-- 
Tony Arcieri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140104/7f663ca1/attachment-0001.html>


More information about the Rust-dev mailing list