Skip to content

Commit a304908

Browse files
author
Mark Collins
committed
Adapted template into linter plugin for CSL language using https://github.com/Marcool04/utilities/blob/master/csl-validator.sh
1 parent 2a1bc16 commit a304908

File tree

4 files changed

+17
-60
lines changed

4 files changed

+17
-60
lines changed

HOWTO.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

README.md

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,21 @@
1-
This is a template. For "how to make a linter", please check [the HOWTO](HOWTO.md).
1+
SublimeLinter-csl
2+
=================
23

3-
-----------------------------------------------------------------
4+
[![Build Status](https://travis-ci.org/SublimeLinter/SublimeLinter-csl.svg?branch=master)](https://travis-ci.org/SublimeLinter/SublimeLinter-csl)
45

5-
SublimeLinter-contrib-__linter__
6-
================================
7-
8-
[![Build Status](https://travis-ci.org/SublimeLinter/SublimeLinter-contrib-__linter__.svg?branch=master)](https://travis-ci.org/SublimeLinter/SublimeLinter-contrib-__linter__)
9-
10-
This linter plugin for [SublimeLinter](https://github.com/SublimeLinter/SublimeLinter) provides an interface to [__linter__](__linter_homepage__). It will be used with files that have the “__syntax__” syntax.
6+
This linter plugin for [SublimeLinter](https://github.com/SublimeLinter/SublimeLinter) provides an interface to the [csl-validator.sh](https://github.com/citation-style-language/utilities) script. It will be used with files that have the Citation Style Language (CSL) syntax.
117

128
## Installation
13-
SublimeLinter must be installed in order to use this plugin.
9+
SublimeLinter must be installed in order to use this plugin.
1410

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

17-
Before installing this plugin, you must ensure that `__linter__` is installed on your system.
13+
Before installing this plugin, you must ensure that the `csl-validator.sh` script from https://github.com/citation-style-language/utilities is available on your system. This further requires the `curl` and `jq` utilities.
1814

19-
In order for `__linter__` 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).
15+
In order for `csl-validator.sh` 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).
2016

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

25-
Additional SublimeLinter-__linter__ settings:
26-
27-
|Setting|Description |
28-
|:------|:--------------|
29-
|foo |Something. |
30-
|bar |Something else.|
21+
There are no specific settings for `csl-validator.sh` nor this plugin.

linter.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
from SublimeLinter.lint import Linter # or NodeLinter, PythonLinter, ComposerLinter, RubyLinter
1+
from SublimeLinter.lint import Linter
22

3-
4-
class __class__(Linter):
5-
cmd = '__cmd__'
6-
regex = r''
7-
multiline = False
3+
class SublimeLinterCsl (Linter):
4+
cmd = 'csl-validator.sh'
5+
regex = r'^M="(?P<message>.+)" L=(?P<line>\d+) C=(?P<col>\d+)$'
86
defaults = {
9-
'selector': 'source.python'
7+
'selector': 'source.csl, text.xml'
108
}

messages/install.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
SublimeLinter-contrib-__linter__
2-
-------------------------------
3-
This linter plugin for SublimeLinter provides an interface to __linter__.
1+
SublimeLinter-csl
2+
-----------------
3+
This linter plugin for SublimeLinter provides an interface to `csl-validator.sh`.
44

55
For more information, please see:
6-
https://github.com/__user__/SublimeLinter-contrib-__linter__
6+
https://github.com/Marcool04/SublimeLinter-csl

0 commit comments

Comments
 (0)