Skip to content

[New feature] Syntactic check for let ... in #176

@david-maison

Description

@david-maison

I would like to force encourage some developers to use a more readable code style.
One of the most important thing to make the code more readable IMO is about the let .. in construction:
the in keyword should be either on the same line of the let keyword, or alone on its own line.

Example:

(* Valid *)
let a = 0 in
()

(* Valid *)
let a =
  do_something "that need to add a newline to respect the 80chars rule"
in
()

(* Permitted (but I'm not fan about this style) *)
let a = do_something "that need to add a newline to respect the 80chars rule" 
in
()

(* Invalid *)
let a =
  do_something () in
()

(* Invalid *)
let a =
  do_somehtign_with_typos ()
in ()

What do you think about this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions