Giter Club home page Giter Club logo

syntastic's People

Contributors

aswna avatar cehoffman avatar cholewa1992 avatar daniel-walker avatar darcyparker avatar dbarnett avatar edwintorok avatar erszcz avatar euoia avatar jdonaldson avatar jrahm avatar julienxx avatar kaleb avatar kisielk avatar kongo2002 avatar kstep avatar lcd047 avatar mbedna avatar millermedeiros avatar mootoh avatar oryband avatar pixelastic avatar powerman avatar rbrown avatar scrooloose avatar technosophos avatar tomfogg avatar tpope avatar troydm avatar zenzike avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

syntastic's Issues

Problem with erlang_check_file.erl location if not using pathogen

Problem makeing erlang_check_file.erl in line 32 or 35 when syntastic is invoked in a Erlang type file and Syntastic was not installed in the bundle/syntastic that Pathogen requires but just dropped in .vim file.

Some check must be implemented to see where the syntastic package was installed and then use that path to find erlang_check_file.erl.

Incompatibility with http://github.com/nathanaelkane/vim-indent-guides

I'm posting this here but I'm not an expert in vimscript so the problem could be with vim-indent-guides.
The fact is, as soon as a buffer is saved, syntastic does its syntaxing stuff, but also clears the indent highlights set by vim-indent-guides.
Upon re-enabling vim-indent-guides on the same buffer, there's an error

Error detected while processing function 26_IndentGuidesToggle..indent_guides#toggle..indent_guides#disable..indent_guides#clear_matches:
line    5:
E803: ID not found: 468
E803: ID not found: 469
E803: ID not found: 470
E803: ID not found: 471
...
...

Now, a quick glimpse at https://github.com/nathanaelkane/vim-indent-guides/blob/master/autoload/indent_guides.vim#L68
tells me (but I might be wrong) that it's doing it right, by cleaning its own ids.
The problem seems to be at https://github.com/scrooloose/syntastic/blob/master/autoload/syntastic.vim#L8 but, once again, I might have it wrong completely because I'm an amateur at vimscript.

CoffeScript: Not getting all errors

I was trying the coffescript syntax checker and I found out that not syntax errors are beign captured.

To reproduce it write 'function' on any coffee file

Here is the generated error by 'coffee':

SyntaxError: In simpleMapComponent.js.coffee, Reserved word "function" on line 10
 at SyntaxError (unknown source)
 at Lexer.identifierError (/usr/lib/node_modules/coffee-script/lib/lexer.js:458:13)
 at Lexer.identifierToken (/usr/lib/node_modules/coffee-script/lib/lexer.js:80:16)
 at Lexer.tokenize (/usr/lib/node_modules/coffee-script/lib/lexer.js:31:19)
 at Object.compile (/usr/lib/node_modules/coffee-script/lib/coffee-script.js:29:34)
 at /usr/lib/node_modules/coffee-script/lib/command.js:149:33
 at /usr/lib/node_modules/coffee-script/lib/command.js:115:26
 at [object Object].<anonymous> (fs.js:107:5)
 at [object Object].emit (events.js:61:17)
 at afterRead (fs.js:878:12)

Location List locations contain the line number in them

When using the C syntax checker with syntastic, if I create an error and go to any error in the location list, instead of navigating to the file at the correct line, it creates a new file of the format:

filename:line#

So it erroneously adds the line number to the file name, which of course means it creates a new file.

I'm not sure what I might have changed to cause this to happen. I was fixing my status line and hadn't tested it in a while, but I also have been updating the plugin itself. I have the most recent version as of now, and the error still occurs.

Is there any easy way of diagnosing whether this is a problem on my side or not?

Thanks,
Brandon

HAML Issues

This is related to Janus repo - I don't know what the conflict is but it's being caused by syntastic.

Whenever opening up a HAML File VIM errors out and it also asks to rewrite the file you're working on when you try to save it.

carlhuda/janus#210

Findability of syntastic

What's with one (old) version of syntastic being on vimscripts (first in google), with no link here. And grey's fork being second place, and your version oh so hidden? The world must know.

Very long vim startup time caused by syntastic on OSX

After some troubleshooting, I discovered that the excessively long vim startup times I was experiencing
were caused by the Syntastic bundle. I was seeing startup times of 15 to 30+ seconds for a new file.
The startup time drops to less than 1 sec without sytastic installed.

However, I was only seeing this on Mac OSX (Snow Leopard, Tiger), but not on Ubuntu Linux. On all
of the machines I am using the same build and the same .vimrc & .vim/

Using the command "time vim -c q abc.txt" I get these times:

OSX (Snow Leopard) OSX (Tiger) Ubuntu(Lucid Lynx)

real 0m11.717s real 0m23.673s real 0m0.091s
user 0m0.841s user 0m3.426s user 0m0.070s
sys 0m0.295s sys 0m1.391s sys 0m0.000s

In subsequent runs the times improve (for OSX), but not significantly.

Are there any know issues that would cause this behavior on OSX and not Ubuntu?

Is there any way to not auto load the Syntastic bundle, but have it available on demand.

Thanks

Matt

Add option to disable syntastic in general (for all filetypes) by default

I think that it can be useful to disable syntastic by default, and enable it when you want to use it (via SyntasticEnable).

Currently you can only disable it using g:syntastic_disabled_filetypes, which expects a list of filetypes to exclude.

I see two options:

  1. allow "*" (for "all") in the list of filetypes to disable (and remove it once one of them gets enabled)
  2. add a new option to disable syntastic altogether (and which SyntasticEnable would toggle).

Strange problem in Vim after installing syntastic: &lines get unexpectedly reset from 999 to 24.

I have just added Syntastic to my plugins, and experience a very strange thing. I have set lines=999 in my .vimrc (inside a if has("gui")). This will make my vim-window fill the screen (vertically) when I use the gui.

Somehow, after I installed Syntastic, this setting gets destroyed when I start vim with gvim or vim -g from my shell. It works as usual if I start it with my hotkey -v set through Compiz.

I have done some debugging on my own, and I have found the the variable &lines is correct until line 23 in .../plugin/syntastic.vim, which is:

22 if !s:running_windows
23     let s:uname = system('uname')
24 endif

Before line 23, &lines = 999 as it should be. After line 23 though, &lines = 24. I have no idea what is happening, and I don't know where to begin to find a solution. I have also verified that the problem dissapears if I remove Syntastic, but since this is a very good plugin I want to keep it.

I hope someone either knows what is wrong or can help me to discover it.

Avoid loading location list with errors if it's already loaded when "set autoread" is set.

First, thanks for this plugin. It's great.

Second, I don't know if this is really an issue, or just an improvement. Here it goes.

I have your plugin installed. Suppose I'm editing a file with some erros (warnings), and then I edit this same file elsewhere, and since "autoread" is set in my .vimrc, a location list is loaded on top and the original location list on the bottom is kept as well.

I don't know if this is possible, but here is the suggestion: if there's already a location list loaded, don't load it again. I'm dont know vimscript so well, I think you already do this checking, but it may be lost when "autoread" is run, so you cant detect if location list is loaded, so the script loads the location list with syntax errors on the top again.

Argument error on Windows

When trying to validate xhtml on Windows using Syntastic it fails. I tracked it down to the file argument to tidy being sent with single quotes around it. I added this to xhtml.vim in syntax_checkers to fix the problem

    if has('win32') || has('win64')
      let makeprg="tidy ".encopt." -xml -e ".expand('%')
    else
      let makeprg="tidy ".encopt." -xml -e ".shellescape(expand('%'))
    endif

Netrw files (scp)

Is there some way to use syntastic on files access with netrw/scp? If there is not, then could this feature somehow be added?

errors when saving html.erb files

I'm on windows xp and I get this everytime I try to save a html.erb file
Im kinda newbie so I don't know how to be specific, I'm here if you need more info

Error detected while processing function 64_UpdateErrors..64_CacheErrors..SyntaxCheckers_eruby_GetLocList
..SyntasticMake:
line 20:
E40: Can't open errorfile C:\DOCUME1\ADMINI1\CONFIG~1\Temp\VIe3CF.tmp

Duplicate values of HTML-id is wrongfully allowed

<h1 id="logo">

and

<p id="logo">

in the same view should yield an error. I know that coding view files != the rendered result, but this hint should still be valuable.

Thanks for a great plugin

//Carl

Error when opening .sass file

Here's a screenshot of the error:

Do I have Syntastic set up incorrectly? Does Syntastic not know how to handle Sass files?

PyLint

Has anyone successfully managed to set up PyLint with syntastic? Thanks

ERuby unexpected ')'

I keep getting errors when building form_for in rails 3. They look like this
app/views/clients/_form.html.erb|4 col 35 error| unexpected ')'

When I delete the = sign from here <%= form_for @client do |f| %>
The error goes away.

support error messages from sass 3.x

Old error message format (sass 2.x):

Syntax error on line 15: Undefined mixin 'display-box'.

New error message format (sass 3.x):

Syntax error: Undefined mixin 'display-box'.
        on line 14 of src/screen.sass, in `display-box'
        from line 14 of src/screen.sass
  Use --trace for backtrace.

Patch:

diff --git a/syntax_checkers/sass.vim b/syntax_checkers/sass.vim
index 2bfa1ab..192992d 100644
--- a/syntax_checkers/sass.vim
+++ b/syntax_checkers/sass.vim
@@ -21,7 +21,8 @@ endif

 function! SyntaxCheckers_sass_GetLocList()
     let makeprg='sass --check '.shellescape(expand('%'))
-    let errorformat = '%Wwarning on line %l:,%Z%m,Syntax %trror on line %l: %m'
+    let errorformat = '%ESyntax %trror:%m,%C        on line %l of %f,%Z%m'
+    let errorformat .= ',%Wwarning on line %l:,%Z%m,Syntax %trror on line %l: %m'
     let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })

     let bn = bufnr("")

sass syntax checker slows down vim startup

sass syntax checker slows down vim startup because it calls compass. This is especially if your compass command is via jruby, since jruby has slow startup times.

If anything, SyntaxCheckers_sass_GetLocList() should cache g:syntastic_sass_imports instead of calling it on script load.

Framework for underlining

I think Syntastic is absolutely great. In fact, I want to use it for all of my syntax checking needs, replacing the current separate plugins I have for matlab and jslint.

There's only one thing stopping me: the lack of SpellCheck-style underlining for errors if specific column numbers or ranges are given. By browsing the pull requests and issues, I'm sure I'm not the only one who would like this feature.

However, I want to do it right. The thing that's so great about Syntastic is that it's a framework, for which anyone can quickly write specific plugins. I want to work out a generic way for these plugins to easily specify the syntax of the column number or range of the error, (perhaps automatically with error format) and let Syntastic automatically highlight those ranges.

I would be more than happy to fork and make some pull requests, but before I do so, I'd like to know if this idea is actually within your vision for the project. If it's not, I won't bother you with the pull requests. If you've already started thinking about this and have found it either futile or have made some progress, that would also be nice to know.

Thanks again for this great plugin!

'File to import not found' when using @import without extension in Sass/Rails

If I create two sass files, import one into another and don't state the extension explicitly, I get errors from syntastic.

// app/assets/stylesheets/style1.css.sass
$variable: 42
// app/assets/stylesheets/style2.css.sass

// Syntastic does not like this even though it's correct and actually works in my application...
@import "style1"

// ...but has no problem with this
@import "style1.css.sass"

The error messages I get:

style2.css.sass|| File to import not found or unreadable: style1. Load paths:
style2.css.sass|| /e/projects/sunrise/esirnus/app/assets/stylesheets
style2.css.sass|| /e/projects/sunrise/esirnus/app/assets/stylesheets/sass
style2.css.sass|| /usr/local/rvm/gems/ruby-1.9.2-p290-loadpatch/gems/compass-0.11.4/frameworks/blueprint/stylesheets
style2.css.sass|| /usr/local/rvm/gems/ruby-1.9.2-p290-loadpatch/gems/compass-0.11.4/frameworks/compass/stylesheets
style2.css.sass|| Compass::SpriteImporter
style2.css.sass|| on line 4 of style2.css.sass
style2.css.sass|| Use --trace for backtrace.

It's a problem if you have a mix of .sass and .scss files and don't want to hard-code requirement for one or the other syntax in every import.

I am using Rails 3.1, Sass 3.1.7, vim 7.3.294 (on Arch Linux) and latest syntastic from master branch (master, last updated today).

No such file or directory

Hello,

I just updated to the latest master and everytime I save a ruby (.rb) file I get:

ruby: No such file or directory -- path/to/file.rb

When I try to do

:!ruby -c path/to/file.rb

everything is fine. The path in the plugin must be wrong. Any clue?

Unknown sign: SyntasticWarning

I'm getting strange errors when saving.

Error detected while processing function <SNR>13_UpdateErrors..<SNR>13_RefreshSigns..<SNR>13_SignErrors:
line   12:
E155: Unknown sign: SyntasticWarning
E155: Unknown sign: SyntasticWarning

Ideas?

Not working

I clone the repo cd to the directory run rake to install the plugin.

Have the following statusline setup:

set statusline=%f

set statusline+=%#warningmsg#
set statusline+=%{&ff!='unix'?'['.&ff.']':''}
set statusline+=%*

set statusline+=%#warningmsg#
set statusline+=%{(&fenc!='utf-8'&&&fenc!='')?'['.&fenc.']':''}
set statusline+=%*

set statusline+=%h
set statusline+=%y
set statusline+=%r
set statusline+=%m

set statusline+=%#error#
set statusline+=%{StatuslineTabWarning()}
set statusline+=%*

set statusline+=%{StatuslineTrailingSpaceWarning()}

set statusline+=%#StatusLineNC#\ Git\ %#ErrorMsg#\ %{GitBranchInfoTokens()[0]}\ %#StatusLine#

set statusline+=%#error#
set statusline+=%{&paste?'[paste]':''}
set statusline+=%*

set statusline+=%=
set statusline+=%{StatuslineCurrentHighlight()}\ \
set statusline+=%c,
set statusline+=%l/%L
set statusline+=\ %P

set statusline+=%{StatuslineLongLineWarning()}

set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*

Open up a file like hello.js or hello.python and write garbage and nothing changes,
I tried saving the file and running :Errors and nothing changed.

And I set the following additional vars in my vimrc:

let g:syntastic_enable_signs=1
let g:syntastic_auto_loc_list=1

Not working?

Hello, i installed plugin, but i can't use it. :echo g:syntastic_enable_signs return 1, but there is no errors (al least in sh and php)
How i can debug it and provide more info?

support for less

less and scss is almost the same, any support for less?

since i haven't really look into sass, not sure if sass has the @arg part as less
eg:
.coolthings (@widthVar: 5px, @somethingelse: 5px) {
width: @widthVar;
#border > .round (@somethingelse);
}

a {
.coolthings ( 10px, @radiusSharp)
}

nevertheless, it is similar so is there support for less?

RUBYOPT is not recognized as a command

For some reason i'm having shown [syntax:0(2)] and :Errors show the following message:
|| 'RUBYOPT' is not recognized as an internal or external command,
|| operable program or batch file.

Why does it run RUBYOPT, which should be just an env variable?

I'm using gvim 7.2 on Windows with Ruby 1.8.

PHP syntax checking doesn't work

When saving a php file with errors in it, the plugin doesn't work properly. The error message appears in the error list displayed by the :Errors command but the error line number is not displayed in the status line; instead, [syntax:0] is displayed. Also, the error signs are not displayed either.

I tried the plugin with a ruby file and it works perfectly.

sass syntax error in included files misinterpretted as error in current file

The output of sass syntax check is:

WARNING on line 2 of app/stylesheets/_theme.sass:
This selector doesn't have any properties and will not be rendered.
Syntax error: Invalid CSS after "": expected expression (e.g. 1px, bold), was "!blueprint_font..."
        on line 7 of app/stylesheets/_theme.sass
        from line 3 of app/stylesheets/_base.sass
        from line 5 of app/stylesheets/page.sass
  Use --trace for backtrace.

Syntastic thinks that line 7 of page.sass is broken.

HTML 5 attributes throws errors

the following HTML 5 document throws errors and it validates using this HTML5 validator.

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Test</title>
        <link rel="stylesheet" href="css/main.css">
    </head>
    <body>
        <section data-some-value="foo">
            Lorem Ipsum
        </section>
        <script data-main="js/main.js" src="js/bar.js"></script>
    </body>
</html>

Errors:

test.html|4 col 9 warning| <meta> proprietary attribute "charset"
test.html|4 col 9 warning| <meta> lacks "content" attribute
test.html|6 col 9 warning| <link> inserting "type" attribute
test.html|12 col 9 warning| <script> proprietary attribute "data-main"
test.html|12 col 9 warning| <script> inserting "type" attribute

couldn't find an option on HTML tidy that would make it behave properly yet.

error with less ft

when I open a *.less file I get

"lib/bootstrap.less" 26L, 602C                                                                          
Error detected while processing function <SNR>28_UpdateErrors..<SNR>28_CacheErrors..SyntaxCheckers_less_GetLocList:                                                                                             
line    3:                                                                                              
E720: Missing colon in Dictionary: {'bufnr': bufnr(""), 'text': "Syntax error"} })                      
E116: Invalid arguments for function SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'de
faults' {'bufnr': bufnr(""), 'text': "Syntax error"} })                                                 E15: Invalid expression: SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'defaults' {'bufnr': bufnr(""), 'text': "Syntax error"} })                                                             
Error detected while processing function <SnNR>28_UpdateErrors..<SNR>28_CacheErrors:                    line    6:                                                                                              E712: Argument of extend() must be a List or Dictionary                                                 
E706: Variable type mismatch for: b:syntastic_loclist    

any suggestion ?

Syntastic not working for me

I have cloned the git repo to my bundle directory and added the lines to my status. But when I save nothing to seems to happen even when I type garbage in. I have my interpretors installed, both ruby and php. but none seem to work. Is there any way for me to debug the problem?

Problems with input and paths in tex documents

I'm using the following in my latex documents:

\newcommand{\home}{../../../styles}

%% style
\input{\home/style_bill.tex}

and syntastic is complaining that it Could not open "\home/style_bill.tex". I set the path correctly and my documents are compiling. Is this a bug or to I have to configure my .vimrc to get rid of this message.

Matthias Guenther

Unknown function: syntastic#HighlightErrors

vim is compiled without +balloon_eval, so syntastic#HighlightErrors (in autoload/syntastic.vim) will never be defined. But in some syntax checkers syntastic#HighlightErrors is called directly, without any protection.

Issue with HAML checker

Given HAML checker and source code below with invalid syntax (in this code '#' part should be on first line), syntax checker produce E474 error and make it vim start behaving weird and impossible to work without restarting. I have tested and there are same result on OSX and Ubuntu.

=link_to(
  '#',
  'link',
  :class => "a")

versions:
VIM - Vi IMproved 7.3
Haml/Sass 3.0.24 (Classy Cassidy)

Consistent use of highlighting

I noticed that SpellBad highlighting has been implemented, and standardized, for several languages, but not all of them. It should be made consistent, but there should also be an option to disable it -- I'm currently using the signs support because highlighting is not used in the Javascript checker, and I like it actually, I'll probably stick with it for awhile (ideally with the cursor-following messages of #46, though). But in a Python file, for instance, currently I see both signs and highlighting and it's overly noisy.

[Bug] Undefined variable b:syntastic_loclist

When trying to open a ruby file I am getting the following error:

Error detected while processing function <SNR>56_UpdateErrors:
line 11:
E121: Undefined variable: b:syntastic_loclist

Macvim jslint issue?

Hi,

Syntastic came installed as part of janus (https://github.com/carlhuda/janus), and at this stage i've basically tried everything I can think of to get it working.

Here is the .vimrc.local file:
https://gist.github.com/1205877

The janus vimrc file is:
https://github.com/carlhuda/janus/blob/master/vimrc

I also have jslint installed

$which jslint
/usr/local/bin/jslint

Not sure if this helps, but:
:echo SyntaxCheckers_javascript_GetLocList()

returns []

Does this mean that somehow jslint is not being picked up?

bash/sh checking fails

Running :Errors on bash and sh scripts fail with the following message.

Error detected while processing function <SNR>14_ShowLocList:
line    3:
E776: No location list

fix ruby symbols syntax

Ruby symbols can be written in two ways:

tradicional: :symbol => 'value'
second way: symbol: 'value'

The secound way throws an error.

Bye

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.