Commit graph

19 commits

Author SHA1 Message Date
Anthony Sottile
cf3aabe9b1 Merge pull request #120 from sanmai-NL/JSON_arbitrary_indentation_separator
Refactor legacy `indent: int` -> `indent: str`
2016-06-12 10:25:59 -07:00
Sander Maijers
a5628863e8
Refactor legacy indent: int -> indent: str
The type of `indent` parameter is preferably `str`. See
http://simplejson.readthedocs.io/en/latest/index.html?highlight=dump#simplejson.dump
. This change allows to specify TABs as indentation delimiter to
`pretty_format_json`. Add input validator/converter for backward compat.
2016-06-12 19:19:07 +02:00
Anthony Sottile
a99475afa0 Simplify the tests 2016-05-27 14:09:50 -07:00
Anthony Sottile
b4e29b5e63 Use newline='' to avoid automatic newline translation 2016-05-26 11:45:28 -07:00
Anthony Sottile
4a01f64c8f Fix check-merge-conflict against binary files 2016-05-26 11:20:32 -07:00
mattclegg
d49f04c69e Adjust formatting for existing test_pretty_format_json 2016-04-14 10:41:39 +01:00
mattclegg
bd4e37c366 Add test for '--no-sort-keys' 2016-04-14 10:41:39 +01:00
Benjamin Chess
896c0cfdc0 new hook tests for broken symlinks 2016-01-14 15:25:46 -08:00
Anthony Sottile
99574324eb Merge pull request #60 from arahayrabedian/master
AWS credential checking
2015-06-17 11:46:15 -07:00
Ara Hayrabedian
02e8bdc9d8 add tests, test sample files and minor refactor of exit codes in actual hook in order to facilitate testing 2015-06-12 19:20:56 +04:00
Léo Cavaillé
55bf22dc4a Add new hook pretty-format-json
This new hook allows to standardize one's JSON files (sorted key/4
spaces indent).
By default it just fails if any file is not complying with the standard,
but you can also pass the arg `--autofix` and the hook will
pretty-format the file itself.

Good in use combined with the `check-json` hook.
2015-06-11 00:08:03 -04:00
Anthony Sottile
713fab4bc7 Remove dependency on plumbum 2015-03-20 14:15:30 -07:00
Anthony Sottile
ddc9208a5f Add check-xml hook. 2015-01-17 10:30:58 -08:00
gkisel
c682b50749 Add check_case_conflict hook #21 2015-01-12 15:38:22 -08:00
Anthony Sottile
243fe50bc1 Add a hook for checking parseable json. 2014-08-19 16:03:48 -07:00
Anthony Sottile
830ea6d8c8 Give a better message when ast is not parseable. 2014-06-19 17:44:40 -07:00
Anthony Sottile
8270d81308 Improve test coverage. 2014-04-13 22:21:42 -07:00
Anthony Sottile
b80ca9e84a Update project setup. 2014-04-13 22:09:26 -07:00
Anthony Sottile
3e45f53e68 Add a hook for yaml files. 2014-04-03 21:36:03 -07:00