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

feat(nx-python): add ruff check executor and project generator #185

Merged
merged 6 commits into from
Nov 10, 2023

Conversation

lucasvieirasilva
Copy link
Owner

@lucasvieirasilva lucasvieirasilva commented Nov 10, 2023

This PR adds ruff check Nx executor and adds ruff option to the linter parameter in the project generator.

NOTE: flake8 is still the default value, but in future versions, I'm gonna change it to ruff.

Project generator

When creating a new project using the Nx generator CLI, please add --linter ruff in the options.

Executor

The @nxlv/python:ruff-check only has one parameter lintFilePatterns which is responsible for mapping which folders are going to be checked.

Any other argument is forwarded directly to ruff check CLI.

Example: npx nx lint proj1 --fix, the --fix argument is not mapped in the executor and it's directly forwarded to the ruff command.

Executed command: poetry run ruff check {lintFilePatterns} --fix

Related Issue(s)

Reference #170

@lucasvieirasilva lucasvieirasilva added the enhancement New feature or request label Nov 10, 2023
@lucasvieirasilva lucasvieirasilva self-assigned this Nov 10, 2023
@lucasvieirasilva lucasvieirasilva linked an issue Nov 10, 2023 that may be closed by this pull request
1 task
@lucasvieirasilva lucasvieirasilva merged commit 9e631a2 into main Nov 10, 2023
3 checks passed
github-actions bot pushed a commit that referenced this pull request Nov 10, 2023
# [16.2.0](nx-python-v16.1.4...nx-python-v16.2.0) (2023-11-10)

### Features

* **nx-python:** add ruff check executor and project generator ([#185](#185)) ([9e631a2](9e631a2)), closes [#170](#170)
Copy link

🎉 This PR is included in version 16.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for ruff
1 participant