fluo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher <ctubb...@apache.org>
Subject Re: Static checks for Muchos code
Date Thu, 26 Mar 2020 16:32:22 GMT
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
<arvindsh@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://github.com/ansible/ansible-lint) for checking issues with
>   *   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://www.pylint.org/) 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

View raw message