Skip to content

Commit

Permalink
Merge pull request #13 from SublimeLinter/sl4-cleanup
Browse files Browse the repository at this point in the history
cleanup for SL4
  • Loading branch information
braver authored Apr 2, 2018
2 parents 099bad8 + e7c27af commit 1ca72df
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 41 deletions.
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
language: python
python:
- "3.3"
# command to install dependencies
- "3.6"
install:
- pip install flake8
- pip install pydocstyle
# command to run tests
script:
- flake8 . --max-line-length=120
- pydocstyle . --add-ignore=D202
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ SublimeLinter-cpplint

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

This linter plugin for SublimeLinter provides an interface to [cpplint](https://pypi.python.org/pypi/cpplint). It will be used with files that have the "C" or “C++” syntax.
This linter plugin for SublimeLinter provides an interface to [cpplint](https://pypi.python.org/pypi/cpplint).
It will be used with files that have the "C" or "C++" syntax.

## Installation

SublimeLinter must be installed in order to use this plugin.

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

Before using this plugin, you must ensure that `cpplint` is installed on your system. To install `cpplint`, do the following:
Before using this plugin, ensure that `cpplint` is installed on your system.
To install `cpplint`, do the following:

1. Install [Python](http://python.org/download/) and [pip](http://www.pip-installer.org/en/latest/installing.html).

Expand All @@ -19,12 +22,14 @@ Before using this plugin, you must ensure that `cpplint` is installed on your sy
[sudo] pip install cpplint
```

In order for `cpplint` to be executed by SublimeLinter, you must ensure that its path is available to SublimeLinter. The docs cover [troubleshooting PATH configuration](http://sublimelinter.readthedocs.io/en/latest/troubleshooting.html#finding-a-linter-executable).
Please make sure that the path to `cpplint` is available to SublimeLinter.
The docs cover [troubleshooting PATH configuration](http://sublimelinter.com/en/latest/troubleshooting.html#finding-a-linter-executable).


## Settings
- SublimeLinter settings: http://sublimelinter.readthedocs.org/en/latest/settings.html
- Linter settings: http://sublimelinter.readthedocs.org/en/latest/linter_settings.html

- SublimeLinter settings: http://sublimelinter.com/en/latest/settings.html
- Linter settings: http://sublimelinter.com/en/latest/linter_settings.html

Additional settings for SublimeLinter-cpplint

Expand Down
21 changes: 2 additions & 19 deletions linter.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,16 @@
#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by NotSqrt
# Copyright (c) 2013 NotSqrt
#
# License: MIT
#

"""This module exports the Cpplint plugin class."""

from SublimeLinter.lint import Linter, util


class Cpplint(Linter):
"""Provides an interface to cpplint."""

syntax = ('c++', 'c')
cmd = ('cpplint', '*', '@')
cmd = ('cpplint', '${args}', '${file}')
regex = r'^.+:(?P<line>\d+):\s+(?P<message>.+)'
tempfile_suffix = '-'
error_stream = util.STREAM_BOTH # errors are on stderr
defaults = {
'selector': 'source.c, source.c++',
'--filter=,': '',
'--linelength=,': '',
}
comment_re = r'\s*/[/*]'
inline_settings = None
inline_overrides = ['filter', 'linelength']

def split_match(self, match):
"""
Expand Down
4 changes: 1 addition & 3 deletions messages.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"install": "messages/install.txt",
"1.0.8": "messages/1.0.8.txt",
"1.0.9": "messages/1.0.9.txt"
"install": "messages/install.txt"
}
6 changes: 0 additions & 6 deletions messages/1.0.8.txt

This file was deleted.

3 changes: 0 additions & 3 deletions messages/1.0.9.txt

This file was deleted.

0 comments on commit 1ca72df

Please sign in to comment.