Ryan Delaney
2d4833c73e
Rename metavar to clarify required usage syntax
2018-10-28 15:58:14 -07:00
Ryan Delaney
b1feed0ced
Add ban for pgp/gpg private key blocks
2018-10-22 12:11:59 -07:00
mtkennerly
e694a6cfc2
Incorporate patch to support isolated CR
2018-10-13 19:44:02 -04:00
mtkennerly
2ab5832ce1
Preserve CRLF if file already ends that way
2018-10-13 19:00:22 -04:00
mtkennerly
abd3d0ec3f
Fix CRLF lines
2018-10-13 07:26:53 -04:00
Anthony Sottile
08e2918d60
Merge pull request #321 from pre-commit/suggest_mirrors_autopep8
...
Remove autopep8-wrapper in favor of autopep8
2018-10-12 19:23:26 -07:00
Anthony Sottile
99453a5366
Default --no-markdown-linebreak-ext for trailing-whitespace
2018-10-12 18:15:39 -07:00
Anthony Sottile
526904b159
Remove autopep8-wrapper in favor of autopep8
2018-10-11 17:19:35 -07:00
Vinay Karanam
64b9f3dcf0
Added --assume-in-merge option for check-merge-conflict
...
Fixes #300
2018-06-26 23:59:40 +05:30
Anthony Sottile
9bf684c131
Merge pull request #297 from pre-commit/warnings
...
Fix resource warnings
2018-06-18 08:21:00 -07:00
Anthony Sottile
5dc306b35d
Fix resource warnings
2018-06-18 00:00:38 -07:00
Anthony Sottile
6239384547
Fix invalid escape sequences
2018-06-17 23:52:13 -07:00
Anthony Sottile
baec308367
Allow multiple branches to be protected
...
Original patch by @moas
2018-06-09 11:18:33 -07:00
Anthony Sottile
c72ad40a6d
Improve vcs regex (don't match whitespace)
2018-06-04 10:10:14 -07:00
vin01
45d3850244
Detect putty & sshcom private keys
2018-05-19 00:31:16 +01:00
Anthony Sottile
df93509aed
Explicitly check for ast.Name
2018-05-17 17:14:25 -07:00
Anthony Sottile
18b3ab7cd2
debug-statements: detect python3.7+ breakpoint()
2018-05-13 15:28:39 -07:00
Michał Sochoń
54c0f8c937
Open files as UTF-8
2018-03-26 12:00:48 +02:00
Michał Sochoń
980fc9bdc3
Fix flake8 error
...
Forgot to rename one var...
2018-03-26 00:41:21 +02:00
Michał Sochoń
b0d44c7084
Ensure not to alter list in 'for' loop
2018-03-26 00:17:13 +02:00
Michał Sochoń
9e28aaf275
Simplify check, extend README
2018-03-26 00:02:23 +02:00
Michał Sochoń
1d6ad0d6ed
Provide automatic removal of pkg-resources==0.0.0
...
Should help to deal with that pretty paintuly issue under Ubuntu/Debian
family:
https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1635463
2018-03-25 23:34:02 +02:00
Anthony Sottile
a21def36e3
Add an --unsafe option to check-yaml
2018-03-19 09:28:18 -07:00
Anthony Sottile
38e02ff508
Don't add end-of-file newline while trimming whitespace
2018-02-28 08:43:07 -08:00
Anthony Sottile
93f319c1f8
Fix no-commit-to-branch when not on a branch
2018-02-19 12:56:14 -08:00
Pablo Vega
83fca4c614
Adding a check to make sure either spaces or null values are not mistakenly added into the key variable
2018-01-26 00:28:39 -08:00
nicain
70ee59f9e6
Update detect_private_key.py
2018-01-13 17:16:50 -08:00
Anthony Sottile
cf04ab0186
Merge pull request #254 from cas--/refactor/pretty-format-json
...
Refactor/pretty format json
2017-12-11 08:33:13 -08:00
Calum Lind
5b6ddaf9f7
Fix pretty_format_json to use int indent
...
The indent parameter for json should be integer and under Python2 is
will raise an error if not. So switch from str to int and mention
default value in help text.
2017-12-10 22:33:33 +00:00
Calum Lind
00974efa31
Remove pretty_format_json simplejson dependency
...
* The simplejson module is only needed for <=py25 so replace with builtin json.
* Replace six dependecy for simple Py2 check for convertion to unicode.
* Cleanup quotes.
2017-12-10 22:33:33 +00:00
Ben Webber
775867626d
check-builtin-literals: Ignore function attribute calls
2017-11-30 18:33:36 +00:00
Ben Webber
35996b7a25
Add check to enforce literal syntax for Python builtin types
...
This check requires authors to initialize empty or zero builtin types
using the literal syntax (e.g., `{}` instead of `dict()`).
Authors may ignore this requirement for certain builtins using the
`--ignore` option.
Authors may also forbid calling `dict()` with keyword arguments
(`dict(a=1, b=2)`) using the `--no-allow-dict-kwargs` flag.
2017-11-26 00:46:03 +00:00
Anthony Sottile
9567db66e5
Add a flush
2017-10-18 14:46:38 -07:00
Anthony Sottile
e87b81afd9
Add an --allow-multiple-documents option to check-yaml
2017-10-12 15:52:10 -07:00
Anthony Sottile
361a6ac1bc
Merge pull request #243 from pre-commit/comment_only_requirements_txt
...
Fix requirements-txt-fixer for comments at end of file
2017-10-09 11:27:52 -07:00
Anthony Sottile
86691eda47
Fix requirements-txt-fixer for comments at end of file
2017-10-09 10:59:17 -07:00
Anthony Sottile
9958d1e219
Fix trailing-whitespace on macos for non-utf8 files
2017-10-09 10:47:41 -07:00
Anthony Sottile
9db0a745f6
Add hook for ensuring vcs permalinks
2017-10-06 23:37:13 -07:00
Anthony Sottile
76047f6eef
Fix mixed-line-endings --fix=... when whole file is a different ending
2017-09-27 07:47:24 -07:00
Anthony Sottile
fbcd096ea9
Simplify mixed-line-ending hook
2017-09-05 20:25:39 -07:00
Morgan Courbet
fc8a5b27e9
Add mixed-line-ending hook
2017-09-05 19:30:55 -07:00
Anthony Sottile
2913408db3
debug statements hook works for non-utf8 files
2017-08-14 20:20:32 -07:00
Anthony Sottile
0c5f040a7f
Use new git lfs (broken due to lfs returning non-lfs files)
2017-07-26 02:59:08 -07:00
Anthony Sottile
e9aea74a77
Upgrade add-trailing-comma to 0.4.1
2017-07-15 13:06:38 -07:00
Anthony Sottile
2a902e0a07
Use asottile/add-trailing-comma
2017-07-12 18:58:30 -07:00
Anthony Sottile
8ad9e7c94c
Report full version in check-ast
2017-07-05 12:38:21 -07:00
Chris Kuehl
13991f09d2
Add a checker for executables without shebangs
2017-07-02 21:14:25 -07:00
Anthony Sottile
aa50988889
Merge pull request #199 from pre-commit/rebase_conflict
...
Support rebase conflicts in check-merge-conflicts
2017-07-02 19:43:55 -07:00
Daniel Gallagher
7102e0c8a3
file-contents-sorter should add newline at end of files missing newlines
...
Make an explicit 'else' path for readability
2017-06-26 08:10:32 -07:00
Daniel Gallagher
7cfec24f77
Fix bug with the file-contents-sorter hook when processing file that does not end in a newline
2017-06-25 14:40:03 -07:00