syntax-checking

How to write a linter?

In my day job I, and others on my team write a lot of hardware models in Verilog-AMS, a language supported primarily by commercial vendors and a few opensource simulator projects. One thing that would make supporting each others code more helpful would be a LINTER that would check our code for common problems and assist with enforcing a...

Testing Powershell scripts for correctness

Hi, Is their anyway to test the correctness of a powershell script without executing it. I know you could do something similar in unix, but can't find the equiv for powershell. Essentially what I have is a script repository, where each script is tied to rule. If a rule fires, the script executes, but I need to be sure the script is v...

How can I add a project specific @INC module-path to Komodo without breaking syntax checking?

For a Perl porting project I am using ActiveState's Komodo IDE 5.1 For external reasons, the xyz.pm modules reside in a different directory tree. By adding a PERL5LIB=<> under the "environemt" tab of the debu/run dialog, I can show Komodo/Perl how to run the script. Unfortunately the syntax checking doesn't seem to evaluate those direc...

Syntax Checking or "Compiling" a Ruby on Rails Application

Hello, I'm new to Ruby and recently ran into an issue comparing to values when creating a Ruby on Rails application. In a controller I had the following statement that always returned false: if (user.id != params[:id]) The problem was the user.id (which is an Active Record) is an integer and params[:id] is a string. It took me a wh...

Is it possible to check PHP file syntax from PHP?

I load dynamically PHP class files with autoload. And those files could be missing or corrupted by some reason. Autoload will successfully report missing files so application logic could handle that. But if those files are corrupted, then the whole processing halts with blank screen for the user and "PHP Parse error: syntax error" in er...

JavaScript syntax checking and compression

Do you know a good syntax checker and compressor for JavaScript? We are currently using JSLINT as syntax checker and YUI for compression. Note we are using the library ExtJS for UI. ...

Removing null warnings in Splint

I have been trying out Splint with a C program I recently wrote and trying to understand and remove the warnings it gives. One I understand but can't understand how to remove it comes from the following code snippet: static MyType_t *findById(const int id) { int i; for (i = 0; i < MY_ARR_SIZE; i++) { if (my_arr[i].i...

PHP Sanity Check

I am looking for applications or methods for performing sanity checks of php code. I hope to to avoid finding out about the coding mistakes the hard way, but instead find them before publishing the website. display_errors = on and similar run-time methods find the problems too late. So far I have found the following ways, which I think...

Does anyone know of a syntax checker for classic ASP ?

As part of my my web development system I have written a text editor witch (among other formats like CSS and HTML) has got ASP syntax highlighting. Does anyone know of an ASP syntax checker program of (preferably) DLL that I could call from within this editor, so that I could present my users with a list of errors (like I already do wit...

quotes issue (ruby)

any idea how I can pass correct argument to xpath? There must be something about how to use single/double quotes. When I use variable parser_xpath_identificator = "'//table/tbody[@id=\"threadbits_forum_251\"]/tr'" gives me an incorrect value or parser_xpath_identificator = "'//table/tbody[@id="threadbits_forum_251"]/tr'" gives me an ...

How can I disable "HTML Checking" in NetBeans?

I'm using NetBean's Compile on Save setting, and it's really handy when I'm editing a single file. But when I'm dealing with a pair of (or more) class files and am switching between the files, I have a problem: The Task tab is nearly worthless since it is littered by HTML "error" messages(+) from many dozens of HTML files in the projec...

Why aren't both versions of this code failing the -c Perl check?

The new method of Parse::RecDescent has this prototype: sub new ($$$) { # code goes here } and if I create an object like this: my $parser = Parse::RecDescent->new($grammar); it will create a parser, and the method will receive 2 parameters "Parse::RecDescent" and $grammar, right? If I try to create an object like: Parse::RecDe...

Javascript syntax check in eclipse

I am developing a RIA application w/ javascript in Eclipse. How can enable Javascript syntax checks in eclipse? ...

Need Lex and Yacc program which does C syntax-checking

Anybody knows from where I can download a Lex and Yacc program(the source code) for complete syntax checking of a C program? Pls post the link as comment ...

How do I check SQLite3 syntax?

Is there a way to check the syntax of a SQLite3 script without running it? Basically, I'm looking for the SQLite3 equivalent of ruby -c script.rb, perl -c script.pl, php --syntax-check script.php, etc. I've thought of using explain, but most of the scripts I'd like to check are kept around for reference purposes (and don't necessarily ...

Javascript syntax checking within a JSP file not working

Hi Guys, I'm using eclipse 3.5 with WTP 3.0 to develop a web app using JSP and Javascript etc. Sometimes I need to embed Javascript code directly into a JSP file eg. to use a string out of the resource bundle message. My problem is, that I can not find a way to turn on Javascript syntax checking within a JSP file. Can somebody help me w...

Can't get "Syntastic" vim plugin to work.

I've installed Syntastic plugin in vim. I can't get it to work. I've tried :SyntasticEnable but no luck. SyntasticEnable python in my vimrc doesn't work either (in fact, it doesn't even parse the command, an error is shown when I try to add it to my .vimrc : Not an editor command: SyntasticEnable python). How can I know what's going on?...

Eclipse CDT and ESQL syntax errors

I am using Eclipse CDT (Helios release) to edit the source code of an (old) C application, which also uses ESQL. In this project, by convention, files containing ESQL code have a .sc extension (instead of the default .c) All ESQL sections e.g. starting with EXEC SQL keywords are flagged as “syntax error” (vertical ruler, overview ruler ...

Configure Code Validation in Eclipse Galileo (3.5)?

In Eclipse Ganymede (3.4), you could navigate to: Window > Preferences > Validation ... and enable/disable various Validators. This feature seems to have disappeared in 3.5. Was this feature moved/renamed/refactored? Where can I find it now? I can't find any documentation pointing me to a new location. This is what I'm expecting: ...

cin.get() not working

I wrote this simple program today, but I found that cin.get() refuses to work unless there are 2 of them. Any ideas? #include <iostream> using namespace std; int main(){ int base; while ((base < 2) || (base > 36)){ cout << "Base (2-36):" << endl; cin >> base; } string base_str = "0123456789abc...