110 questions
1
vote
1
answer
199
views
Check syntax of single fortran file
I am working with a large fortran codebase, and am making changes to one file in this. The build system is complex, must be run on a certain non-local computer, and is time consuming. I would like to ...
1
vote
2
answers
530
views
How to safely verify a file contains valid Python syntax in java?
Question
After automatically modifying some Python comments in Java, I would like to verify the file still contains valid Python syntax, how can I do that from Java, without actually running some ...
1
vote
3
answers
114
views
plsql : New function inside an existing package compilation and syntax check
How do I compile a new function created inside a package in plsql, to see syntactical error and so on
1
vote
1
answer
267
views
Is there a way to check correct syntax in nested files in VCS, let them know who is parent? Like in Perl called with require, or with eval?
I started to work with Visual Studio Code, and it's super cool with syntax correction warnings. I used to work 20 years under Linux shell in Vim.
But now I can see too much error related to global ...
1
vote
1
answer
79
views
Does the generic type not apply constraint inside the body of a function?
I'm sure if this is possible, I'm beginner in TypeScript but what I'm trying to do is:
I have the following type;
type Special<C> = {
[Prop in keyof C]: C[Prop] extends Function | string ? C[...
-3
votes
1
answer
417
views
create syntax checker vim plugin for a new Programming language [closed]
I want to create a new vim syntax checker for a new programming language that is not used widely, first i tried to read the code of the follwing plugins neomake, syntastic
, and Ale in order to ...
4
votes
3
answers
7k
views
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 ...
3
votes
2
answers
341
views
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 ...
1
vote
1
answer
248
views
Code to count times to get all heads or all tails is returning only times to get heads
I am pretty happy to say I think I have my first coin flip problem running. I am counting how many times it takes to get all heads or all tails in a trial of 7 flips. In theory it should take around ...
1
vote
0
answers
633
views
Any known way to check assembly files for syntax errors
Im searching for an way to check if any syntax errors are present in a assembly file for arm. My first try were to query all possible instructions of the arch x.
My next attempt was to look for any ...
4
votes
0
answers
354
views
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 ...
1
vote
1
answer
2k
views
Python syntax check in ace editor
What I am trying to develop is a web-environment app which will let user write and syntax check his own python code. To the moment, I have embedded ACE editor to my app using the python mode. My ...
5
votes
2
answers
2k
views
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 ...
1
vote
0
answers
506
views
clang and gcc linters checks syntax wrong
I use ALE vim plugin which lints with clang and gcc by default. If I write program on C and define variable of ssize_t type ALE will marks it as mistake with message "unknown type name 'ssize_t'; did ...
0
votes
1
answer
643
views
XML Editor with syntax check in JavaFX
I'm looking for a way to build a XML editor with JavaFX, which checks the syntax and displays errors and also has syntax highlighting. Does anyone has an idea how to do that? Are there already ...
4
votes
2
answers
3k
views
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 ...
1
vote
1
answer
253
views
Does Visual studio 2017 have syntax checking for C?
I would like to get syntax checking for my .c in Visual Studio 2017, but it seems I only get it if my source file is named source.cpp, not source.c
Is it possible to turn it on?
Thanks!
5
votes
2
answers
4k
views
How to syntax check VHDL in Vivado without complete synthesis
What's the simplest way to syntax-check my VHDL in Vivado without running through a full synthesis?
Sometimes I code many inter-related modules at once, and would like to quickly find naming errors,...
2
votes
3
answers
369
views
Could syntax check for your code be taken as distinct step?
I've had a dispute with some colleges on should I take a syntax check after every code modification as a distinct step or I'd better rely on unit tests to catch possible syntax breakage ... ( of ...
0
votes
1
answer
1k
views
Automatic syntax checking in Vivado doesn't work for testbenches?
When I edit a VHDL testbench (simulation source) in Vivado (project mode), background syntax checking seems to be disabled: Obvious syntax errors like missing semicolons or undefined signals are not ...
2
votes
1
answer
388
views
Visual studio is syntax checking my C# as Visual Basic
I've been testing some c# code in visual studio and when I opened visual studio this morning my project was full of red lines.
Demanding class declarations to be closed with End class
Red lines under ...
0
votes
1
answer
1k
views
How to syntax check a cassandra cql file from command line before executing it?
During development of a cassandra datamodel how do you very quickly do a commandline syntax check before executing the commands using cqlsh to avoid unnecessary troubleshooting? The larger the cql the ...
-1
votes
1
answer
2k
views
Python. How to remove redundant/wrong parentheses in string
For example input string:
s = "fo)o)fus()(bar((em)ro(em))dah((y(XXX)"
As a result I expect:
fus()((em)ro(em))dah(XXX)
It's like result should contain all "healthy" blocks, which has open "(" and ...
46
votes
4
answers
66k
views
How to check TypeScript code for syntax errors from a command line?
I have a code that generates TypeScript classes, and as a build/test step, I would like to check the generated files for syntax correctness.
I have looked at TypeScript compiler options but see no ...
1
vote
1
answer
2k
views
ace editor syntax validation html+javascript
I'm using Ace Editor, and I'm trying to figure out how to get it to live syntax check the HTML markup AND JavaScript code in the editor.
If I set "ace/mode/html" only HTML syntax is checked, so in ...
4
votes
2
answers
893
views
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 ...
0
votes
2
answers
287
views
Python syntax checkers that test edge cases
Are there syntax checkers able to detect broken code based on edge cases. An example:
def run():
for j in [0, 1]:
if j == 0:
yield j
else:
yield None
for i ...
10
votes
3
answers
446
views
Member access call does not compile but static call does
So today I faced interesting problem while trying to build our company solution and I wanted to ask you guys do you know why is this happening. I've been told that it might be from my machine/visual ...
0
votes
0
answers
2k
views
Clang cannot find include directory?
I just moved all my header files to be in the include directory of my project, rather than having both .cpp and .h in the src directory. I'm using YouCompleteMe in vim and now when I open vim, it ...
1
vote
1
answer
2k
views
Does phpMyAdmin have a query syntax check feature? [closed]
Having previously used Microsoft's SQL Management Studio, I often used the query syntax check feature, pretty handy especially in a production environment.
Is there a similar feature in phpMyAdmin ?
...
2
votes
3
answers
6k
views
Check if a string is valid PHP code [duplicate]
I want to do:
$str = "<? echo 'abcd'; ?>";
if (is_valid_php($str)){
echo "{$str} is valid";
} else {
echo "{$str} is not valid PHP code";
}
Is there a simple way to do the is_valid_php ...
0
votes
0
answers
61
views
python script for validating files in eclipse
I have a self defined text editable (datafile) file format (which uses certain python types as dict, tuples, lists etc as well) for providing arguments data to my python scripts. These arguments are ...
1
vote
2
answers
78
views
Syntax Control & Debugging
How can I make syntax control and debugging on makefile?
I used g++ compiler. We can assume that following code our sample makefile.Thanks for your advice.
all: sample1
sample1: deneme.o hello.o
...
7
votes
3
answers
4k
views
How to selectively disable checkers for certain file types when using syntastic in vim?
For example, HTML partial templates are being flagged with tons of errors but they are supposed to be fragments of a complete HTML doc.
3
votes
0
answers
5k
views
How to enable Twig syntax for HTML/PHP files in PhpStorm?
I'm having trouble getting Twig syntax checking and highlighting for *.php and *.tpl* files in PhpStorm? It throws a lot of syntax errors. The HTML and PHP syntax is already getting picked up.
In ...
0
votes
1
answer
228
views
Using php -l to verify syntax - behavior w/ opening tags
I can't seem to find anything on this, and I'm wondering if anyone else has encountered this issue or knows the reason why.
I have some PHP code that I'm trying to verify the syntax of before I save ...
2
votes
0
answers
273
views
How to check open and closing parenthesis sets in MIT-Scheme for Meep
Scheme language is used to build control files for the program, Meep. Almost all my Meep control file errors result from mismatched parenthesis which Meep recognizes after the control file is ...
1
vote
2
answers
2k
views
PHP syntax check on .html files in NetBeans
I am using NetBeans IDE 8.0.1 for my PHP development.
I like the syntax check feature in netbeans. But the problem that I have is that it only works with files that have .php extension .
I am using ...
0
votes
1
answer
91
views
Suitable Scenario to Handle with XText & XTend?
I need to provide and IDE with a syntax checker and validator for a very simple DSL.
The DSL's interpreter already exists so there is no need for another one. The DSL is suitable for xtext & ...
0
votes
3
answers
3k
views
how do i find the index of the first trail whitespace on python
I am writing a function that finds the index of the first trail whitespace of a string, but I am unsure of how to do so, can someone please teach me?
for example "i am here. " there are three ...
1
vote
1
answer
5k
views
how do i check for trail whitespace on python? [duplicate]
I am trying to write a function to check for trail whitespace, but not to remove the spaces. but i have no idea of how to do that. can somebody teach me?
thank you
0
votes
1
answer
113
views
Can FlyCheck be used with Komodo(for Django) for checking syntax on the fly?
I want to use Komodo IDE for building one Django project.I want to use flycheck syntax checker so that it indicates the syntax errors on the fly.If fly-check cannot be integrated with Komodo,is there ...
2
votes
1
answer
1k
views
pylint does not work in emacs
I have emacs24 (installed by homebrew), flycheck (installed by MELPA) and pylint (installed by pip) on my mac, and I have the following code
(add-hook 'after-init-hook #'global-flycheck-mode)
in my ....
1
vote
0
answers
69
views
Can I make Qt Creator not start compiling if there is an error in the syntax?
Qt Creator can locate errors in C++ code through some syntax checking. However it does not stop me from pressing the compile button. Is there any way to configure it to not start compiling if I have ...
3
votes
1
answer
532
views
Difference between stopping after compiling and checking for syntax only
When using gcc or g++, what is the difference between telling GCC to only compile a file and not link (-S), combined with telling it to not produce an output file (-o "nul"):
gcc.exe/g++.exe -S "...
5
votes
1
answer
14k
views
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 ...
15
votes
4
answers
25k
views
Sublime Text 3 - Disable Python Checker warning "indentation contains tabs"
I didn't find an answer to this question on the web, so I'll say it up front; this is NOT a question about SublimeLinter, and I do NOT want to format my python code according to the PEP8 standards.
...
1
vote
1
answer
2k
views
Turn off error checking in MySQL Workbench
Is there a way to turn off syntax / error checking while writing queries in MySQL Workbench? It lags almost constantly as I'm typing (presumably to check syntax, as it informs me of errors), and gets ...
4
votes
4
answers
6k
views
Check a PHP file for syntax errors [duplicate]
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 ...
4
votes
0
answers
72
views
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 ...