diff --git a/lib/lint.ml b/lib/lint.ml index db2b54d..067cb0e 100644 --- a/lib/lint.ml +++ b/lib/lint.ml @@ -257,7 +257,7 @@ module Checks = struct if OpamVersionCompare.compare dep ver >= 0 then [] else [ (pkg, BadDuneConstraint (dep, ver)) ] in - if is_build then [ (pkg, DuneIsBuild) ] else errors + if is_build then (pkg, DuneIsBuild) :: errors else errors | None -> [] let check_maintainer_email ~pkg opam = diff --git a/test/lint.t b/test/lint.t index 458e1eb..9870736 100644 --- a/test/lint.t +++ b/test/lint.t @@ -63,6 +63,7 @@ Test the following: Linting opam-repository at $TESTCASE_ROOT/. ... Warning in b.0.0.2: Dubious use of 'dune subst'. 'dune subst' should always only be called with {dev} (i.e. ["dune" "subst"] {dev}) If your opam file has been autogenerated by dune, you need to upgrade your dune-project to at least (lang dune 2.7). Warning in b.0.0.2: The package tagged dune as a build dependency. Due to a bug in dune (https://github.com/ocaml/dune/issues/2147) this should never be the case. Please remove the {build} tag from its filter. + Error in b.0.0.2: Failed to download the archive. Details: $TESTCASE_ROOT/b.0.0.2.tgz Error in b.0.0.2: error 3: File format error in 'unknown-field' at line 11, column 0: Invalid field unknown-field Error in b.0.0.2: error 60: Upstream check failed: "Source not found: $TESTCASE_ROOT/b.0.0.2.tgz" [1] diff --git a/test/patches/b-incorrect-opam.patch b/test/patches/b-incorrect-opam.patch index f6677a0..d05f029 100644 --- a/test/patches/b-incorrect-opam.patch +++ b/test/patches/b-incorrect-opam.patch @@ -39,7 +39,7 @@ index 0000000..a47aabf + ["dune" "subst"] +] +url { -+ src: "./b.0.0.2.tgz" ++ src: "b.0.0.2.tgz" + checksum: ["sha256=e26dfd7fa9731d0d43239c8b7d36bd3d79b0f709f1cdfa2ada7a7ab5d79d1911"] +} +depends: [