Adding a linter definition to four of the syntax files.
Patch by Mark Oteiza. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5203 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
cc65a42035
commit
3de2c704ef
|
@ -1,3 +1,6 @@
|
||||||
|
2015-04-18 Mark Oteiza <mvoteiza@udel.edu>
|
||||||
|
* doc/syntax/{python,ruby,sh,tex}.nanorc: Add a linter definition.
|
||||||
|
|
||||||
2015-04-17 Benno Schulenberg <bensberg@justemail.net>
|
2015-04-17 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/text.c (do_alt_speller, do_linter, do_formatter): Distinguish
|
* src/text.c (do_alt_speller, do_linter, do_formatter): Distinguish
|
||||||
a failure to launch the linter from receiving zero parsable lines;
|
a failure to launch the linter from receiving zero parsable lines;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
syntax "python" "\.py$"
|
syntax "python" "\.py$"
|
||||||
header "^#!.*python[-0-9._]*"
|
header "^#!.*python[-0-9._]*"
|
||||||
|
linter pyflakes
|
||||||
|
|
||||||
# Function definitions.
|
# Function definitions.
|
||||||
icolor brightblue "def [0-9A-Z_]+"
|
icolor brightblue "def [0-9A-Z_]+"
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
syntax "ruby" "\.rb$"
|
syntax "ruby" "\.rb$"
|
||||||
header "^#!.*ruby[-0-9._]*"
|
header "^#!.*ruby[-0-9._]*"
|
||||||
|
linter ruby -w -c
|
||||||
|
|
||||||
# Reserved words.
|
# Reserved words.
|
||||||
color yellow "\<(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module)\>"
|
color yellow "\<(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module)\>"
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
syntax "sh" "\.sh$"
|
syntax "sh" "\.sh$"
|
||||||
header "^#!.*((ba|da|k|pdk)?sh[-0-9_]*|openrc-run|runscript)"
|
header "^#!.*((ba|da|k|pdk)?sh[-0-9_]*|openrc-run|runscript)"
|
||||||
magic "(POSIX|Bourne.*) shell script text"
|
magic "(POSIX|Bourne.*) shell script text"
|
||||||
|
linter dash -n
|
||||||
|
|
||||||
icolor brightgreen "^[0-9A-Z_]+\(\)"
|
icolor brightgreen "^[0-9A-Z_]+\(\)"
|
||||||
color green "\<(break|case|continue|do|done|elif|else|esac|exit|fi|for|function|if|in|read|return|select|shift|then|time|until|while)\>"
|
color green "\<(break|case|continue|do|done|elif|else|esac|exit|fi|for|function|if|in|read|return|select|shift|then|time|until|while)\>"
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
## Here is a short example for TeX files.
|
## Here is a short example for TeX files.
|
||||||
|
|
||||||
syntax "tex" "\.tex$"
|
syntax "tex" "\.tex$"
|
||||||
|
linter chktex -v0 -q -I
|
||||||
|
|
||||||
icolor green "\\.|\\[A-Z]*"
|
icolor green "\\.|\\[A-Z]*"
|
||||||
color magenta "[{}]"
|
color magenta "[{}]"
|
||||||
|
|
Loading…
Reference in New Issue