Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Warn on unbound variable reference #8

Open
dsheets opened this issue Mar 8, 2016 · 1 comment
Open

Warn on unbound variable reference #8

dsheets opened this issue Mar 8, 2016 · 1 comment

Comments

@dsheets
Copy link

dsheets commented Mar 8, 2016

If a typo is made to a built-in variable name like writing or instead of os, Camelus does not warn about it. It should be possible to declare the set of bound-or-potentially-bound variables and have warnings emitted if variables from outside that set are used.

@AltGr
Copy link
Collaborator

AltGr commented Mar 11, 2016

Packages can actually define variables at install time, so this is difficult, at least for package-qualified variables %{pkg:var}%.

On the next branch of opam, compilers (which are packages), can export variables to the global namespaces (e.g. ocaml-version, which is largely used in packages) ;

However, the repository should define a set of variables that are required to be defined by any compiler. This once again shows the need for having both the built-in, repository-independent opam lint rules and repository-specific rules. Camelus should, obviously, be configurable to enforce the repository rules.

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

No branches or pull requests

2 participants