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

check-docstrings and imports #1724

Open
yav opened this issue Aug 9, 2024 · 1 comment
Open

check-docstrings and imports #1724

yav opened this issue Aug 9, 2024 · 1 comment
Labels
design needed We need to specify precisely what we want docstrings

Comments

@yav
Copy link
Member

yav commented Aug 9, 2024

At the moment we don't run doc-strings on imported modules, but perhaps we should? Here's an example:


/**
```
"B"
```
*/
module B  where
  /* empty */

module A where
  import B

Running check-docstrings after loading A doesn't do anything.

Cryptol> :l A.cry 
Loading module Cryptol
Loading module B
Loading module A
A> :check-docstrings 

Checking A

Successes: 0, No fences: 1, Failures: 0
@yav yav added design needed We need to specify precisely what we want docstrings labels Aug 9, 2024
@glguy
Copy link
Member

glguy commented Aug 12, 2024

I think it only makes sense to recurse the import tree in the trivial examples. Often we'd have modules being defined because they are being used in multiple places. We could avoid rechecking this modules multiple times with caching, but that seems like working around bad design with a speed-hack. For a project with multiple top-level leaf modules you'd already need to manually enumerate what those top-level modules are. It seems more principled to have a list of the modules you that want to check which includes those that might be imported by other modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design needed We need to specify precisely what we want docstrings
Projects
None yet
Development

No branches or pull requests

2 participants