Skip to content

Commit

Permalink
tests: Coverage improvements
Browse files Browse the repository at this point in the history
Signed-off-by: Kakadu <Kakadu@pm.me>
  • Loading branch information
Kakadu committed May 9, 2023
1 parent ce1e168 commit 4480ad2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/Dune_project.ml
Expand Up @@ -11,15 +11,15 @@ type module_ =
; cmt : string option
; cmti : string option
}
[@@deriving sexp]
[@@deriving of_sexp]

type executables =
{ names : string list
; modules : module_ list
; requires : string list
; include_dirs : string list
}
[@@deriving sexp]
[@@deriving of_sexp]

module Library = struct
type t =
Expand All @@ -31,12 +31,12 @@ module Library = struct
; modules : module_ list
; include_dirs : string list
}
[@@deriving sexp]
[@@deriving of_sexp]
end

type t =
| Executables of executables
| Library of Library.t
| Root of string
| Build_context of string
[@@deriving sexp]
[@@deriving of_sexp]
2 changes: 1 addition & 1 deletion src/untyped/Dollar.ml
Expand Up @@ -8,7 +8,7 @@ open Format
open Zanuda_core
open Utils

let is_camel_case s = String.(lowercase s <> s)
(* let is_camel_case s = String.(lowercase s <> s) *)
let lint_id = "camel_extra_dollar"
let lint_source = LINT.FPCourse
let level = LINT.Warn
Expand Down
2 changes: 2 additions & 0 deletions tests/untyped/dollar.t/dollar.ml
Expand Up @@ -2,3 +2,5 @@ type t = { field : int }
let pp : t -> unit = fun _ -> ()
let f =
pp @@ { field = 1 };;
let _ = string_of_int @@ 4
let _ = string_of_int @@ max_int
8 changes: 8 additions & 0 deletions tests/untyped/dollar.t/run.t
Expand Up @@ -4,3 +4,11 @@
4 | pp @@ { field = 1 };;
^^^^^^^^^^^^^^^^^^^
Alert zanuda-linter: Extranous `@@`.
File "dollar.ml", line 5, characters 8-26:
5 | let _ = string_of_int @@ 4
^^^^^^^^^^^^^^^^^^
Alert zanuda-linter: Extranous `@@`.
File "dollar.ml", line 6, characters 8-32:
6 | let _ = string_of_int @@ max_int
^^^^^^^^^^^^^^^^^^^^^^^^
Alert zanuda-linter: Extranous `@@`.

0 comments on commit 4480ad2

Please sign in to comment.