Skip to content

Commit

Permalink
Lint: fixed warning 42
Browse files Browse the repository at this point in the history
  • Loading branch information
AltGr committed Oct 27, 2015
1 parent 3c925f8 commit 337c7d6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/format/opamFile.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1818,8 +1818,9 @@ module OPAM = struct
"The 'dev-repo' field doesn't use version control. You may use \
URLs of the form \"git+https://\" or a \".hg\" or \".git\" suffix"
(match t.dev_repo with
| None -> false
| Some { OpamUrl.backend = #OpamUrl.version_control; _ } -> false
| _ -> true);
| Some _ -> true);
cond 43 `Error
"Conjunction used in 'conflicts:' field. Only '|' is allowed"
(OpamVersion.compare t.opam_version (OpamVersion.of_string "1.3") >= 0 &&
Expand Down Expand Up @@ -1851,10 +1852,12 @@ module OPAM = struct
let warnings =
List.map (function
| Section (pos, s) ->
3, `Error, Printf.sprintf "Invalid section: %s at %s"
3, `Error,
Printf.sprintf "Invalid or duplicate section: '%s' at %s"
s.section_name (string_of_pos pos)
| Variable (pos, f, _) ->
3, `Error, Printf.sprintf "Invalid field: %s at %s"
3, `Error,
Printf.sprintf "Invalid or duplicate field: '%s;' at %s"
f (string_of_pos pos))
invalid_items
in
Expand Down

0 comments on commit 337c7d6

Please sign in to comment.