Skip to content

Commit

Permalink
Remove lint warning 56
Browse files Browse the repository at this point in the history
OPAM_LAST_ENV means that it's no longer necessary to limit setenv to
compiler packages.
  • Loading branch information
dra27 committed Feb 7, 2023
1 parent 8b38849 commit 1a7657e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ users)
* [BUG] Fix linting packages from repository with tarred repositories, the file in temporary repository was no more avaiable when lint is done [#5068 @rjbou]
* Update repository package filename display [#5068 @rjbou]
* E67: check checksums only for vcs urls [#4960 @rjbou]
* W56: detection removed, since `OPAM_LAST_ENV` allows reliable reverting [#5417 @dra27]

## Repository
* When several checksums are specified, instead of adding in the cache only the archive by first checksum, name by best one and link others to this archive [#4696 rjbou]
Expand Down
4 changes: 4 additions & 0 deletions src/state/opamFileTools.ml
Original file line number Diff line number Diff line change
Expand Up @@ -651,9 +651,13 @@ let t_lint ?check_extra_files ?(check_upstream=false) ?(all=false) t =
used norm)
bad_os_arch_values)
(bad_os_arch_values <> []));
(* Retired, since `OPAM_LAST_ENV` allows environment updates to be reliably
reverted. *)
(*
cond 56 `Warning
"It is discouraged for non-compiler packages to use 'setenv:'"
(t.env <> [] && not (has_flag Pkgflag_Compiler t));
*)
cond 57 `Error
"Synopsis and description must not be both empty"
(t.descr = None || t.descr = Some OpamFile.Descr.empty);
Expand Down
15 changes: 0 additions & 15 deletions tests/reftests/lint.test
Original file line number Diff line number Diff line change
Expand Up @@ -591,21 +591,6 @@ depexts: ["foo"] { arch = "i486" }
${BASEDIR}/lint.opam: Errors.
error 55: Non-normalised OS or arch string being tested: "i486 (use x86_32 instead)"
# Return code 1 #
### : W56: It is discouraged for non-compiler packages to use 'setenv:'
### <lint.opam>
opam-version: "2.0"
synopsis: "A word"
description: "Two words."
authors: "the testing team"
homepage: "egapemoh"
maintainer: "[email protected]"
license: "ISC"
dev-repo: "hg+https://[email protected]"
bug-reports: "https://nobug"
setenv: [ idoit="anyway" ]
### opam lint ./lint.opam
${BASEDIR}/lint.opam: Warnings.
warning 56: It is discouraged for non-compiler packages to use 'setenv:'
### : E57: Synopsis and description must not be both empty
### <lint.opam>
opam-version: "2.0"
Expand Down

0 comments on commit 1a7657e

Please sign in to comment.