wearerequired / lint-action

✨ GitHub Action for detecting and auto-fixing lint errors
MIT License
555 stars 130 forks source link

Add ruff #620

Open pickfire opened 1 year ago

pickfire commented 1 year ago

Fix #603

pickfire commented 1 year ago

The test failures seemed unrelated.

pickfire commented 1 year ago

I don't get why is black linter failing in the tests.

fvalverd commented 10 months ago

I don't get why is black linter failing in the tests.

mypy and black latest version are failing because the output format changed, I provided you a PR with the necessary changes to make them pass in here https://github.com/pickfire/lint-action/pull/1/files

tylerlaprade commented 9 months ago

@fvalverd, tests still seem to be failing

fvalverd commented 9 months ago

There are 3 failures:

luzfcb commented 8 months ago

I don't know if it makes anything easier, but ruff currently supports some output formats, such as github and json

https://docs.astral.sh/ruff/settings/#output-format

$ ruff check --output-format github .
::error title=Ruff (C408),file=/home/luzfcb/projects/labcodes/pythondotorg/events/tests/test_utils.py,line=36,col=17,endLine=36,endColumn=60::events/tests/test_utils.py:36:17: C408 Unnecessary `dict` call (rewrite as a literal)
$ ruff check --output-format json .
[
  {
    "cell": null,
    "code": "C408",
    "end_location": {
      "column": 60,
      "row": 36
    },
    "filename": "/home/luzfcb/projects/labcodes/pythondotorg/events/tests/test_utils.py",
    "fix": null,
    "location": {
      "column": 17,
      "row": 36
    },
    "message": "Unnecessary `dict` call (rewrite as a literal)",
    "noqa_row": 36,
    "url": "https://docs.astral.sh/ruff/rules/unnecessary-collection-call"
  }
]