雖然程式碼的存在是為了讓電腦編譯或執行,但它也是 人類閱讀。只要是有效的語法 只要它是有效的語法。但是,您可以在 的格式和樣式,使代碼更容易被人類閱讀。 人類的可讀性。

這些大多是簡單的事情,例如縮排的一致性、 間距和行長。每種語言都有它自己的慣例;每個專案都會有它自己對這些慣例的專門化。 專案都會有其專屬的慣例。BeeWare 也不例外。

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.

但它不僅限於程式碼風格。任何可以 客觀測量的任何檢查都可以作為預合併 程序的一部分。這可能包括

  • 檢查是否有開發者原產地證書、貢獻者授權 協議或其他貢獻授權程序。
  • 評估程式碼複雜性
  • 評估程式碼涵蓋率

和許多其他。

Beefore 可利用您的持續整合流程 在合併提交之前執行測試套件 (例如、 Travis-CI)。Beefore 測試以自訂測試運行的方式執行。

How to help

  • 改善現有的定義器
  • 整合新的定義器和樣式檢查(例如 Java)

So, why is it called "Beefore"?

它會在您合併修補程式之前,檢查所有您必須具備的條件。 修補程式。