package ppx_js_style
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=4a81ccd94dfde5c21567f73c8c55924556ee76f1973ab631a679e15405b91589
md5=c705aeb1aef70acd8ff0a91108dedd31
Description
Part of the Jane Street's PPX rewriters collection.
This packages is a no-op ppx rewriter. It is used as a 'lint' tool to enforce some coding conventions across all Jane Street packages.
Published: 15 Dec 2017
README
ppx_js_style - Enforce Jane Street coding styles
ppx_js_style is an identity ppx rewriter that enforces Jane Street coding styles.
Coding rules
The following rules are enforced by ppx_js_style:
Enabled by -dated-deprecation:
[@@deprecated]
attributes must contain the date of deprecation, using the format"[since MM-YYYY] ..."
N.B. this check, on by default at janestreet, but off by default externally, can also be disabled with the flag -no-dated-deprecationEnabled by -annotated-ignores: Ignored expressions must come with a type annotation, such as:
ignore (expr : typ)
let _ : type = expr
Note that aliases need not be annotated:let _ = Foo.bar in
Enabled by -check-doc-comments: Comments in mli must either be documentation comments or explicitely "ignored":
(** documentation comment *)
(*_ ignored comment *)
Normal(* comment *)
comments are disallowed.This flag additionally enables warning 50, which checks the placement of documentation comments.
Finally, doc comments are checked to be syntactically valid.
Enabled by -compat-32: Checks that calling ocamlc on the input would produce bytecode that works on 32 bits architectures (including js_of_ocaml), ie that all constant are representable on 32 bits architectures. Compared to the compiler flag by the same name, it allows to perform this check without building any bytecode.
Dependencies (7)
- octavius
-
ocaml-migrate-parsetree
>= "0.4" & < "2.0.0"
-
jbuilder
>= "1.0+beta12"
-
ppx_metaquot
>= "v0.10" & < "v0.11"
-
ppx_driver
>= "v0.10" & < "v0.11"
-
ppx_core
>= "v0.10" & < "v0.11"
-
ocaml
>= "4.04.1"
Dev Dependencies
None
Used by (3)
-
parsexp
= "v0.10.0"
-
parsexp_io
= "v0.10.0"
-
ppx_base
= "v0.10.0"
Conflicts
None