The HTML5 <source> tag throws an error when using Tidy since exceptions
have been made for audio and video, we should also support the source
tag which can exist inside these calls.
slightly modified version of the C checker. I did a find/replace to make
it use "_objc_" instead of "_c_" . I also modified the errorformat to
look more like the cpp errorformat because I discovered that the entries
added to the C errorformat no longer seem to match anything.
The code to generate the makeprg was an epic jumble. Break it down into
separate methods.
Also, init several options at the top of the script and make some
executable() checks at the same time. This clears up some of the clutter
and means we only check it once - not on every syntax check.
999d3c1b added a filter on the errors list that checks for key/value
valid:1 in each element of the errors list. sh.vim doesn't use
SyntasticMake to check for errors so needs to add {valid:1} to each
result.
The current makeprg doesn't work with php-5.3. display_errors=0 has
disabled error outputting and error_log='' disables the error log. With
php-5.4 error_log='' is causing errors to be logged to stderr.
This patch disables the error_log and enables display_errors.
Theoretically errors are displayed on stdout, however php in mountain
lion seems to insist on outputting to stderr.
As we're now displaying errors rather than logging them to error format
has changed to no longer include 'PHP ' and I've removed duplicates.
This has been tested with PHP 5.3.13 with Suhosin-Patch (cli) (built: Jun 20
2012 17:05:20) (mountain lion) and PHP 5.4.4 (cli) (built: Jul 2 2012
16:33:50) Fedora 17
* move the doc for it to the top of the script to be consistent with
other syntax checkers
* dont define a s:checker var - just use the
g:syntastic_perl_efm_program variable. This simplifies things slightly
On systems where Ruby 1.8.7 is the default Ruby and users use
alternative suffixes (e.g., ruby19) or even rbenv or rvm Rubies, modern
Ruby syntax will be highlighted as an error.
The default behaviour in Syntastic is to run 'ruby' to check the syntax
of the script in question. This patch allows the user to specify a
different binary which may even be a full path. This should work on all
platforms.
let g:syntastic_ruby_exec = 'ruby19'
let g:syntastic_ruby_exec = '~/.rbenv/versions/1.9.2-p318/bin/ruby'
Move the coffeelint code out into its own function.
Init the coffeelint option once, at the top of the script. Change its
name so it begins with "syntastic_" - for namespacing purposes.
Previously we were using "medium verbosity" with `-W1`. The reason for
this is because using full verbosity caused some bogus repeated warnings
to appear in rspec files.
Enable full verbosity again and filter out the bogus warnings.
Closes#290
Cuda programs may produce different errors depending on the architecture of the
target hardware. The canonical example and reason for writing this patch, is the
lack of support for double precision numbers on older hardware. By default, nvcc
and thus syntastic, defaults to the most basic architecture. This can produce
false errors if the developer intends to compile for newer hardware and use
newer features.
Not defining g:syntastic_cuda_arch preserves this behavior. Otherwise the user
is expected to set it a valid arch flag, as listed by `nvcc --help`.
Example:
let g:syntastic_cuda_arch = "sm_20"
Some users might want to disable some checks for puppet-lint if they do
not intend to follow all of the style recommendations. There is
currently no way of doing that.
By adding a global variable synstastic_puppet_lint_arguments, one can
now set arguments to pass to puppet-lint via .vimrc.
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
First example:
$ echo -e 'if (0)\nsome();\n}' | perl -c -
Semicolon seems to be missing at - line 1.
syntax error at - line 2, near ")
some"
Unmatched right curly bracket at - line 3, at end of line
- had compilation errors.
$ echo -e 'if (0)\nsome();\n}' | perl syntax_checkers/efm_perl.pl -c -
-:1:Semicolon seems to be missing
Second example:
$ echo -e 'if (0)' | perl -c -
syntax error at - line 1, at EOF
- had compilation errors.
$ echo -e 'if (0)' | perl syntax_checkers/efm_perl.pl -c -
It will compile all *.java files in the pwd and apply the errorformat string
from quickfix.txt
Interesting additional features would be:
* @argument files
* setting the pwd for javac
* perform only a syntax check (javac currently always builds class files)
That variable specify the file which contains a list of filename that
Closure Compiler processes at once.
It can be useful for a project using 'require' statement like node.js.
Previously the 2 checkers were in the same file - this is more "tidy"
(lol??).
Currently the logic to determine which checker is loaded is custom to
the checker. At some point the SyntasticLoadChecker() function should be
upgraded to be able to handle cases (like this one) where the name of
the checker doesnt imply the name(s) of the executables that have to be
checked for.
The logic for this option was reversed in 2 places. Puppet-lint should
have been getting disabled for old versions and if it wasnt installed,
but the logic was wrong.
The output of flake8 is ambiguous as to whether results should be
interpreted as warnings or errors. I have changed it to assume errors to
match the python/pyflakes checker.
In future we may want to change this or add items to the errorformat for
some specific warnings if they are annoying.
This fixes#203.
setting it to E_PARSE causes some errors to be missed - e.g.
`$a[$b][] $c;`
will not cause an error to get reported as this is classed as a compile
error, not a parse error.
This should fix#206.
This is needed to handle compound filetypes since we cant imply the
location of the syntax checker file from the filetype.
e.g. we want to load `syntax_checkers/python/pylint.vim`, but the
filetype is `python.django`. Previously this was causing `runtime
syntax_checkers/python.django/pylint.vim` to be executed.
* move the existing ruby checker to syntax_checkers/ruby/mri.vim
* add a skeleton checker for jruby
* load mri by default but add an option to specify which ruby checker to
load
This is in response to #185
* remove the public SyntasticHighlightErrors() function
* shift the above code into s:HighlightErrors(). This is called
automatically if g:syntastic_enable_highlighting is set
* to get the highlight regex we just look for a function called
Syntastic_<filetype>_GetHighlightRegex
* to force this function to be called, each error item must have the
'force_highlight_callback' key set
This code has one important functional change: now errors are *always*
highlighted if possible whereas previously they were only highlighted if
a call to SyntasticHighlightErrors was made.
The error messages that pyflakes outputs dont contain enough information
to classify them as errors or warnings. Apart from checking for all
known warning outputs and classifying the rest as errors (or vice versa)
there is no way classify.
Make the syntax checker class all results as errors. Individual warning
formats can be checked for later if they become a problem.
This addresses #189.
dont refer to g:syntastic_python_checker since - due to a previous
commit - this is not guaranteed to exist any more.
This change should have been done in the aforementioned commit - but I
failed.
display_errors might be turned of for php globally. In this case the
output of php -l does not contain the errors messages. Using this option
will turn the option on for the single call.