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

Add option to add lint configurations #88

Open
xFrednet opened this issue Jan 11, 2023 · 0 comments
Open

Add option to add lint configurations #88

xFrednet opened this issue Jan 11, 2023 · 0 comments
Labels
A-api Area: Stable API A-marker-adapter Area: Adapter C-enhancement Category: New feature or request

Comments

@xFrednet
Copy link
Member

Some lint crates might want to provide the user with configurations to enable/disable certain behavior. Clippy, has a few lints that use configurations specifically for this.

Marker should provide a common and simple way to add configuration values to a lint and loaded them from file. This unifies lint crate behavior and makes it more conformable to the user. Additionally, it allows marker to include the configuration in the lint documentation.

Configurations could be implemented using a marker.toml file in the workspace root directory, like Clippy does with its clippy.toml. Each crate could then have its own section, similar to this:

[lint_crate_1]
config = "something"

[lint_crate_2]
animals = ["ducks", "penguins", "cats"]

Some multilingual projects don't use cargo, but interact with the driver directly. The configuration should therefore be loaded by the driver. The best option is probably to move this into marker_adapter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-api Area: Stable API A-marker-adapter Area: Adapter C-enhancement Category: New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant