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

Move linting related code to a new graylint package #465

Closed
akaihola opened this issue Feb 11, 2023 · 0 comments · Fixed by #501
Closed

Move linting related code to a new graylint package #465

akaihola opened this issue Feb 11, 2023 · 0 comments · Fixed by #501
Assignees
Labels
enhancement New feature or request

Comments

@akaihola
Copy link
Owner

Running linters doesn't really fit together along with Darker's original purpose of executing code reformatters. Reformatters make local modifications to code, while linters only report rule violations and may detect flaws in one part of the code in relation to a different part (e.g. undefined identifiers).

Eventually we should remove -L / --lint from Darker completely, but before that we'd like to separate out linting functionality into a dedicated tool (named e.g. graylint) and move all related code there. Code needed by both Darker and that package should go into a third library support package (named e.g. libdarkgray). Darker can deprecate but still keep the -L / --lint option, and depend on graylint to implement it.

Alternatives considered:

  • all code in the Darker repo, but in three different Python packages which are published separately on PyPI
  • rename the Darker package to something more generic, and provide two console entry points darker and graylint in it
  • duplicate all common code in both Darker and Graylint
  • keep linting functionality in Darker, rename Darker to something more generic, add --black / --no-black and make --no-black the default, and re-create Darker as a thin wrapper with --black as the default

See #304 for discussion leading to this proposal.

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
Development

Successfully merging a pull request may close this issue.

1 participant