Hi Moaz, I agree with you. We did take some efforts to improve the code quality.  introduces some tools for enforcing the coding style.  introduces some tools for adding documentations.
The current issue is that our contributors may have applied different coding styles and tools using their different editors. I suggest to do some tests during the CI process, e.g., running the cpplint and pylint. If all tests pass, then we merge the PR. Thanks! Best, Wei . http://singa.apache.org/en/develop/contribute-code.html . http://singa.apache.org/en/develop/contribute-docs.html On Sun, Sep 15, 2019 at 2:36 AM Moaz Reyad <m...@apache.org> wrote: > Dear team, > > Since SINGA is going to graduate soon from the incubator, I propose to use > some tools to ensure high code quality. These tools check for known > problems in the code and provide a detailed report for fixing them. May be > some code came from scientific experimental projects. We need to improve > this code according to industry standards, so it can be used with more real > life projects. > > 1. I propose to add the code quality tools (cpplint, pylint and > lgtm) to SINGA contribution guideline, so that each developer is > encouraged to install and run code quality checks in his local repo and fix > any problems before creating a pull request. > > 1.A CPP Lint: running cpplint in the src directory shows 822 errors, while > running in the include directory shows 708 errors. The guidelines  has > an outdated information that instructs developers to use an old > non-existing file tool/cpplint.py. > > 1.B Python Lint: running pylint in python/singa shows 5.00/10 rating, while > running in python/rafiki shows 0.00/10 rating. > > 1.C LGTM :There is a Jira ticket for adding LGTM badges to the README, > so the quality of the code becomes more clear to everyone. LGTM pull > request automation can't be enabled in Apache repo due to infra > restrictions, but it works on personal forks of the project. Currently > LGTM rates both C++ and Python code in SINGA as grade D. > > 2. I propose also to give the code quality higher priority in the next > release since it is probably going to be the first release after > graduation. The team is invited to fix as much as possible from the current > code issues and to use tools that check their new code before pushing it to > SINGA. Let's try to make the lgtm grade and lint rating as high as > possible. > > Improving code quality is required to attract new users and developers. > Users will trust more the project with better code and developers will be > happy to contribute to it. It will also make the code review process easier > and more productive instead of wasting time in finding and fixing known > code problems. > > New developers (or old developers who did not contribute for a while and > would like to warm up) can start working on fixing lgtm and lint issues, > since they are usually easy and there is a clear explanation of the problem > and how to solve it. > > What do you think? > > p.s. This discussion is the first topic in a series of proposals to improve > SINGA as it will be an Apache top level project soon. The next proposal > will discuss improving the build and test pipeline in a separate thread to > avoid discussing too many things in one thread. > > best regards, > Moaz > >  https://pypi.org/project/cpplint/ >  https://www.pylint.org/ >  https://lgtm.com/ >  http://singa.apache.org/develop/contribute-code.html >  https://issues.apache.org/jira/projects/SINGA/issues/SINGA-484 >  https://issues.apache.org/jira/browse/INFRA-17954 >