- From: James Graham <james@hoppipolla.co.uk>
- Date: Fri, 09 May 2014 16:11:17 +0100
- To: public-test-infra@w3.org
On 08/05/14 23:19, James Graham wrote: > I wonder if it would be worth going to 150 as a limit? Does anyone else > know of path prefix length requirements from infrastructure on which > they want to run the tests? I have now landed a change that keeps the whole repository under a path length limit of 150 characters. In order to achieve this I had to move some template element parsing tests to live with the other parsing tests rather than with the tests for the template element semantics. Fortunately this move was needed anyway to match the location of the relevant requirements in the spec. As a result I can now at least package tests on Windows. The next step is to ensure that wptrunner works in that environment. > In any case we need some kind of automatic enforcement here. Since we > don't get pre-commit hooks on GitHub, I wonder if it's possible to use > TravisCI to lint incoming test submissions. There are some other simple > things that we could check for like trailing whitespace (with a > whitelist of files that require it ofc). I also made a lint script in tools/scripts/lint.py This is designed to allow us to enforce various rules about the repository. It currently enforces no CR at end of line and no paths > 150 characters. In the future I plan to add tests for <script> elements pointing to testharness.js in the wrong location, missing testharnessreport.js, and whatever else we think of that's relatively easy to implement. In order to deal with cases where the lint is wrong (e.g. files that require a trailing CR as part of the test), there is a lint.whitelist file in the same directory. This specifies a set of rules to ignore specific errors and has some documentation inline. In order to ensure that the lint is run, we can use TravisCI; I think this just requires someone with appropriate permissions for the repo to tun on the relevant hook. There is already a config file checked in that should tell it to run the lint.
Received on Friday, 9 May 2014 15:11:41 UTC