Hi,

I just landed the patch in
https://bugzilla.mozilla.org/show_bug.cgi?id=880088, which added a
|check-style| make target that does some style checks on SpiderMonkey.

The current checks are all related to header files and #includes:

- No cyclic dependencies between header files.

- No normal header should #include a inlines.h/-inl.h file.

- #include statements should use full paths, e.g. "ion/Ion.h", not "Ion.h".

- #includes should use the appropriate form for system headers (<...>) and
  local headers ("...").

- https://bugzilla.mozilla.org/show_bug.cgi?id=898274 is also open for
checking the order of #include statements.

The |check-style| target is invoked by |make check|, so if you violate
any of these checks you'll get TBPL bustage.

It's implemented as a python script,
config/check_spidermonkey_style.py, which checks for some style
violations.  (And there are some test files in js/src/tests/style/.)
There is plenty of scope for adding further checks.  Please ask me if
you have questions.  Thanks!

Nick
_______________________________________________
dev-tech-js-engine-internals mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to