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

CLI: Invocation without arguments should check the current directory #7347

Closed
zanieb opened this issue Sep 13, 2023 · 5 comments · Fixed by #8791
Closed

CLI: Invocation without arguments should check the current directory #7347

zanieb opened this issue Sep 13, 2023 · 5 comments · Fixed by #8791
Labels
cli Related to the command-line interface

Comments

@zanieb
Copy link
Member

zanieb commented Sep 13, 2023

Currently ruff check requires an input path. Instead, it should default to checking the current directory.

@zanieb zanieb added the cli Related to the command-line interface label Sep 13, 2023
@zanieb zanieb changed the title Check: Invocation without arguments should check the current directory CLI: Invocation without arguments should check the current directory Sep 13, 2023
@MichaReiser
Copy link
Member

To make sure we're aligned. Does that mean it checks the current directory respecting the exclude and include configurations? Meaning, it wouldn't check anything if exclude = ["**"]

@charliermarsh
Copy link
Member

(I would assume so -- in other words, it would have the same semantics as ruff check .?)

@bluetech
Copy link
Contributor

Various tools have a configuration for which directories to use when invoked with no arguments.
Mypy has files, modules, packages.
Pytest has testpaths.
I find it useful.

@zanieb
Copy link
Member Author

zanieb commented Sep 14, 2023

Thanks for the resources! We should respect the include and exclude configuration options (and similar).

@dhruvmanila
Copy link
Member

Related: #3970

zanieb added a commit that referenced this issue Nov 21, 2023
…tory (#8791)

Closes #7347
Closes #3970 via use of `include`

We could update examples in our documentation, but I worry since we do
not have versioned documentation users on older versions would be
confused. Instead, I'll open an issue to track updating use of `ruff
check .` in the documentation sometime in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command-line interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants