You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@fluo.apache.org by Arvind Shyamsundar <ar...@microsoft.com.INVALID> on 2020/04/09 15:33:14 UTC

RE: [EXTERNAL] Re: Static checks for Muchos code

Just wanted to update that I am still working on this. Progress has been a bit slow due to all the distractions with WFH.

I might also precede the "Travis PR" with a one-time "fixup PR" addressing existing known formatting issues and with minor fixes to the Python code (to address the more important PyLint ones) and such.

Arvind Shyamsundar

-----Original Message-----
From: Christopher <ct...@apache.org> 
Sent: Thursday, March 26, 2020 9:32 AM
To: fluo-dev <de...@fluo.apache.org>
Subject: [EXTERNAL] Re: Static checks for Muchos code

These seem like good checks. Could execute these checks in Travis CI.
Also, to ignore the `.git` directory, you could change your find command like: find . -type f -a -not -regex '.*/[.]git/.*' -print0

On Thu, Mar 26, 2020 at 12:16 PM Arvind Shyamsundar <ar...@microsoft.com.invalid> wrote:
>
> hi folks,
> As Muchos has a bunch of non-Java code, I'm planning to enhance the tests we have for Muchos to include some static checkers as well. Examples of those include:
>
>
>   *   Ansible-lint (https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fansible%2Fansible-lint&amp;data=02%7C01%7Carvindsh%40microsoft.com%7C5d83f0a9e23c448e2be508d7d1a34d45%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637208371619125824&amp;sdata=yoTp5kgRPUEdFjQg9NwStMIfldeR4AVi2xET93Vn69M%3D&amp;reserved=0) for checking issues with Playbooks
>   *   Check for "no newline at end of file" - I could use some ideas here. I found useful commands online such as [1] which detect this, but I would totally reuse a more robust way if there is one.
>   *   Check for trailing whitespace outside of Ansible playbooks (Ansible-lint checks that for playbooks) - again I found trivial way [2] to do this but would appreciate any tips on more robust ways.
>   *   Maybe also add PyLint (https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pylint.org%2F&amp;data=02%7C01%7Carvindsh%40microsoft.com%7C5d83f0a9e23c448e2be508d7d1a34d45%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637208371619125824&amp;sdata=c92ABhV6gztohZgbjMpboyq%2Bt1LsovffvK4f8h%2B2xNU%3D&amp;reserved=0) for the Python code. This can be noisy, but a one-time cleanup should eliminate most of the problems it will find right now.
>
> Eager to get inputs and discuss before starting work on this.
>
> [1]
> find .-type f -print0 | xargs -0-L1 bash -c 'test "$(tail -c 1 "$0")" && echo "No new line at end of $0"'
>
> [2]
> grep -r '[[:blank:]]$' .
>
> Thanks.
>
> Arvind Shyamsundar

Re: [EXTERNAL] Re: Static checks for Muchos code

Posted by Arvind Shyamsundar <ar...@microsoft.com.INVALID>.
Thanks Christopher. yes in the older email I did mean WFH == working from home!

Sent from Outlook Mobile<https://aka.ms/blhgte>

________________________________
From: Christopher <ct...@apache.org>
Sent: Monday, April 13, 2020 8:08:47 PM
To: fluo-dev <de...@fluo.apache.org>
Subject: Re: [EXTERNAL] Re: Static checks for Muchos code

I saw your PR and commented on it.

Just to clarify my previous question (I used "=?" as an operator to
mean "are these equal?", which I now realize might have been
confusing):
Does "WFH" mean "Working From Home"? Or does it mean something else?
Just asking to make sure I didn't misunderstand the "WFH" comment
earlier in this thread.

On Mon, Apr 13, 2020 at 4:22 PM Arvind Shyamsundar
<ar...@microsoft.com.invalid> wrote:
>
> Thank you for your patience. I have created the PR (https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Ffluo-muchos%2Fpull%2F340&amp;data=02%7C01%7Carvindsh%40microsoft.com%7C6d2f969694894ae2f37a08d7e0213008%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637224305455173500&amp;sdata=p17EsEMJriw2s7Y%2B0ZUsFF6Ks14JVCdjmrPFBoLEc4k%3D&amp;reserved=0) it is a large patch, but most of the changes are formatting and minor changes to Ansible. Hopefully should be reasonable to review.
>
> Arvind Shyamsundar
>
> -----Original Message-----
> From: Christopher <ct...@apache.org>
> Sent: Thursday, April 9, 2020 7:59 PM
> To: fluo-dev <de...@fluo.apache.org>
> Subject: Re: [EXTERNAL] Re: Static checks for Muchos code
>
> On Thu, Apr 9, 2020 at 11:33 AM Arvind Shyamsundar <ar...@microsoft.com.invalid> wrote:
> >
> > Just wanted to update that I am still working on this. Progress has been a bit slow due to all the distractions with WFH.
> >
>
> WFH =? Working from home
>
> > I might also precede the "Travis PR" with a one-time "fixup PR" addressing existing known formatting issues and with minor fixes to the Python code (to address the more important PyLint ones) and such.
> >
>
> Of course.
>
> > Arvind Shyamsundar
> >
> > -----Original Message-----
> > From: Christopher <ct...@apache.org>
> > Sent: Thursday, March 26, 2020 9:32 AM
> > To: fluo-dev <de...@fluo.apache.org>
> > Subject: [EXTERNAL] Re: Static checks for Muchos code
> >
> > These seem like good checks. Could execute these checks in Travis CI.
> > Also, to ignore the `.git` directory, you could change your find
> > command like: find . -type f -a -not -regex '.*/[.]git/.*' -print0
> >
> > On Thu, Mar 26, 2020 at 12:16 PM Arvind Shyamsundar <ar...@microsoft.com.invalid> wrote:
> > >
> > > hi folks,
> > > As Muchos has a bunch of non-Java code, I'm planning to enhance the tests we have for Muchos to include some static checkers as well. Examples of those include:
> > >
> > >
> > >   *   Ansible-lint (https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fansible%2Fansible-lint&amp;data=02%7C01%7Carvindsh%40microsoft.com%7C6d2f969694894ae2f37a08d7e0213008%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637224305455173500&amp;sdata=umzbckCRymcFKoSrrWg%2BuaIKfmC5DVjzSnARu4p12A4%3D&amp;reserved=0) for checking issues with Playbooks
> > >   *   Check for "no newline at end of file" - I could use some ideas here. I found useful commands online such as [1] which detect this, but I would totally reuse a more robust way if there is one.
> > >   *   Check for trailing whitespace outside of Ansible playbooks (Ansible-lint checks that for playbooks) - again I found trivial way [2] to do this but would appreciate any tips on more robust ways.
> > >   *   Maybe also add PyLint (https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pylint.org%2F&amp;data=02%7C01%7Carvindsh%40microsoft.com%7C6d2f969694894ae2f37a08d7e0213008%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637224305455173500&amp;sdata=EUzFUT4J9eN56X32Xfj8HNTOBpUL8wCupJh8dNqjRBY%3D&amp;reserved=0) for the Python code. This can be noisy, but a one-time cleanup should eliminate most of the problems it will find right now.
> > >
> > > Eager to get inputs and discuss before starting work on this.
> > >
> > > [1]
> > > find .-type f -print0 | xargs -0-L1 bash -c 'test "$(tail -c 1 "$0")" && echo "No new line at end of $0"'
> > >
> > > [2]
> > > grep -r '[[:blank:]]$' .
> > >
> > > Thanks.
> > >
> > > Arvind Shyamsundar

Re: [EXTERNAL] Re: Static checks for Muchos code

Posted by Christopher <ct...@apache.org>.
I saw your PR and commented on it.

Just to clarify my previous question (I used "=?" as an operator to
mean "are these equal?", which I now realize might have been
confusing):
Does "WFH" mean "Working From Home"? Or does it mean something else?
Just asking to make sure I didn't misunderstand the "WFH" comment
earlier in this thread.

On Mon, Apr 13, 2020 at 4:22 PM Arvind Shyamsundar
<ar...@microsoft.com.invalid> wrote:
>
> Thank you for your patience. I have created the PR (https://github.com/apache/fluo-muchos/pull/340) it is a large patch, but most of the changes are formatting and minor changes to Ansible. Hopefully should be reasonable to review.
>
> Arvind Shyamsundar
>
> -----Original Message-----
> From: Christopher <ct...@apache.org>
> Sent: Thursday, April 9, 2020 7:59 PM
> To: fluo-dev <de...@fluo.apache.org>
> Subject: Re: [EXTERNAL] Re: Static checks for Muchos code
>
> On Thu, Apr 9, 2020 at 11:33 AM Arvind Shyamsundar <ar...@microsoft.com.invalid> wrote:
> >
> > Just wanted to update that I am still working on this. Progress has been a bit slow due to all the distractions with WFH.
> >
>
> WFH =? Working from home
>
> > I might also precede the "Travis PR" with a one-time "fixup PR" addressing existing known formatting issues and with minor fixes to the Python code (to address the more important PyLint ones) and such.
> >
>
> Of course.
>
> > Arvind Shyamsundar
> >
> > -----Original Message-----
> > From: Christopher <ct...@apache.org>
> > Sent: Thursday, March 26, 2020 9:32 AM
> > To: fluo-dev <de...@fluo.apache.org>
> > Subject: [EXTERNAL] Re: Static checks for Muchos code
> >
> > These seem like good checks. Could execute these checks in Travis CI.
> > Also, to ignore the `.git` directory, you could change your find
> > command like: find . -type f -a -not -regex '.*/[.]git/.*' -print0
> >
> > On Thu, Mar 26, 2020 at 12:16 PM Arvind Shyamsundar <ar...@microsoft.com.invalid> wrote:
> > >
> > > hi folks,
> > > As Muchos has a bunch of non-Java code, I'm planning to enhance the tests we have for Muchos to include some static checkers as well. Examples of those include:
> > >
> > >
> > >   *   Ansible-lint (https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fansible%2Fansible-lint&amp;data=02%7C01%7Carvindsh%40microsoft.com%7C98c31420f82144eef9d808d7dcfb2ebc%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637220843697191216&amp;sdata=m2oeaovq2ePc7xWfZ7%2FGMl%2B%2BsKJOODo%2FicwQ%2FkPwBPg%3D&amp;reserved=0) for checking issues with Playbooks
> > >   *   Check for "no newline at end of file" - I could use some ideas here. I found useful commands online such as [1] which detect this, but I would totally reuse a more robust way if there is one.
> > >   *   Check for trailing whitespace outside of Ansible playbooks (Ansible-lint checks that for playbooks) - again I found trivial way [2] to do this but would appreciate any tips on more robust ways.
> > >   *   Maybe also add PyLint (https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pylint.org%2F&amp;data=02%7C01%7Carvindsh%40microsoft.com%7C98c31420f82144eef9d808d7dcfb2ebc%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637220843697191216&amp;sdata=Lh4PC8HMy2CAT%2ByY107nr%2F1%2BxcJVhZcaxvWRr2W0DQM%3D&amp;reserved=0) for the Python code. This can be noisy, but a one-time cleanup should eliminate most of the problems it will find right now.
> > >
> > > Eager to get inputs and discuss before starting work on this.
> > >
> > > [1]
> > > find .-type f -print0 | xargs -0-L1 bash -c 'test "$(tail -c 1 "$0")" && echo "No new line at end of $0"'
> > >
> > > [2]
> > > grep -r '[[:blank:]]$' .
> > >
> > > Thanks.
> > >
> > > Arvind Shyamsundar

RE: [EXTERNAL] Re: Static checks for Muchos code

Posted by Arvind Shyamsundar <ar...@microsoft.com.INVALID>.
Thank you for your patience. I have created the PR (https://github.com/apache/fluo-muchos/pull/340) it is a large patch, but most of the changes are formatting and minor changes to Ansible. Hopefully should be reasonable to review.

Arvind Shyamsundar

-----Original Message-----
From: Christopher <ct...@apache.org> 
Sent: Thursday, April 9, 2020 7:59 PM
To: fluo-dev <de...@fluo.apache.org>
Subject: Re: [EXTERNAL] Re: Static checks for Muchos code

On Thu, Apr 9, 2020 at 11:33 AM Arvind Shyamsundar <ar...@microsoft.com.invalid> wrote:
>
> Just wanted to update that I am still working on this. Progress has been a bit slow due to all the distractions with WFH.
>

WFH =? Working from home

> I might also precede the "Travis PR" with a one-time "fixup PR" addressing existing known formatting issues and with minor fixes to the Python code (to address the more important PyLint ones) and such.
>

Of course.

> Arvind Shyamsundar
>
> -----Original Message-----
> From: Christopher <ct...@apache.org>
> Sent: Thursday, March 26, 2020 9:32 AM
> To: fluo-dev <de...@fluo.apache.org>
> Subject: [EXTERNAL] Re: Static checks for Muchos code
>
> These seem like good checks. Could execute these checks in Travis CI.
> Also, to ignore the `.git` directory, you could change your find 
> command like: find . -type f -a -not -regex '.*/[.]git/.*' -print0
>
> On Thu, Mar 26, 2020 at 12:16 PM Arvind Shyamsundar <ar...@microsoft.com.invalid> wrote:
> >
> > hi folks,
> > As Muchos has a bunch of non-Java code, I'm planning to enhance the tests we have for Muchos to include some static checkers as well. Examples of those include:
> >
> >
> >   *   Ansible-lint (https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fansible%2Fansible-lint&amp;data=02%7C01%7Carvindsh%40microsoft.com%7C98c31420f82144eef9d808d7dcfb2ebc%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637220843697191216&amp;sdata=m2oeaovq2ePc7xWfZ7%2FGMl%2B%2BsKJOODo%2FicwQ%2FkPwBPg%3D&amp;reserved=0) for checking issues with Playbooks
> >   *   Check for "no newline at end of file" - I could use some ideas here. I found useful commands online such as [1] which detect this, but I would totally reuse a more robust way if there is one.
> >   *   Check for trailing whitespace outside of Ansible playbooks (Ansible-lint checks that for playbooks) - again I found trivial way [2] to do this but would appreciate any tips on more robust ways.
> >   *   Maybe also add PyLint (https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pylint.org%2F&amp;data=02%7C01%7Carvindsh%40microsoft.com%7C98c31420f82144eef9d808d7dcfb2ebc%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637220843697191216&amp;sdata=Lh4PC8HMy2CAT%2ByY107nr%2F1%2BxcJVhZcaxvWRr2W0DQM%3D&amp;reserved=0) for the Python code. This can be noisy, but a one-time cleanup should eliminate most of the problems it will find right now.
> >
> > Eager to get inputs and discuss before starting work on this.
> >
> > [1]
> > find .-type f -print0 | xargs -0-L1 bash -c 'test "$(tail -c 1 "$0")" && echo "No new line at end of $0"'
> >
> > [2]
> > grep -r '[[:blank:]]$' .
> >
> > Thanks.
> >
> > Arvind Shyamsundar

Re: [EXTERNAL] Re: Static checks for Muchos code

Posted by Christopher <ct...@apache.org>.
On Thu, Apr 9, 2020 at 11:33 AM Arvind Shyamsundar
<ar...@microsoft.com.invalid> wrote:
>
> Just wanted to update that I am still working on this. Progress has been a bit slow due to all the distractions with WFH.
>

WFH =? Working from home

> I might also precede the "Travis PR" with a one-time "fixup PR" addressing existing known formatting issues and with minor fixes to the Python code (to address the more important PyLint ones) and such.
>

Of course.

> Arvind Shyamsundar
>
> -----Original Message-----
> From: Christopher <ct...@apache.org>
> Sent: Thursday, March 26, 2020 9:32 AM
> To: fluo-dev <de...@fluo.apache.org>
> Subject: [EXTERNAL] Re: Static checks for Muchos code
>
> These seem like good checks. Could execute these checks in Travis CI.
> Also, to ignore the `.git` directory, you could change your find command like: find . -type f -a -not -regex '.*/[.]git/.*' -print0
>
> On Thu, Mar 26, 2020 at 12:16 PM Arvind Shyamsundar <ar...@microsoft.com.invalid> wrote:
> >
> > hi folks,
> > As Muchos has a bunch of non-Java code, I'm planning to enhance the tests we have for Muchos to include some static checkers as well. Examples of those include:
> >
> >
> >   *   Ansible-lint (https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fansible%2Fansible-lint&amp;data=02%7C01%7Carvindsh%40microsoft.com%7C5d83f0a9e23c448e2be508d7d1a34d45%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637208371619125824&amp;sdata=yoTp5kgRPUEdFjQg9NwStMIfldeR4AVi2xET93Vn69M%3D&amp;reserved=0) for checking issues with Playbooks
> >   *   Check for "no newline at end of file" - I could use some ideas here. I found useful commands online such as [1] which detect this, but I would totally reuse a more robust way if there is one.
> >   *   Check for trailing whitespace outside of Ansible playbooks (Ansible-lint checks that for playbooks) - again I found trivial way [2] to do this but would appreciate any tips on more robust ways.
> >   *   Maybe also add PyLint (https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pylint.org%2F&amp;data=02%7C01%7Carvindsh%40microsoft.com%7C5d83f0a9e23c448e2be508d7d1a34d45%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637208371619125824&amp;sdata=c92ABhV6gztohZgbjMpboyq%2Bt1LsovffvK4f8h%2B2xNU%3D&amp;reserved=0) for the Python code. This can be noisy, but a one-time cleanup should eliminate most of the problems it will find right now.
> >
> > Eager to get inputs and discuss before starting work on this.
> >
> > [1]
> > find .-type f -print0 | xargs -0-L1 bash -c 'test "$(tail -c 1 "$0")" && echo "No new line at end of $0"'
> >
> > [2]
> > grep -r '[[:blank:]]$' .
> >
> > Thanks.
> >
> > Arvind Shyamsundar