sapling/scripts
Wez Furlong 3fdff8880a fb-hgext: fix arc lint to catch the issue in D3236640
Summary:
we weren't matching this pattern:

```
$ ./scripts/lint.py

+++ /data/users/wez/facebook-hg-rpms/fb-hgext/tests/test-check-code-hg.t.err
@@ -37,6 +37,8 @@
   Skipping fastmanifest/tree_copy_test.c it has no-che?k-code (glob)
   Skipping fastmanifest/tree_diff.c it has no-che?k-code (glob)
   Skipping fastmanifest/tree_diff_test.c it has no-che?k-code (glob)
+  Skipping fastmanifest/tree_disk.c it has no-che?k-code (glob)
+  Skipping fastmanifest/tree_disk_test.c it has no-che?k-code (glob)
   Skipping fastmanifest/tree_iterate_rt.c it has no-che?k-code (glob)
   Skipping fastmanifest/tree_iterator.c it has no-che?k-code (glob)
   Skipping fastmanifest/tree_iterator.h it has no-che?k-code (glob)

ERROR: test-check-code-hg.t output changed
!
Failed test-check-code-hg.t: output changed
# Ran 1 tests, 0 skipped, 0 warned, 1 failed.
python hash seed: 583073521
```

Due to the way that arc lint works, we have to associate the linter issue
with the files that changed in the diff, but we don't have an easy way to
figure out the line number where the `no-check-code` line was added, so
we just use line number 0.

Test Plan:
`arc patch D3236640` and `arc lint`:

```
$ arc lint --everything


>>> Lint for fastmanifest/tree_disk.c:

   Error  (S&RX) CheckCode
    Update tests/test-check-code-hg.t to add Skipping
    fastmanifest/tree_disk.c it has no-che?k-code (glob)

    >>>        1 // Copyright 2016-present Facebook. All Rights Reserved.
               2 //
               3 // tree_disk.c: methods to persist to and restore from disk.
               4 //


>>> Lint for fastmanifest/tree_disk_test.c:

   Error  (S&RX) CheckCode
    Update tests/test-check-code-hg.t to add Skipping
    fastmanifest/tree_disk_test.c it has no-che?k-code (glob)

    >>>        1 // Copyright 2016-present Facebook. All Rights Reserved.
               2 //
               3 // tree_disk_test.c: tests to verify tree_disk
               4 //
```

Reviewers: #sourcecontrol, ttung, lcharignon

Reviewed By: lcharignon

Subscribers: lcharignon, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3237054

Signature: t1:3237054:1461949072:ac7cc29fcee9dbc00a4019088f3adb50de9625bf
2016-04-29 10:56:47 -07:00
..
hg-new-workdir copy remote_bookmark reflog when sharing 2016-03-23 22:47:54 -07:00
lint.py fb-hgext: fix arc lint to catch the issue in D3236640 2016-04-29 10:56:47 -07:00
scm-prompt.sh scm-prompt: add original branch name to rebases 2016-04-29 09:14:36 -07:00