You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Brian Neradt <br...@gmail.com> on 2020/07/30 23:29:03 UTC
Proposal: extend our pre-commit hook to run autopep8
Hi dev@trafficserver.apache.org,
We currently run clang-format as a part of our pre-commit hook. This is a
helpful tool for applying our formatting standards on our C++ files. I
suggest we extend the hook to also inspect any Python files in the diff
with autopep8. We already provide an autopep8 target but it is not
generally run. I suspect a lot of us don't know about it - I didn't till
today. I ran it and it produced a pretty large diff which I published as a
PR:
https://github.com/apache/trafficserver/pull/7070
It would be helpful if the git hook was augmented to help us check our
Python code against PEP8.
I created a draft PR to demonstrate what the hook's implementation would
look like:
https://github.com/apache/trafficserver/pull/7071
Any thoughts or concerns?
Thanks,
Brian Neradt
--
"Come to Me, all who are weary and heavy-laden, and I will
give you rest. Take My yoke upon you and learn from Me, for
I am gentle and humble in heart, and you will find rest for
your souls. For My yoke is easy and My burden is light."
~ Matthew 11:28-30
Re: [E] Proposal: extend our pre-commit hook to run autopep8
Posted by Sudheer Vinukonda <su...@yahoo.com.INVALID>.
Makes sense!
+1
> On Jul 31, 2020, at 8:18 AM, Walt Karas <wk...@verizonmedia.com.invalid> wrote:
>
> +1
>
>> On Thu, Jul 30, 2020 at 6:29 PM Brian Neradt <br...@gmail.com> wrote:
>>
>> Hi dev@trafficserver.apache.org,
>>
>> We currently run clang-format as a part of our pre-commit hook. This is a
>> helpful tool for applying our formatting standards on our C++ files. I
>> suggest we extend the hook to also inspect any Python files in the diff
>> with autopep8. We already provide an autopep8 target but it is not
>> generally run. I suspect a lot of us don't know about it - I didn't till
>> today. I ran it and it produced a pretty large diff which I published as a
>> PR:
>>
>> https://urldefense.com/v3/__https://github.com/apache/trafficserver/pull/7070__;!!Op6eflyXZCqGR5I!RvsJVHoS87wV09PZoHH_HlxH9yF2Et_dK2-coFfT3z5Kn3uIR1ee4l03wP6ln14jOQ$
>>
>> It would be helpful if the git hook was augmented to help us check our
>> Python code against PEP8.
>>
>> I created a draft PR to demonstrate what the hook's implementation would
>> look like:
>>
>> https://urldefense.com/v3/__https://github.com/apache/trafficserver/pull/7071__;!!Op6eflyXZCqGR5I!RvsJVHoS87wV09PZoHH_HlxH9yF2Et_dK2-coFfT3z5Kn3uIR1ee4l03wP7qQXg7bg$
>>
>> Any thoughts or concerns?
>>
>> Thanks,
>> Brian Neradt
>> --
>> "Come to Me, all who are weary and heavy-laden, and I will
>> give you rest. Take My yoke upon you and learn from Me, for
>> I am gentle and humble in heart, and you will find rest for
>> your souls. For My yoke is easy and My burden is light."
>>
>> ~ Matthew 11:28-30
>>
Re: [E] Proposal: extend our pre-commit hook to run autopep8
Posted by Walt Karas <wk...@verizonmedia.com.INVALID>.
+1
On Thu, Jul 30, 2020 at 6:29 PM Brian Neradt <br...@gmail.com> wrote:
> Hi dev@trafficserver.apache.org,
>
> We currently run clang-format as a part of our pre-commit hook. This is a
> helpful tool for applying our formatting standards on our C++ files. I
> suggest we extend the hook to also inspect any Python files in the diff
> with autopep8. We already provide an autopep8 target but it is not
> generally run. I suspect a lot of us don't know about it - I didn't till
> today. I ran it and it produced a pretty large diff which I published as a
> PR:
>
> https://urldefense.com/v3/__https://github.com/apache/trafficserver/pull/7070__;!!Op6eflyXZCqGR5I!RvsJVHoS87wV09PZoHH_HlxH9yF2Et_dK2-coFfT3z5Kn3uIR1ee4l03wP6ln14jOQ$
>
> It would be helpful if the git hook was augmented to help us check our
> Python code against PEP8.
>
> I created a draft PR to demonstrate what the hook's implementation would
> look like:
>
> https://urldefense.com/v3/__https://github.com/apache/trafficserver/pull/7071__;!!Op6eflyXZCqGR5I!RvsJVHoS87wV09PZoHH_HlxH9yF2Et_dK2-coFfT3z5Kn3uIR1ee4l03wP7qQXg7bg$
>
> Any thoughts or concerns?
>
> Thanks,
> Brian Neradt
> --
> "Come to Me, all who are weary and heavy-laden, and I will
> give you rest. Take My yoke upon you and learn from Me, for
> I am gentle and humble in heart, and you will find rest for
> your souls. For My yoke is easy and My burden is light."
>
> ~ Matthew 11:28-30
>