Skip to content

Commit

Permalink
Adapted template into linter plugin for CSL language using https://gi…
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcool04 committed May 3, 2021
1 parent 2a1bc16 commit a304908
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 60 deletions.
32 changes: 0 additions & 32 deletions HOWTO.md

This file was deleted.

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

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

SublimeLinter-contrib-__linter__
================================

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

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.
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.

## 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.

Before installing this plugin, you must ensure that `__linter__` is installed on your system.
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.

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).
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).

## Settings
- 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:

|Setting|Description |
|:------|:--------------|
|foo |Something. |
|bar |Something else.|
There are no specific settings for `csl-validator.sh` nor this plugin.
12 changes: 5 additions & 7 deletions linter.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
from SublimeLinter.lint import Linter # or NodeLinter, PythonLinter, ComposerLinter, RubyLinter
from SublimeLinter.lint import Linter


class __class__(Linter):
cmd = '__cmd__'
regex = r''
multiline = False
class SublimeLinterCsl (Linter):
cmd = 'csl-validator.sh'
regex = r'^M="(?P<message>.+)" L=(?P<line>\d+) C=(?P<col>\d+)$'
defaults = {
'selector': 'source.python'
'selector': 'source.csl, text.xml'
}
8 changes: 4 additions & 4 deletions messages/install.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SublimeLinter-contrib-__linter__
-------------------------------
This linter plugin for SublimeLinter provides an interface to __linter__.
SublimeLinter-csl
-----------------
This linter plugin for SublimeLinter provides an interface to `csl-validator.sh`.

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

0 comments on commit a304908

Please sign in to comment.