Skip to main content

My really simple rendition of how a linter works.

Project description

mylint

My really simple rendition of how a linter works.

This original version was written for my AST article. Since then I've added tests and turned it into a package. Check the original branch for the original version of this, that was used in the article.

Usage

mylint [...file names]

Example:

$ mylint tests/testcode.py
testcode.py:17:15: W001: Set contains duplicate item: 1
testcode.py:12:12: W001: Set contains duplicate item: 'PUT'
testcode.py:1:0: W002: Unused variable: 's'
testcode.py:5:4: W002: Unused variable: 'var'
testcode.py:17:0: W002: Unused variable: 's2'

Development / Testing

Setup a virtual environment, and install the package with:

pip install -r requirements-dev.txt

Then run pytest to run tests. Now, have fun playing with the code and tests!

Type Checking

Run mypy .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mylint-0.1.0.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

mylint-0.1.0-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page