Skip to content

Commit

Permalink
Added all darglint config
Browse files Browse the repository at this point in the history
Everything I know of anyhow
  • Loading branch information
raddessi committed Nov 20, 2018
1 parent a518e42 commit 8373753
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
This is a template. For "how to make a linter", please check [the HOWTO](HOWTO.md).

-----------------------------------------------------------------

SublimeLinter-contrib-darglint
================================

[![Build Status](https://travis-ci.org/SublimeLinter/SublimeLinter-contrib-__linter__.svg?branch=master)](https://travis-ci.org/SublimeLinter/SublimeLinter-contrib-__linter__)
[![Build Status](https://travis-ci.org/SublimeLinter/SublimeLinter-contrib-darglint.svg?branch=master)](https://travis-ci.org/SublimeLinter/SublimeLinter-contrib-darglint)

This linter plugin for [SublimeLinter](https://github.com/SublimeLinter/SublimeLinter) provides an interface to [darglint](https://github.com/terrencepreilly/darglint). It will be used with files that have the “python” syntax.

## Installation
SublimeLinter must be installed in order to use this plugin.
SublimeLinter must be installed in order to use this plugin.

Please use [Package Control](https://packagecontrol.io) to install the linter plugin.

Expand All @@ -22,9 +18,8 @@ In order for `darglint` to be executed by SublimeLinter, you must ensure that it
- SublimeLinter settings: http://sublimelinter.readthedocs.org/en/latest/settings.html
- Linter settings: http://sublimelinter.readthedocs.org/en/latest/linter_settings.html

Additional SublimeLinter-__linter__ settings:
Additional SublimeLinter-darglint settings:

|Setting|Description |
|:------|:--------------|
|foo |Something. |
|bar |Something else.|
|--docstring-style |The docstring style used in the given project. |
9 changes: 6 additions & 3 deletions linter.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
from SublimeLinter.lint import PythonLinter
from SublimeLinter.lint import PythonLinter, WARNING


class Darglint(PythonLinter):
cmd = ('darglint', '${args}', '-')
regex = r'^.+?:(?P<function>.+):(?P<line>\d+): (?:(?P<interface>I\d+)|(?P<style>S\d+)): (?P<message>.+)'
cmd = ('darglint', '--verbosity', '2', '${file}', '${args}')
regex = r'^.+?:(?P<near>.+):(?P<line>\d+): (?P<code>[IS]\d+): (?P<message>.+)'
multiline = True
defaults = {
'selector': 'source.python',
'default_type': WARNING,
'tempfile_suffix': 'py',
'--docstring-style': 'google',
}
6 changes: 3 additions & 3 deletions messages/install.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SublimeLinter-contrib-__linter__
SublimeLinter-contrib-darglint
-------------------------------
This linter plugin for SublimeLinter provides an interface to __linter__.
This linter plugin for SublimeLinter provides an interface to darglint.

For more information, please see:
https://github.com/__user__/SublimeLinter-contrib-__linter__
https://github.com/raddessi/SublimeLinter-contrib-darglint

0 comments on commit 8373753

Please sign in to comment.