Skip to content

Commit

Permalink
[lint] Update checkCopyright to handle sexp dune files
Browse files Browse the repository at this point in the history
Summary: With plain/sexp dune files we need to support lisp style comments in checkCopyright

Reviewed By: jvillard

Differential Revision: D20366314

fbshipit-source-id: 04db9e3c1
  • Loading branch information
artempyanykh authored and facebook-github-bot committed Mar 11, 2020
1 parent fcce3c0 commit fc5b092
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion infer/src/scripts/checkCopyright.ml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ let comment_style_python = Line ("#", false)

let comment_style_shell = Line ("#", true)

let comment_style_lisp = Line (";", false)

let comment_styles_lang =
[ (comment_style_al, "AL")
; (comment_style_c, "C")
; (comment_style_lisp, "Lisp")
; (comment_style_llvm, "LLVM")
; (comment_style_m4, "M4")
; (comment_style_make, "Makefile")
Expand Down Expand Up @@ -241,10 +244,15 @@ let com_style_of_lang =
; (".re", comment_style_c)
; (".rei", comment_style_c)
; (".sh", comment_style_shell)
; ("dune", comment_style_lisp)
; ("dune.in", comment_style_ocaml)
; ("dune.common", comment_style_lisp)
; ("dune.common.in", comment_style_ocaml)
; ("dune-common", comment_style_lisp)
; ("dune-common.in", comment_style_ocaml)
; ("dune-workspace.in", comment_style_llvm)
; ("dune-project", comment_style_lisp)
; ("dune-workspace", comment_style_lisp)
; ("dune-workspace.in", comment_style_lisp)
; ("Makefile", comment_style_make) ]


Expand Down

0 comments on commit fc5b092

Please sign in to comment.