Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: incorrect warning 47? #4989

Closed
vch9 opened this issue Jan 12, 2022 · 3 comments · Fixed by #5069
Closed

Bug: incorrect warning 47? #4989

vch9 opened this issue Jan 12, 2022 · 3 comments · Fixed by #5069
Milestone

Comments

@vch9
Copy link

vch9 commented Jan 12, 2022

# opam config report
# opam-version         2.1.0 
# self-upgrade         no
# system               arch=x86_64 os=linux os-distribution=ubuntu os-version=20.04
# solver               builtin-mccs+glpk
# install-criteria     -removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed
# upgrade-criteria     -removed,-count[avoid-version,changed],-count[version-lag,solution],-count[missing-depexts,changed],-new
# jobs                 11
# repositories         1 (http), 1 (version-controlled) (default repo at 997305af)
# pinned               1 (git)
# current-switch       /home/valentin/Documents/ometrics/ometrics
# ocaml:native         true
# ocaml:native-tools   true
# ocaml:native-dynlink true
# ocaml:stubsdir       /home/valentin/Documents/ometrics/ometrics/_opam/lib/ocaml/stublibs:/home/valentin/Documents/ometrics/ometrics/_opam/lib/ocaml
# ocaml:preinstalled   false
# ocaml:compiler       4.12.0

My opam file:

opam-version: "2.0"
version: "dev"
maintainer: "Valentin Chaboche <valentin.chaboche@lambda-coins.com>"
homepage: "https://gitlab.com/nomadic-labs/ometrics"
bug-reports: "https://gitlab.com/nomadic-labs/ometrics/-/issues"
description: "OCaml analysis in a merge request changes"
            
depends: [
  "ocaml" {>= "4.12" & < "4.13"}
  "yojson"
  "menhirSdk" {>= "20211012" & < "20211013"}
  "menhirLib" {>= "20211012" & < "20211013"}
  "menhir" {>= "20211012" & < "20211013"}
  "dot-merlin-reader"
  "csexp"
  "result"
  "cmdliner"
  "qcheck-alcotest" {with-test & >= "0.18"}
  "bisect_ppx" {dev & >= "2.6.0"}
]
build: [
  ["dune" "build" "-p" name "-j" jobs]
]
authors: [
  "Thomas Letan <lthms@nomadic-labs.com>"
  "Valentin Chaboche <valentin.chaboche@lambda-coins.com>"
]

And I get:

$ opam lint
/home/valentin/Documents/ometrics/ometrics/ometrics.opam: Warnings.
  warning 47: Synopsis (or description first line) should start with a capital and not end with a dot

Note that my description is rather a synopsis, and if I change to a synopsis the warning vanish.

@rjbou rjbou added this to the 2.2.0~alpha milestone Jan 12, 2022
@rjbou
Copy link
Collaborator

rjbou commented Jan 12, 2022

If description is multiline, synopsisis populated by the first line. But In the case description is only one line, synopsis remain empty. That why lint 47 is triggered. But it's a bug.
This mechanism is present for backward compatibility, it's deprecated (we should add a warning for this case). You should fill synopsis with the oneliner, and if you want add a more detailed explanation on description.

@AltGr
Copy link
Member

AltGr commented Jan 12, 2022

(or description first line) refers to the obsolete descr: field, and doesn't apply anymore. We'll fix the message, thanks for reporting. Changing to synopsis is the right fix for your package.

@rjbou
Copy link
Collaborator

rjbou commented Jan 13, 2022

related #3753

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants