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

opam lint: Warn about unkown variables #4000

Open
kit-ty-kate opened this issue Oct 2, 2019 · 4 comments
Open

opam lint: Warn about unkown variables #4000

kit-ty-kate opened this issue Oct 2, 2019 · 4 comments

Comments

@kit-ty-kate
Copy link
Member

Some packages use variables such as pkg:var or success or with-test in the build or post-message fields for example, but mistakes might happen and the wrong variable name might be used or there might be some syntax mistake. Would it be possible to check for those variables to see if they might be undefined and raise a warning in that case? They might be custom variables but in most cases they won't be and I think a warning can be useful.

@rjbou
Copy link
Collaborator

rjbou commented Oct 7, 2019

A warning can be definitely useful, but it would also seems weird as opam permit to check if a variable is defined or not in filters (? operator).

@dra27
Copy link
Member

dra27 commented Oct 8, 2019

From a review perspective of repository PRs, I imagine it would be handy to have a way for Camelus to list undefined variables so that a person can check that the use looks sound, but I agree that they don't want to be warnings.

@rjbou
Copy link
Collaborator

rjbou commented Oct 8, 2019

Yes, I see the need from a review perspective. For the moment, all linting check of opam repository are done in opam, but some of them should be separated. Worth adding a way to add lint check via opam-lib. New ones can also be used also in opam-publish.

@rjbou
Copy link
Collaborator

rjbou commented Oct 8, 2019

digging some issues related to #1801

@rjbou rjbou added this to the 2.2.0~alpha milestone May 27, 2020
@dra27 dra27 removed this from the 2.2.0~alpha milestone Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants