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

Copyright rules not selectable with "CPY" #5569

Closed
Hnasar opened this issue Jul 6, 2023 · 4 comments
Closed

Copyright rules not selectable with "CPY" #5569

Hnasar opened this issue Jul 6, 2023 · 4 comments

Comments

@Hnasar
Copy link
Contributor

Hnasar commented Jul 6, 2023

Unlike with other rules which I can enable with the linter prefix, the CPY rules seems to require the specific error code.

touch foo.py
ruff --select=CPY001 foo.py  # foo.py:1:1: CPY001 Missing copyright notice at top of file
ruff --select=CPY foo.py   # no output
# ruff --version
# ruff 0.0.277

Also, the docs still mention the old name of the checker before it was renamed to flake8-copyright in #5236
https://beta.ruff.rs/docs/rules/#copyright-related-rules-cpy

Thanks for ruff!

@zanieb
Copy link
Member

zanieb commented Jul 6, 2023

Hey @Hnasar — this is intentional because this rule is in the "nursery" group which requires explicit opt-in since the rules are still under development. See #4407 for some more background.

The category name was also intentional, see #4701 (comment) cc @charliermarsh

@zanieb zanieb added the question Asking for support or clarification label Jul 6, 2023
@charliermarsh
Copy link
Member

I did intend to change the category name, but I think I missed one reference.

That these rules are in the "nursery" group is supposed to be reflected in the docs which would make this a lot clearer, but we haven't finished that change yet 😭 (#5439)

@zanieb
Copy link
Member

zanieb commented Jul 7, 2023

The name should be addressed now by #5577

@charliermarsh charliermarsh removed the question Asking for support or clarification label Jul 10, 2023
@charliermarsh
Copy link
Member

I'm going to close for now since I think this is mostly blocked on fixing the docs, which is being tracked elsewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants