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

Idea: symbex --undocumented --check #35

Closed
simonw opened this issue Jul 2, 2023 · 3 comments
Closed

Idea: symbex --undocumented --check #35

simonw opened this issue Jul 2, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@simonw
Copy link
Owner

simonw commented Jul 2, 2023

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 simonw added the enhancement New feature or request label Jul 2, 2023
@simonw
Copy link
Owner Author

simonw commented Jul 2, 2023

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

@simonw
Copy link
Owner Author

simonw commented Jul 16, 2023

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

@simonw
Copy link
Owner Author

simonw commented Jul 16, 2023

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.

@simonw simonw closed this as completed in 2b102a9 Jul 16, 2023
simonw added a commit that referenced this issue Jul 16, 2023
simonw added a commit that referenced this issue Jul 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant