Skip to content

Commit

Permalink
cleanup and inline settings deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
braver committed Dec 29, 2017
1 parent 8d0c87b commit 46bac75
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 71 deletions.
14 changes: 0 additions & 14 deletions .sublimelinterrc

This file was deleted.

67 changes: 15 additions & 52 deletions README.md
Expand Up @@ -3,66 +3,29 @@ SublimeLinter-luacheck

[![Build Status](https://travis-ci.org/SublimeLinter/SublimeLinter-luacheck.svg)](https://travis-ci.org/SublimeLinter/SublimeLinter-luacheck)

This linter plugin for [SublimeLinter][docs] provides an interface to [luacheck][]. It will be used with files that have the “Lua” syntax.
This linter plugin for [SublimeLinter](https://github.com/SublimeLinter/SublimeLinter) provides an interface to [luacheck](http://luacheck.readthedocs.io. It will be used with files that have the “Lua” syntax.

## Installation
SublimeLinter 3 must be installed in order to use this plugin. If SublimeLinter 3 is not installed, please follow the instructions [here][installation].
SublimeLinter must be installed in order to use this plugin.

### Linter installation
Before using this plugin, you must ensure that `luacheck` is installed on your system. To install `luacheck`, follow the instructions at the [luacheck home page][luacheck].
Please use [Package Control](https://packagecontrol.io) to install the linter plugin.

### Linter configuration
In order for `luacheck` to be executed by SublimeLinter, you must ensure that its path is available to SublimeLinter. Before going any further, please read and follow the steps in [“Finding a linter executable”](http://sublimelinter.readthedocs.org/en/latest/troubleshooting.html#finding-a-linter-executable) through “Validating your PATH” in the documentation.
Before using this plugin, you must ensure that `luacheck` is installed on your system. To install `luacheck`, follow the instructions at the [luacheck home page](http://luacheck.readthedocs.io.

Once you have installed and configured `luacheck`, you can proceed to install the SublimeLinter-luacheck plugin if it is not yet installed.

### Plugin installation
Please use [Package Control][pc] to install the linter plugin. This will ensure that the plugin will be updated when new versions are available. If you want to install from source so you can modify the source code, you probably know what you are doing so we won’t cover that here.

To install via Package Control, do the following:

1. Within Sublime Text, bring up the [Command Palette][cmd] and type `install`. Among the commands you should see `Package Control: Install Package`. If that command is not highlighted, use the keyboard or mouse to select it. There will be a pause of a few seconds while Package Control fetches the list of available plugins.

1. When the plugin list appears, type `SublimeLinter-luacheck`. Among the entries you should see `SublimeLinter-luacheck`. If that entry is not highlighted, use the keyboard or mouse to select it.
In order for `luacheck` 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).

## Settings
For general information on how SublimeLinter works with settings, please see [Settings][settings]. For information on generic linter settings, please see [Linter Settings][linter-settings].

In addition to the standard SublimeLinter settings, SublimeLinter-luacheck provides its own settings. Those marked as “Inline Setting” or “Inline Override” may also be [used inline][inline-settings].

|Setting|Description|Inline Setting|Inline Override|
|:------|:----------|:------------:|:-------------:|
|ignore|Do not report warnings related to these variables|✓|✓|
|only|Only report warnings related to these variables|✓|✓|
|globals|Defined globals|✓|✓|
|limit|The maximum number of warnings|✓| |

These settings are passed through to `luacheck` as command line options. Please see the [luacheck documentation][luacheck] for more information.

## Contributing
If you would like to contribute enhancements or fixes, please do the following:

1. Fork the plugin repository.
1. Hack on a separate topic branch created from the latest `master`.
1. Commit and push the topic branch.
1. Make a pull request.
1. Be patient. ;-)
- SublimeLinter settings: http://sublimelinter.readthedocs.org/en/latest/settings.html
- Linter settings: http://sublimelinter.readthedocs.org/en/latest/linter_settings.html

Please note that modications should follow these coding guidelines:
Additional SublimeLinter-luacheck settings:

- Indent is 4 spaces.
- Code should pass flake8 and pep257 linters.
- Vertical whitespace helps readability, don’t be afraid to use it.
- Please use descriptive variable names, no abbrevations unless they are very well known.
|Setting|Description|
|:------|:----------|
|ignore|Do not report warnings related to these variables|
|only|Only report warnings related to these variables|
|globals|Defined globals|
|limit|The maximum number of warnings|

Thank you for helping out!
The preferred method of configuring `luacheck` is via [.luacheckrc files](http://luacheck.readthedocs.io/en/stable/config.html)

[docs]: http://sublimelinter.readthedocs.org
[installation]: http://sublimelinter.readthedocs.org/en/latest/installation.html
[locating-executables]: http://sublimelinter.readthedocs.org/en/latest/usage.html#how-linter-executables-are-located
[pc]: https://sublime.wbond.net/installation
[cmd]: http://docs.sublimetext.info/en/sublime-text-3/extensibility/command_palette.html
[settings]: http://sublimelinter.readthedocs.org/en/latest/settings.html
[linter-settings]: http://sublimelinter.readthedocs.org/en/latest/linter_settings.html
[inline-settings]: http://sublimelinter.readthedocs.org/en/latest/settings.html#inline-settings
[luacheck]: https://github.com/mpeterv/luacheck
3 changes: 2 additions & 1 deletion messages.json
@@ -1,3 +1,4 @@
{
"install": "messages/install.txt"
"install": "messages/install.txt",
"2.1.0": "messages/2.1.0.txt"
}
6 changes: 6 additions & 0 deletions messages/2.1.0.txt
@@ -0,0 +1,6 @@
SublimeLinter-luacheck
-------------------------------
Inline settings will be deprecated in SublimeLinter 4. Please use luacheck's
own configuration files instead.

https://github.com/SublimeLinter/SublimeLinter3/blob/next/messages/4.0.0-rc.1.txt
5 changes: 1 addition & 4 deletions messages/install.txt
Expand Up @@ -2,9 +2,6 @@ SublimeLinter-luacheck
-------------------------------
This linter plugin for SublimeLinter provides an interface to luacheck.

** IMPORTANT! **

Before this plugin will activate, you *must*
follow the installation instructions here:
Please read the installation instructions at:

https://github.com/SublimeLinter/SublimeLinter-luacheck

0 comments on commit 46bac75

Please sign in to comment.