Morgan Courbet
4fc9624b6a
Refactor _detect_line_ending
2017-07-10 21:27:09 +02:00
Morgan Courbet
8bc4af45ba
Refactor file opening
2017-07-09 11:17:08 +02:00
Morgan Courbet
d16d04a4d7
Fix the 5 remaining tests for Python 3.4 & 3.5
...
Fixes nagromc/pre-commit-hooks#1
2017-07-09 11:16:20 +02:00
Morgan Courbet
2b6ad978de
Fix 13 tests for Python 3.4 & 3.5
2017-07-09 09:24:21 +02:00
Morgan Courbet
ba63d1b9db
Refactor _process_no_fix
2017-07-08 10:30:09 +02:00
Morgan Courbet
d0016c5be3
Ignore .cache/
2017-07-08 10:21:14 +02:00
Morgan Courbet
3dbeeeefe5
Improve test coverage
2017-07-04 22:55:49 +02:00
Morgan Courbet
63bb1fd1f5
Add unit test for mixed_line_ending --fix={cr,crlf}
2017-07-04 21:51:08 +02:00
Morgan Courbet
609d01178c
Improve logging for force line ending
2017-07-04 21:26:02 +02:00
Morgan Courbet
a1e1421a99
Refactor mixed_line_ending
2017-07-04 21:23:03 +02:00
Morgan Courbet
614893f36d
Fix _process_fix_auto to return the right value
2017-07-04 21:18:29 +02:00
Morgan Courbet
c6c4c4a2fa
Refactor mixed_line_ending
2017-07-04 21:07:00 +02:00
Morgan Courbet
a1ffbfaa59
Add mixed line detection
2017-07-04 20:50:49 +02:00
Morgan Courbet
4270b56e50
Refactor MixedLineDetection
2017-07-04 20:49:11 +02:00
Morgan Courbet
b1294b8614
Add unit test for mixed_line_ending
2017-07-03 20:04:03 +02:00
Morgan Courbet
f477582ae6
Add logs to mixed_line_ending.py
2017-07-03 18:52:18 +02:00
Morgan Courbet
22b228210e
Reuse variable definition
2017-06-29 21:46:25 +02:00
Morgan Courbet
2b28f4f051
Rename variable names
2017-06-29 21:42:19 +02:00
Morgan Courbet
0a8b929f07
Change files according to --fix option
2017-06-29 21:16:17 +02:00
Morgan Courbet
aaf134c2bc
Add line ending conversion
2017-06-28 22:15:31 +02:00
Morgan Courbet
466f9e1732
Add line ending detection
2017-06-27 21:56:18 +02:00
Morgan Courbet
ad0062a3bb
Add filenames option
2017-06-26 21:42:27 +02:00
Morgan Courbet
b2b0d5929a
Use enum instead of raw argparse result
2017-06-26 21:31:44 +02:00
Morgan Courbet
93194b9c6a
Change --fix option from mixed_line_ending
...
To make it easier to use in the program (single string instead of a list
of strings)
2017-06-18 12:31:22 +02:00
Morgan Courbet
51866649a6
Split argument parsing from main mixed line ending function
2017-06-18 12:25:42 +02:00
Morgan Courbet
afaa97cd11
Add enum to mixed_line_ending --fix option
2017-06-17 19:45:39 +02:00
Morgan Courbet
16b7c7af5d
Use Enum to list line ending types in mixed_line_ending
2017-06-15 20:36:34 +02:00
Morgan Courbet
3d4fb41d8a
Add mixed-line-ending processor
2017-06-13 21:56:00 +02:00
Morgan Courbet
56d45435f4
Add mixed-line-ending test case
2017-06-13 21:40:04 +02:00
Anthony Sottile
78818b90cd
v0.8.0
2017-06-06 14:26:36 -07:00
Anthony Sottile
5bf6c09bfa
Merge pull request #186 from pre-commit/attempt_to_fix_json_hook
...
Attempt to fix json hook
2017-03-20 11:53:31 -07:00
Anthony Sottile
c71b80b6ed
bump revision of pre-commit-hooks
2017-03-20 11:26:07 -07:00
Anthony Sottile
dc50b7f09c
Attempt to fix the json hook under test
2017-03-20 11:25:45 -07:00
Evan Felix
a8592669d9
Add a no commit to specific branch hook. ( #185 )
...
* add no commit code and config
* add the code
* remove version tweak
* fix logic, remove newline
* add Tests and cleanup testing issues
* remove extraneous modules
* cleanup some pep8 and flake issues
* reorder imports
* more fixes for syntax checking
* code cleanup based off asottile comments
* Use Contractions Properly, alphabatize new hook.
* Adding support for branches with a slash in them.
2017-03-20 10:36:51 -07:00
Anthony Sottile
b95dcad616
Fixups
2017-03-20 08:24:58 -07:00
Anthony Sottile
4c3cc8f3ed
Merge pull request #184 from ushuz/pretty-json-no-ensure-ascii
...
Add --no-ensure-ascii option to pretty-format-json hook
2017-03-20 08:23:15 -07:00
ushuz
10f8bd2f22
Add unit test for --no-ensure-ascii option
2017-03-20 20:19:01 +08:00
John Hu
543c5c7e1a
Add an option to disable ensure_ascii
2017-03-20 20:19:01 +08:00
Anthony Sottile
414cfa7b23
Merge pull request #182 from Hirevisor/master
...
Handling default django test filename of "tests.py"
2017-03-15 07:35:07 -07:00
Oliver Zhou
c380d0b3e3
Handling default django test filename of "tests.py"
2017-03-15 00:40:53 -07:00
Anthony Sottile
c847dd3f2e
Merge pull request #179 from pre-commit/pyupgrade
...
Add pyupgrade
2017-03-12 18:17:06 -07:00
Anthony Sottile
9cee71b5df
Add pyupgrade
2017-03-12 18:01:29 -07:00
Anthony Sottile
a11d9314b2
Merge pull request #177 from pre-commit/asottile-patch-1
...
Change `sha` in readme to be a real value
2017-02-25 15:48:10 -05:00
Anthony Sottile
6ff0a78460
Change sha in readme to be a real value
...
I noticed in our traffic on pre-commit/pre-commit that there were a lot of hits to [this issue](https://github.com/pre-commit/pre-commit/issues/366 ) presumably due to copy pasting from this readme.
This should reduce frustration in that regard (we'll have to remember to update this whenever bumping the version).
2017-02-25 12:33:07 -08:00
Anthony Sottile
e626cd5709
Merge pull request #175 from miketheman/miketheman/allow-missing-aws
...
Add flag to detect-aws-credentials to allow missing keys
2017-02-10 10:07:43 -08:00
Mike Fiedler
312e721ce9
Add flag to detect-aws-credentials to allow missing keys
...
In the event that there exists no configuration for AWS credentials and
they are not exported in to the current environment, a flag may be
passed to allow exiting the hook successfully.
Resolves #174
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
2017-02-10 12:54:03 -05:00
Anthony Sottile
20f04626a1
v0.7.1
2017-02-07 10:00:42 -08:00
Anthony Sottile
f9ce156915
Merge pull request #172 from pre-commit/fix_trailing_whitespace
...
Only return nonzero when rewriting whitespace
2017-02-07 09:59:57 -08:00
Anthony Sottile
81147337c5
Only return nonzero when rewriting whitespace
2017-02-07 09:45:31 -08:00
Anthony Sottile
46251c9523
Fix coveralls badge
2017-02-01 08:30:58 -08:00