========
edx-lint
========
| |CI|_
A collection of code quality tools:
- A few pylint plugins to check for quality issues pylint misses.
- A command-line tool to generate config files like pylintrc from a master
file (part of edx_lint), and a repo-specific tweaks file.
Using edx_lint
==============
The ``edx_lint`` command can generate config files from its own master file. Install
the package using ``pip``::
$ pip install edx-lint
The ``write`` sub-command will write a config file based on the contents of the
edx_lint master file::
$ edx_lint write pylintrc
The file written contains a hash of its contents, to detect subsequent editing.
``edx_lint`` will detect this when it next tries to write the file. If editing
is detected, the edited file will be moved aside so it can be compared to the
newly written file.
Handling newly introduced lint violations
-----------------------------------------
New potential lint violations will be communicated with a major version bump.
If you run into new lint violations during an upgrade of edx-lint, your options include:
#. Fixing the violations immediately, or
#. `Using lint-amnesty`_ and fixing at a later time, or
#. `Customizing edx_lint`_ to permanently ignore the violations.
Using lint-amnesty
------------------
The ``lint-amnesty`` command can be used to squash all existing pylint errors
in a codebase, so that from then the repository can maintain pylint-cleanliness.
Install the package using ``pip``::
$ pip install edx-lint
The ``lint-amnesty`` command expects pylint errors in the ``--output-format=parseable``
format::
$ pylint my.python.package --output-format=parseable | lint-amnesty
This will add comments for every existing pylint violation that look like::
# pylint: disable=some-error # lint-amnesty
It will also remove any existing suppressions that pylint flags as being ``useless-suppressions``.
Customizing edx_lint
--------------------
You can customize the resulting pylintrc file by creating a pylintrc_tweaks file in the
current directory before running the ``write`` sub-command. It should contain only the
settings you want to override.
**Note:** If your project is not a Django project, you'll want to disable the Django plugins with
your pylintrc_tweaks file::
[MASTER]
load-plugins = edx_lint.pylint
Developing edx_lint
===================
To run the tests::
$ make requirements
$ make test
To manually test your pylint plugin, create a custom module and run pylint with a selected set of enabled message symbols. For instance::
pylint --load-plugins=edx_lint.pylint --disable=all --enable=feature-toggle-needs-doc path/to/my/custom/module.py
License
-------
The code in this repository is licensed under Apache 2.0. Please see
``LICENSE.txt`` for details.
How To Contribute
-----------------
Contributions are very welcome.
Please read `How To Contribute <https://github.com/openedx/.github/blob/master/CONTRIBUTING.md>`_ for details.
Getting Help
------------
The Open edX project has resources for developer support on the `Getting Help`_ page.
.. _Getting Help: https://open.edx.org/getting-help
.. |CI| image:: https://github.com/openedx/edx-lint/workflows/Python%20CI/badge.svg?branch=master
.. _CI: https://github.com/openedx/edx-lint/actions?query=workflow%3A%22Python+CI%22
Raw data
{
"_id": null,
"home_page": "https://github.com/openedx/edx-lint",
"name": "edx-lint",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "edX",
"author_email": "oscm@edx.org",
"download_url": "https://files.pythonhosted.org/packages/8c/73/edde6d4035b21d186df41937e50c2676cf256c7ed0dc92b08dbbeb6b3927/edx_lint-5.6.0.tar.gz",
"platform": null,
"description": "========\nedx-lint\n========\n\n| |CI|_\n\nA collection of code quality tools:\n\n- A few pylint plugins to check for quality issues pylint misses.\n\n- A command-line tool to generate config files like pylintrc from a master\n file (part of edx_lint), and a repo-specific tweaks file.\n\n\nUsing edx_lint\n==============\n\nThe ``edx_lint`` command can generate config files from its own master file. Install\nthe package using ``pip``::\n\n $ pip install edx-lint\n\nThe ``write`` sub-command will write a config file based on the contents of the\nedx_lint master file::\n\n $ edx_lint write pylintrc\n\nThe file written contains a hash of its contents, to detect subsequent editing.\n``edx_lint`` will detect this when it next tries to write the file. If editing\nis detected, the edited file will be moved aside so it can be compared to the\nnewly written file.\n\nHandling newly introduced lint violations\n-----------------------------------------\n\nNew potential lint violations will be communicated with a major version bump.\n\nIf you run into new lint violations during an upgrade of edx-lint, your options include:\n\n#. Fixing the violations immediately, or\n#. `Using lint-amnesty`_ and fixing at a later time, or\n#. `Customizing edx_lint`_ to permanently ignore the violations.\n\nUsing lint-amnesty\n------------------\n\nThe ``lint-amnesty`` command can be used to squash all existing pylint errors\nin a codebase, so that from then the repository can maintain pylint-cleanliness.\nInstall the package using ``pip``::\n\n $ pip install edx-lint\n\nThe ``lint-amnesty`` command expects pylint errors in the ``--output-format=parseable``\nformat::\n\n $ pylint my.python.package --output-format=parseable | lint-amnesty\n\nThis will add comments for every existing pylint violation that look like::\n\n # pylint: disable=some-error # lint-amnesty\n\nIt will also remove any existing suppressions that pylint flags as being ``useless-suppressions``.\n\n\nCustomizing edx_lint\n--------------------\n\nYou can customize the resulting pylintrc file by creating a pylintrc_tweaks file in the\ncurrent directory before running the ``write`` sub-command. It should contain only the\nsettings you want to override.\n\n**Note:** If your project is not a Django project, you'll want to disable the Django plugins with\nyour pylintrc_tweaks file::\n\n [MASTER]\n load-plugins = edx_lint.pylint\n\n\nDeveloping edx_lint\n===================\n\nTo run the tests::\n\n $ make requirements\n $ make test\n\nTo manually test your pylint plugin, create a custom module and run pylint with a selected set of enabled message symbols. For instance::\n\n pylint --load-plugins=edx_lint.pylint --disable=all --enable=feature-toggle-needs-doc path/to/my/custom/module.py\n\nLicense\n-------\n\nThe code in this repository is licensed under Apache 2.0. Please see\n``LICENSE.txt`` for details.\n\nHow To Contribute\n-----------------\n\nContributions are very welcome.\n\nPlease read `How To Contribute <https://github.com/openedx/.github/blob/master/CONTRIBUTING.md>`_ for details.\n\n\nGetting Help\n------------\n\nThe Open edX project has resources for developer support on the `Getting Help`_ page.\n\n\n.. _Getting Help: https://open.edx.org/getting-help\n\n.. |CI| image:: https://github.com/openedx/edx-lint/workflows/Python%20CI/badge.svg?branch=master\n.. _CI: https://github.com/openedx/edx-lint/actions?query=workflow%3A%22Python+CI%22\n",
"bugtrack_url": null,
"license": "Apache",
"summary": "edX-authored pylint checkers",
"version": "5.6.0",
"project_urls": {
"Homepage": "https://github.com/openedx/edx-lint"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "095abc59dc0179342a1580b1425779437cc59c160dd7f722a28909f2fe5f7824",
"md5": "346f9d02857ef77ae00163f9d47aacc4",
"sha256": "516ff64364d8efdfb5fbfd7f63cf196d92b74c5163397a55d12db4d32d6ec8b4"
},
"downloads": -1,
"filename": "edx_lint-5.6.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "346f9d02857ef77ae00163f9d47aacc4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 56805,
"upload_time": "2025-01-24T18:40:16",
"upload_time_iso_8601": "2025-01-24T18:40:16.249083Z",
"url": "https://files.pythonhosted.org/packages/09/5a/bc59dc0179342a1580b1425779437cc59c160dd7f722a28909f2fe5f7824/edx_lint-5.6.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "8c73edde6d4035b21d186df41937e50c2676cf256c7ed0dc92b08dbbeb6b3927",
"md5": "d1c4b1d406ddd1be8d1a238fb588dc1f",
"sha256": "ba188d0b2fbf57954fdf373e213743d8acf68215b040dcb92fd5762850844f66"
},
"downloads": -1,
"filename": "edx_lint-5.6.0.tar.gz",
"has_sig": false,
"md5_digest": "d1c4b1d406ddd1be8d1a238fb588dc1f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 47886,
"upload_time": "2025-01-24T18:40:18",
"upload_time_iso_8601": "2025-01-24T18:40:18.095825Z",
"url": "https://files.pythonhosted.org/packages/8c/73/edde6d4035b21d186df41937e50c2676cf256c7ed0dc92b08dbbeb6b3927/edx_lint-5.6.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-24 18:40:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "openedx",
"github_project": "edx-lint",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"tox": true,
"lcname": "edx-lint"
}