-
Notifications
You must be signed in to change notification settings - Fork 3
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
Automatically detect module for lake exe runLinter
#2
Comments
I think we can just look for e.g.
and decide on the basis of that to run it on It would be nice if there were a way to query |
Should this issue be moved to batteries? |
The original intention here was detection contained in lean-action, similar to the detection of Mathlib in detect_mathlib.sh. However, if |
As a more general question: should we have a |
@tydeu Would this be a good use case for lake install. Users could run |
@tydeu, in the meantime, do you have a suggestion for what we ask lake here? In I think getting the answer to: "please tell me all defaultTarget lean_libs" would suffice here. |
This is not difficult to do using the Lake API. I just want this to be a Batteries issue so that the implementation task is not lost. (For that matter we should also have a mathlib issue tracking using the Lake API in |
Prior to Is there an easy way to ask Lake what is the default module? Would a similar method exist to ask for the requires? Of course it can be done by a script reading the lakefile but I perhaps there is a more elegant way. |
@oliver-butterley A script is the best solution at the present. I do hope to implement better solutions in the future. |
Mario and Mac's answers seem to contradict here. Can't we do this via the Lake API, rather than scraping the lakefile? |
@semorrison I fully agree with Mario's answer. By "script", a meant some Lean code using the Lake API. The alternative I understood @oliver-butterley to be suggesting was doing this through the Lake CLI, which is not possible at present. |
Indeed, I was hoping that the API mentioned by Mario was exposed in the Lake CLI. I.e., that something like Thanks for the clarification. |
Any hints about the relevant API function? :-) |
leanprover-community/batteries#811 should resolve this. I used the |
I am closing this as not planned since it is out of score for |
Instead of users manually providing a module to lint with the
lint-module
input, automatically detect which module to lint.Depending on how this automatic detection works, we may still want to allow users to manually specify which module to lint.
The text was updated successfully, but these errors were encountered: