Hi, everyone, So far, we had been using a homegrown script called lint.py in the "check coding style" step of our trybots whenever a pull request was created or updated. This script had a number of limitations and was raising several false positives especially with chromium-crosswalk pull requests. It has finally been dropped and replaced by a PRESUBMIT.py script in pull request #3636 (XWALK-1853).
Presubmit scripts are used in Chromium and other upstream projects, and are generally run when a patch is uploaded or going to be committed via Chromium's commit queue. They are regular Python scripts, and thus can do *a lot more* than just checking coding style. More information can be found here: <https://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts> In practice, this means that whenever a new chromium-crosswalk, v8-crosswalk or Crosswalk pull request is created/updated, something similar to this will be run: presubmit_support.py --upload --skip_canned CheckOwners \ --upstream origin/master v8-crosswalk and chromium-crosswalk pull requests will run the upstream projects' respective PRESUBMIT.py scripts, meaning it will correctly differentiate the coding style in Chromium and Blink, for example, in addition to checking line endings, whether forbidden functions are being used and a number of other things. I have added a small PRESUBMIT.py to Crosswalk which runs cpplint (like we were doing before, but better) and also performs a few other small checks. Here is where you can help! If you open Crosswalk's PRESUBMIT.py you will see that several checks are disabled (including some very useful ones that check the copyright header in all files and do code checks on Java files). I would like to enable all of them, but we need to fix all violations that they report first: * Open PRESUBMIT.py * Choose a commented out check you'd like to enable and uncomment it out. * Run presubmit_support.py --upload --skip_canned CheckOwners \ --upstream e15c294f4be2d14590582d9f6876e2680209581e That is the hash of the first commit in the Crosswalk git repository, and the whole line makes PRESUBMIT.py check all existing files. * Fix the reported violations. * Send a pull request with everything you have done. Happy hacking! _______________________________________________ Crosswalk-dev mailing list Crosswalk-dev@lists.crosswalk-project.org https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev