Commit graph

151 commits

Author SHA1 Message Date
edunham
48ace17b54 Improve tidy's license validation logic
fixes https://github.com/servo/servo/issues/10716

I took the lazy way out and hardcoded the size of block we examine for
licenses.

fixes https://github.com/servo/servo/issues/10719

Includes tests for new functionality.
2016-08-12 13:32:09 +02:00
Ms2ger
e99cb474f0 Update ordered-float. 2016-08-11 09:13:22 +02:00
Simon Martin
1e60c915f9 Issue #12421: tidy should also check .html files 2016-08-09 22:04:57 +02:00
Ravi Shankar
a04028eede Prefer length and percentage for word spacing 2016-08-09 17:53:40 +05:30
Aneesh Agrawal
f07d8f188a Add lint for [ instead of [[ in shells scripts 2016-08-05 09:42:04 -04:00
Aneesh Agrawal
9231ca1c69 Add lint to ensure substitutions use the full form
Check that any variable substitutions use the full ${VAR} form,
not just $VAR (but don't check for quoting yet).
2016-08-05 09:29:10 -04:00
Aneesh Agrawal
79ef9b4efc Add lint for backticks in shell scripts
The "$(some_command arg1 arg2)" form is preferred to the
`some_command arg1 arg2` form because it nests unambiguously.
Add a lint for this to tidy.
2016-08-05 09:29:09 -04:00
Jim Berlage
7952bd00b6 Add linting for shell scripts
This changes tidy to check shell scripts for the proper shebang and
options.  It does not check that variables are formatted correctly.  It
also adds a check for the MPL 2.0 license in shell scripts.
2016-07-22 11:53:14 -05:00
bors-servo
de4eaa4f21 Auto merge of #12511 - asajeffrey:test-tidy-dep-licenses, r=larsbergstrom
Added test-tidy for dependent licenses.

<!-- Please describe your changes on the following line: -->

Add a test-tidy lint for dependency licenses. Note that #12507 should land first.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because we don't test our lints

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12511)
<!-- Reviewable:end -->
2016-07-21 12:23:24 -05:00
Alan Jeffrey
536314be79 Added test-tidy for dependent licenses. 2016-07-21 11:29:04 -05:00
Jeena Lee
530b02790b Add the append method for the Headers API for the Fetch API
This commit will add the append method and associated helper functions, and introduce any necessary changes for it.
2016-07-19 13:40:31 -07:00
Alan Jeffrey
9fa54af347 Allow MIT/Apache-2.0 license as well as MPL-2.0. 2016-07-14 11:24:29 -05:00
Alan Jeffrey
62e95c5a61 All our Cargo.toml files should contain an MPL-2.0 license field. 2016-07-14 10:26:34 -05:00
Owen Coutts
ff4cb7f80a [tidy] check for duplicate keys in .json files 2016-07-08 11:12:12 +02:00
Nikhil Shagrithaya
be98fc4c59 tidy command now ignores files in subdirectories of ignored directories 2016-07-07 15:06:06 +05:30
Emilio Cobos Álvarez
eb77873989
stylo: Move all binding-generator code to a python script.
This not only makes us more consistent with the rest of the codebase but also:

 * Makes us repeat less code like common flags and all that stuff.
 * Reduces the noise of the build: You only get the output of the commands on
   failure or when you pass the -v flag.
 * Makes you able to select a single kind of build or multiple in the same
   place.

I've basically kept the regen.sh script because of the LIBCLANG_PATH checks, but
at least from Linux I don't need them anymore. Also, that logic could be moved
to the new script.

The whole point of this isn't only making it prettier and easier to use, but
also allowing me to write more complex logic in the binding generator scripts,
that I will probably need to integrate the DOM enum types we need for animations
and such easily (can't be just an include, because that pulls in another header
with the same name bringing a lot of DOM and IDL churn).
2016-07-05 20:14:39 -07:00
Travis Dean
6642358217 Add style check, test, and code fixes for an else brace check. 2016-07-04 18:38:13 -04:00
Ms2ger
79b1e6c40c Update web-platform-tests to revision 346d5b51a122f7bb1c7747064499ef281a0200f7 2016-06-24 11:36:34 +02:00
Ravi Shankar
dfe32b0ada Removed unused function and minor cleanup 2016-06-16 00:07:21 +05:30
bors-servo
bc2f4c3450 Auto merge of #11621 - h4xr:mach_fix, r=Wafflespeanut
Make mach test-tidy consider ignored dirs

Made changes so that mach test-tidy considers the ignored directories

Fixes #11386

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11621)
<!-- Reviewable:end -->
2016-06-14 23:33:52 -05:00
Saurabh Badhwar
28312d0e17 Make mach consider ignored dirs
Address indentation changes
2016-06-15 09:58:04 +05:30
Patrick Walton
0d963f5bf8 servo: Add an Info.plist on the Mac and opt into integrated graphics.
Discrete GPUs cause power use problems and tend to perform badly with
WebRender.

See:

* https://developer.apple.com/library/mac/qa/qa1734/_index.html

* https://reverse.put.as/2013/05/28/gimmedebugah-how-to-embedded-a-info-plist-into-arbitrary-binaries/
2016-06-08 12:29:44 -07:00
bors-servo
93f137f06d Auto merge of #11190 - mrmiywj:Root-tidy-checker, r=jdm
add &Root<T> checker

Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data:
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11137  (github issue number if applicable).

Either:
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11190)
<!-- Reviewable:end -->
2016-06-05 08:48:58 -05:00
mrmiywj
a17ae72414 add &Root<T> checker
update rust_tidy tests

update rust_tidy.rs and test_tidy.py
2016-06-05 15:43:35 +08:00
Cameron McCormack
1a25467cea Generate debug and release Gecko bindings. 2016-06-03 16:52:09 +10:00
Rahul Sharma
15a2064c0d implement related sw interface and register method 2016-06-02 04:09:39 +05:30
Lars Bergstrom
02c7e06d54 Remove the gonk port 2016-05-27 19:33:43 -05:00
Josh Matthews
4ebc065cba Warn about empty lines following an open brace. 2016-05-27 13:30:51 -04:00
Cullen Rhodes
40acd24e8f Report use statements that use {} with only one entry 2016-05-27 10:18:44 +01:00
Rebecca
6a540cfcd9 Add mozilla tests for referrer policy in iframe without postmessage
Can be removed and web-platform-tests not ignored with postmessage support
2016-05-26 15:19:09 +02:00
Mitchell Hentges
29da462136 Add --all for test-tidy, with backwards-compat with --faster 2016-05-24 22:23:37 +02:00
bors-servo
e3be7184fb Auto merge of #11242 - bholley:gecko_atoms, r=emilio
Add basic support for Gecko atoms

This is a rough initial implementation of gecko atoms. This allows us to get rid of the custom rust-selectors branch we use to build stylo.

The gecko changes are at https://bugzilla.mozilla.org/show_bug.cgi?id=1273771

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11242)
<!-- Reviewable:end -->
2016-05-18 11:35:28 -07:00
Bobby Holley
b521c293dc Add string_cache override for geckolib based on gecko atoms.
The work in these patches is based on Ms2ger's gecko-atom crate.
2016-05-18 11:33:38 -07:00
Ms2ger
c652995d16 Support test-tidy --faster with moved files. 2016-05-18 11:09:29 +02:00
Anthony Ramine
3cda52c6a4 Disallow bitflags dupes again 2016-05-18 00:23:18 +02:00
bors-servo
8c2c0bd964 Auto merge of #10713 - aeischeid:master, r=jdm
add tidy test for space after ":" in stucts

Addresses issue #10702

the tidy self-test doesn't seem to catch the `member_name:"Foo"` line like it should. the regex follows similar pattern in the file and works in my regex tester tool, so not really sure what is going on there.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10713)
<!-- Reviewable:end -->
2016-05-11 16:27:37 -07:00
Bobby Holley
d6a6f2c7e0 Hoist gecko bindings into their own crate.
This will be helpful for leveraging the bindings with our nsIAtom-backed
string_cache replacement.
2016-05-11 14:32:26 -07:00
aeischeid
fa4665e2a7 add tidy test for 'missing space after :' in stucts 2016-05-11 16:19:17 -05:00
Matt Brubeck
9b680ad58a Update hyper, openssl, wayland, threadpool, offscreen_gl_context
Gets rid of duplicate versions of bitflags and xml-rs!
2016-05-06 08:42:00 -07:00
Matt Brubeck
a2b0585ffd Update lazy_static, selectors, string_cache, futf, quickersort 2016-05-02 16:05:31 -07:00
askeing
33d8e21cff Adding parameter to tidy for skipping print text when running tests 2016-04-26 01:27:08 +09:00
bors-servo
04f8ae56db Auto merge of #10786 - zwn:tidy-modelines, r=Manishearth
tidy check for vim and emacs modelines

See #10719.

It skips *.webidl files for now since I am not sure where they come from and if they should be edited in tree or not.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10786)
<!-- Reviewable:end -->
2016-04-22 21:46:30 -07:00
Zbynek Winkler
39780ca39f Report lines starting with &&. 2016-04-22 14:28:20 +02:00
Zbynek Winkler
01b111c43e Add newline to the output.
The last line of output from tidy did not end with a newline if some
errors were reported.
2016-04-22 14:28:17 +02:00
Per Lundberg
4643737a1b Applied a bunch of suggestions from Simon. 2016-04-21 22:42:35 +03:00
Per Lundberg
d0489f1160 Improve properties.mako.rs file structure, take 2
This is a new attempt of #10586, after Simon Sapin's great cleanups in #10749 has landed. I have adjusted the changes to the new structure that was introduced, and also only done a few of the longhand ones. Will certainly continue on this as soon as we have a basic agreement that this style is reasonable.
2016-04-21 22:42:35 +03:00
Zbynek Winkler
b6b8ac6cd3 tidy check for vim and emacs modelines.
See https://github.com/servo/servo/issues/10719.
2016-04-21 17:52:09 +02:00
Maciej Skrzypkowski
22d991d4e0 Test for check_spec function, for tidy.py #9152 2016-04-17 04:12:54 +09:00
askeing
88c94f285e Check the "tests/wpt/web-platform-tests" folder before loading "tools.lint" module 2016-04-17 03:27:50 +09:00
askeing
ee433a030c Add servo_tidy_tests into ignore dirs, and modify setup.py to fit the tidy check
- fix the issue of '$ ./mach test-tidy --no-progress'
2016-04-15 11:16:03 +08:00