[code-quality] Test for checking linefeeds
anatoly techtonik
techtonik at gmail.com
Thu Jun 4 20:20:06 CEST 2015
That helps, thanks. How to run only this check on app *.py files in repository?
I found codenames C0327 (mixed line endings) and C0328 (unexpected feeds)
On Thu, Jun 4, 2015 at 4:09 PM, Claudiu Popa <pcmanticore at gmail.com> wrote:
> On Thu, Jun 4, 2015 at 4:08 PM, Claudiu Popa <pcmanticore at gmail.com> wrote:
>> On Wed, Jun 3, 2015 at 1:59 PM, anatoly techtonik <techtonik at gmail.com> wrote:
>>> Hi,
>>>
>>> I don't want to reinvent to bicycle (even though it is easy),
>>> so is there a support for checking linefeeds in any of the
>>> existing linter tools?
>>>
>>> The two checks in particular are interesting:
>>> 1. test that files don't have mixed linefeeeds
>>> 2. test that files comply with project linefeed style (LF
>>> in particular)
>>>
>>> This is needed for Travis checks, but I also want to run
>>> it standalone on Windows, so grep won't work.
>>> https://github.com/spyder-ide/spyder/issues/2424
>>>
>>> Thanks.
>>> --
>>> anatoly t.
>>> _______________________________________________
>>> code-quality mailing list
>>> code-quality at python.org
>>> https://mail.python.org/mailman/listinfo/code-quality
>>
>>
>> Try pylint:
>>
>> $ pylint a.py -rn --expected-line-ending-format=LF
>> C: 1, 0: Unexpected line ending format. There is 'LF' while it should
>> be 'CRLF'. (unexpected-line-ending-format
>> C: 3, 0: Mixed line endings LF and CRLF (mixed-line-endings)
>
>
> The actual command was pylint a.py -rn --expected-line-ending-format=CRLF.
--
anatoly t.
More information about the code-quality
mailing list