Although code exists to be compiled or executed by a computer, it's also there to be read by humans. A computer doesn't care what code looks like, as long as it's valid syntax. However, there's a lot you can do in the formatting and styling of code to make that code even more readable by humans.
These are mostly simple things, like consistency in indentation, spacing, and line length. Every language has it's own conventions; each project will have it's own specialisations of those conventions. BeeWare is no exception.
Someone reviewing a patch still needs to check for correct logic, but these simple style-check tasks are easy to check programatically. Many text editors will (or have extensions that will) do this process for you - the task is called linting. Beefore is a tool that allows you to integrate these checks into your Github pre-merge procedure, in the same way that can integrate continuous integration and test suite compliance before merging.
It isn't just limited to code style though. Any check that can be objectively measured can be performed as part of the pre-merge procedure. This could include:
- Checking for a Developer Certificate of Origin, Contributor License Agreement, or some other contribution licensing procedure.
- Evaluating code complexity
- Evaluating code coverage
and many others.
Beefore piggybacks on your the continuous integration process you already use to run your test suite before merging commits (e.g., Travis-CI). The Beefore tests are executed as a custom test run.
How to help
- Improving existing linters
- Integrating new linters and style checks (e.g., Java)
So, why is it called "Beefore"?
It checks for all the things you have to have right before you merge a patch.
- Project Type:
- Early Development
- Platform independent