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

List Django as a dependency. Fix #96 #132

Merged
merged 1 commit into from
Mar 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 23 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,33 @@ pylint-django

`pylint-django` is a [Pylint](http://pylint.org) plugin for improving code analysis for when analysing code using Django. It is also used by the [Prospector](https://github.com/landscapeio/prospector) tool.

## Usage
# Installation

#### Pylint
```
pip install pylint-django
```

**WARNING:** `pylint-django` requires `Django` to be installed. Our `setup.py` file doesn't
specify which particular version of Django is going to be installed because we have no idea
what version is used inside your project. The latest version of Django will be installed if
it has not been installed beforehand! DO NOT report issues about mismatching Django versions
if that happens. Instead get your testing environment sorted out and make sure that you have
the appropriate version of Django installed!

# Usage

## Pylint

Ensure `pylint-django` is installed and on your path (`pip install pylint-django`), and then run pylint:
Ensure `pylint-django` is installed and on your path and then execute:

```
pylint --load-plugins pylint_django [..other options..]
```

#### Prospector
## Prospector

If you have `prospector` installed, then `pylint-django` will already be installed as a dependency, and will be activated automatically if Django is detected.
If you have `prospector` installed, then `pylint-django` will already be installed as a dependency,
and will be activated automatically if Django is detected.

```
prospector [..other options..]
Expand All @@ -42,14 +56,14 @@ Please feel free to add your name to the `CONTRIBUTORS.md` file if you want to b
credited when pull requests get merged. You can also add to the `CHANGELOG.md` file
if you wish, although I'll also do that when merging if not.

## Tests
# Tests

The structure of the test package follows that from pylint itself.

It is fairly simple: create a module starting with `func_` followed by
a test name, and insert into it some code. The tests will run pylint
against these modules. If the idea is that no messages now occur, then
that is fine, just check to see if it works by running `scripts/test.sh`.
against these modules. If the idea is that no messages now occur, then
that is fine, just check to see if it works by running `scripts/test.sh`.

Ideally, add some pylint error suppression messages to the file to prevent
spurious warnings, since these are all tiny little modules not designed to
Expand All @@ -64,4 +78,4 @@ These are useful to quickly add "expected messages".

# License

`pylint-django` is available under the GPLv2 license.
`pylint-django` is available under the GPLv2 license.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
install_requires=[
'pylint-plugin-utils>=0.2.1',
'pylint>=1.8.2',
'Django',
],
license='GPLv2',
classifiers=[
Expand Down