Skip to content

Commit aadd0fb

Browse files
committed
Added errors, warnings and ignore settings, updated README accordingly.
1 parent f82bd02 commit aadd0fb

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ To install via Package Control, do the following:
2929
## Settings
3030
For general information on how SublimeLinter works with settings, please see [Settings](https://github.com/SublimeLinter/SublimeLinter.github.io/wiki/Settings). For information on generic linter settings, please see [Linter Settings](https://github.com/SublimeLinter/SublimeLinter.github.io/wiki/Linter-Settings).
3131

32+
In addition to the standard SublimeLinter settings, SublimeLinter-csslint provides its own settings which correspond to the command line options of the same name. All of them may be used as [inline overrides](https://github.com/SublimeLinter/SublimeLinter.github.io/wiki/Settings#inline-overrides).
33+
34+
|Setting|Description|
35+
|:------|:----------|
36+
|errors|A comma-separated list of rules to include as errors|
37+
|warnings|A comma-separated list of rules to include as warnings|
38+
|ignore|A comma-separated list of rules to ignore|
39+
40+
To get a list of the available rule names, execute `csslint --list-rules` from a terminal.
41+
3242
## Contributing
3343
If you would like to contribute enhancements or fixes, please do the following:
3444

@@ -41,7 +51,7 @@ If you would like to contribute enhancements or fixes, please do the following:
4151
Please note that modications should follow these coding guidelines:
4252

4353
- Indent is 4 spaces.
44-
- Code should pass flake8 and pep257 linters.
54+
- Code should pass csslint and pep257 linters.
4555
- Vertical whitespace helps readability, don’t be afraid to use it.
4656

4757
Thank you for helping out!

linter.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ class CSSLint(Linter):
3333
selectors = {
3434
'html': 'source.css.embedded.html'
3535
}
36+
defaults = {
37+
'--errors=,': '',
38+
'--warnings=,': '',
39+
'--ignore=,': ''
40+
}
41+
inline_overrides = ('errors', 'warnings', 'ignore')
42+
comment_re = r'\s*/\*'
3643

3744
def split_match(self, match):
3845
"""

0 commit comments

Comments
 (0)