MarcoGorelli / cython-lint

Lint Cython files
MIT License
69 stars 11 forks source link

Config to globally ignore errors #64

Closed jeremiedbb closed 1 year ago

jeremiedbb commented 1 year ago

Unless I missed something, the current way to ignore errors is to add # no-cython-lint on a line by line basis. I can become cumbersome on a big project, where we'd like to ignore some errors globally. In flake8 you can pass --ignore=<coma separated list of errors to ignore>. What do you think about adding this functionality to cython-lint ?

As a second step, it would be even nicer to be able to write the config for cython-lint in the setup.cfg file of a project, e.g

[cython-lint]
max-line-length=88
ignore=E24,E121,...
MarcoGorelli commented 1 year ago

hi @jeremiedbb

Seems like a reasonable request - as the list of errors grows, it probably makes sense to add some configuration

Currently, all you can do is --no-pycodestyle and it'll turn off the style nitpicks, but I agree that it's probably time to introduce --ignore. @stefanv was also interested in this, so looking him in

it would be even nicer to be able to write the config for cython-lint in the setup.cfg file of a project

Sure - let's do pyproject.toml though, unless there's objections, as that's what the entire ecosystem is moving towards

jeremiedbb commented 1 year ago

Yes pyproject.toml makes more sense