Questions tagged [syntax-checking]

Syntax checking is the verification that a program's source code is technically correct according to the rules of that programming language.

110 questions
5
votes
1 answer

PHP Syntax Check in Sublime Text Editor

In Gedit, I can add an External Tool of "php -l" on the current document, and if I have PHP command line installed, it will syntax check the document. Is there a way to do this with Sublime Text Editor? (Note, I have a Mac and it has PHP CLI…
Volomike
  • 23,743
  • 21
  • 113
  • 209
4
votes
4 answers

syntax-check a VimL script

I have a sizable vim script (a .vim file, in viml syntax). I'd like to check (but not execute!) the file for simple syntax errors. How do I accomplish this? I just want a very rough syntax check. Something along the lines of perl -c or pyflakes.
bukzor
  • 37,539
  • 11
  • 77
  • 111
4
votes
0 answers

Error in Ipython module memory_profiler, %mprun

As you can see, result of the code below is unfair, because it can't be that iterator spent same time as "return" or "if y:". Why is it? How can I fix it? In some tests my code is too heavy so I tried to check "memory-spend" of an each row. def…
4
votes
2 answers

How to re-check an SQL function created with check_function_bodies=false?

Following this answer I learnt that I can disable syntax checking for an SQL function by setting check_function_bodies=false. In my case: Running an upgrade using Flyway where The order of function creation is not well defined Some functions use…
Pyrocks
  • 401
  • 3
  • 14
4
votes
2 answers

Intellij IDEA. Check syntax for files without extension

I have Jenkinsfile it's written in Groovy, but file name doesn't have approprite extension: .groovy. How can I tell IDEA to check groovy syntax of this file? Update: Also I interested in the same question about GoLand IDE
Rudziankoŭ
  • 10,681
  • 20
  • 92
  • 192
4
votes
2 answers

Unreachable Ill-formed if-expression is syntax error in Scheme but not in Common Lisp

I'm trying to get a better understanding of how S-expressions are evaluated in different lisps and wanted to see they would handle interesting ill-formed expressions. I get that Common Lisp and Scheme are totally different languages, but is there a…
Greg Nisbet
  • 6,710
  • 3
  • 25
  • 65
4
votes
3 answers

Alternative to system('php -l')?

In a project I'm currently working for, we're considering putting system() into php.ini's disable_functions declaration. Now, one meta-module of ours which would ultimately also fall victim to this restriction is syntax-checking files with…
pinkgothic
  • 6,081
  • 3
  • 47
  • 72
4
votes
2 answers

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.…
Adrian
  • 6,013
  • 10
  • 47
  • 68
4
votes
4 answers

Check a PHP file for syntax errors

I'm attempting to build an auditing feature into my application that will check for various code quality issues. One of the things I would like to do is check certain PHP files for syntax errors. I was going to use php_check_syntax() but it has…
Steve Robbins
  • 13,672
  • 12
  • 76
  • 124
4
votes
0 answers

Determining type in a functional language

In a small Program users insert multiple typed formulas and wire them together in order to create a system of simultaneous equations. And I'd like to introduce runtime type checking, so as to report an error if dimensions do not match Basical the…
4
votes
2 answers

Get PHP Eclipse to run error checking on different file-types

In my project I have a series of *.tpl files that I would like Eclipse to interpret as PHP code. I have managed to get syntax highlighting to work properly for these files by adding a *.tpl entry in Preferences -> General -> Editors -> Content…
Pryo
  • 690
  • 1
  • 10
  • 24
3
votes
1 answer

Python lining for Online Ace editor

In our web application, we are using the react-ace code editor with language mode python. We are trying to implement python linting in our code editor. Ace editor doesn't have any python linting. So we tried to explore for pylint packages and…
3
votes
1 answer

How to do full syntax check of PowerShell script file using the PowerShell cmdlet

I'm writing a console application to validate the PowerShell script syntax. My request is to validate the PowerShell script without executing the script. I found this below PowerShell command which can perform the syntax check without executing the…
3
votes
2 answers

How to detect nested loop with same index in JavaScript/TypeScript

I am trying to detect nested loop with the same index which looks like this: for(let i = 0; i < 10; i++) { for(let i = 0; i < 10; i++) { } } I have searched Eslint rules but haven't found any solution so far. Is there a way to detect this…
ist
  • 33
  • 4
3
votes
2 answers

PHP Syntax Checking in Notepad++

is there a plugin for notepad++ that allows for files to be run through a compiler for simple syntax checking? such as to catch missing ; or or non-matching brace counts, etc.?
Dexter
  • 3,072
  • 5
  • 31
  • 32