simonw / symbex

Find the Python code for specified symbols
Apache License 2.0
231 stars 6 forks source link

Idea: `symbex --undocumented --check` #35

Closed simonw closed 1 year ago

simonw commented 1 year ago

The --check option would cause symbex to return a non-zero exit code if it finds any matches.

In this way you could use symbex in CI such as GitHub Actions to fail tests if any code is added which is missing types or docstrings:

symbex --undocumented --check
symbex --untype --check
simonw commented 1 year ago

Inspired by cog --check and black --check and various other linters.

simonw commented 1 year ago

black . --check returns 1 on errors so I'll use 1 (I thought maybe it should be 2 or something else).

simonw commented 1 year ago

It's going to return 0 output, unless you pass --count in which case it will display the count.

Or pass --check -s to see the signatures.