From 3de2c704effcb290521d44f87de02346cf99a3c1 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sat, 18 Apr 2015 11:35:23 +0000 Subject: [PATCH] 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-d3aeb78583b8 --- ChangeLog | 3 +++ doc/syntax/python.nanorc | 1 + doc/syntax/ruby.nanorc | 1 + doc/syntax/sh.nanorc | 1 + doc/syntax/tex.nanorc | 1 + 5 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index f76b2ce3..0f8e3aee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2015-04-18 Mark Oteiza + * doc/syntax/{python,ruby,sh,tex}.nanorc: Add a linter definition. + 2015-04-17 Benno Schulenberg * src/text.c (do_alt_speller, do_linter, do_formatter): Distinguish a failure to launch the linter from receiving zero parsable lines; diff --git a/doc/syntax/python.nanorc b/doc/syntax/python.nanorc index eb2b36e9..d86668c9 100644 --- a/doc/syntax/python.nanorc +++ b/doc/syntax/python.nanorc @@ -2,6 +2,7 @@ syntax "python" "\.py$" header "^#!.*python[-0-9._]*" +linter pyflakes # Function definitions. icolor brightblue "def [0-9A-Z_]+" diff --git a/doc/syntax/ruby.nanorc b/doc/syntax/ruby.nanorc index 298425f0..a7072216 100644 --- a/doc/syntax/ruby.nanorc +++ b/doc/syntax/ruby.nanorc @@ -2,6 +2,7 @@ syntax "ruby" "\.rb$" header "^#!.*ruby[-0-9._]*" +linter ruby -w -c # Reserved words. color yellow "\<(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module)\>" diff --git a/doc/syntax/sh.nanorc b/doc/syntax/sh.nanorc index 074e03ac..11eb9a45 100644 --- a/doc/syntax/sh.nanorc +++ b/doc/syntax/sh.nanorc @@ -3,6 +3,7 @@ syntax "sh" "\.sh$" header "^#!.*((ba|da|k|pdk)?sh[-0-9_]*|openrc-run|runscript)" magic "(POSIX|Bourne.*) shell script text" +linter dash -n 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)\>" diff --git a/doc/syntax/tex.nanorc b/doc/syntax/tex.nanorc index 7fa417c4..a89cff90 100644 --- a/doc/syntax/tex.nanorc +++ b/doc/syntax/tex.nanorc @@ -1,6 +1,7 @@ ## Here is a short example for TeX files. syntax "tex" "\.tex$" +linter chktex -v0 -q -I icolor green "\\.|\\[A-Z]*" color magenta "[{}]"