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

[rfc] config improvements #1375

Open
Nytelife26 opened this issue May 28, 2024 · 5 comments
Open

[rfc] config improvements #1375

Nytelife26 opened this issue May 28, 2024 · 5 comments
Assignees
Labels
cat: rfc Issues that propose changes, or a Request For Comments.

Comments

@Nytelife26
Copy link
Member

Nytelife26 commented May 28, 2024

this is a follow up of #1364.

goals are as follows.

  • replace the JSON config system with TOML. tomllib is available as a backport from tomli for versions below 3.11, so we don't need to worry about backwards compatibility.
  • configuration per project would be desirable. proselint could search for overrides in project directories, and use those too.
  • granular selection of checks
    • the ability to select individual checks must be implemented
    • partial paths should match all checks underneath that path, i.e. setting misc to true should enable all checks within misc
    • granular overrides should apply, i.e. setting misc.capitalization to false should deactivate all checks within misc.capitalization, and this should work at any level.
@Nytelife26 Nytelife26 self-assigned this May 28, 2024
@Nytelife26 Nytelife26 added the cat: rfc Issues that propose changes, or a Request For Comments. label May 28, 2024
@Nytelife26 Nytelife26 pinned this issue May 28, 2024
@barrett-ruth
Copy link

In this, can you please allow the ignoring if specific rules - i.e. just typography.symbols.curly_quotes, and not forcing users to ignore all of typography.symbols? Most linters/formatters permit this functionality.

@Nytelife26
Copy link
Member Author

In this, can you please allow the ignoring if specific rules - i.e. just typography.symbols.curly_quotes, and not forcing users to ignore all of typography.symbols? Most linters/formatters permit this functionality.

the configuration structure in the refactoring effort is still being worked on. i'm still not sure if a rust port is the best idea, because it will be difficult to make it work with the current structure, but that is the goal, yes.

ultimately, efforts have been temporarily postponed while i finish a university project. i would welcome input or contributions from the community, though.

@barrett-ruth
Copy link

Sounds great. Thanks so much for your effort! (And yes, I'd definitely only rewrite it in rust if a) you have a reason to learn rust and b) it eases future development by a significant amount).

@Nytelife26
Copy link
Member Author

I'd definitely only rewrite it in rust if a) you have a reason to learn rust

oh, worry not, i already know it. i'm fairly proficient with it, and i've been writing rust for just over 3 years now.

b) it eases future development by a significant amount).

most things that aren't python would do this. rust is a tricky one, but typescript was my other idea, and i'm not sure that's much better than python all things considered.

fortunately, i have fairly substantial experience with whole-project ports and refactors across languages. the primary motivation for doing so is that i cannot use the refactoring efforts made in python anymore, and i am determined not to let that put a stop to work on the project.

@Nytelife26
Copy link
Member Author

@barrett-ruth the functionality you requested is now implemented in #1371, along with general path segment matching. for example, you can use the following to enable the entire module.

    "typography": True,

granular overrides are something I would like to implement down the road (i.e. setting typography to True but typography.symbols.curly_quotes to False would enable everything in typography except for that one check), but they are not yet implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat: rfc Issues that propose changes, or a Request For Comments.
Projects
None yet
Development

No branches or pull requests

2 participants