SkaceKachna 52 Posted September 20, 2016 LintSummarySQFLint is command line tool, that checks specified files for syntax errors. It can output those errors in human readable format, or JSON for some futher processing. Homepage: http://sqflint.zipek.cz/ Releases: https://github.com/SkaceKamen/sqflint/releasesGithub: https://github.com/SkaceKamen/sqflint (extension moved to separate thread) Changelog You can find changelog at releases page Features Syntax error checking Undefined variable warnings Exports some info about file for futher processing by external tools 7 Share this post Link to post Share on other sites
K-Town 128 Posted September 20, 2016 Cool to see someone else attempting SQF syntax checking. Trust me. You don't know what you are getting yourself into. :P I've already spotted numerous errors in your grammar file; most of the errors are with how you read commands: if, then, exitWith, etc. You should not treat them like outlier keywords/commands because they behave like other commands. Read the italic header in this page. If you have any questions, I'll be here to help you out. I've been working on my grammar file since December 2015 and it still isn't perfect.......... 1 Share this post Link to post Share on other sites
SkaceKachna 52 Posted September 20, 2016 Any help is appreciated. I've been trying to create usable parser for SQF some time too, this is my latest attempt which tries to do it the simplest way. No binary / unary commands checking, just some very basic stuff. Well, control structures are commands, but the point of the grammar is to search for user made errors, not compile it. As long as any input acceptable in game is accepted in grammar and any input not accepted in game is not accepted in grammar everything should be all right :). If you know about some usage of those control structures, which is valid and won't be correctly parsed, please tell me. 1 Share this post Link to post Share on other sites
.kju 3244 Posted September 20, 2016 nice to see another one to attempt controlling the beast :) i've made T_D aware of your work; maybe he still has something useful from his attempt or other advice make sure to look also into Squint; maybe SBSMac is even open to share his source or parts of it finally see you (guys) doing this Share this post Link to post Share on other sites
t_d 47 Posted September 21, 2016 I can recommend this grammar description which is pretty accurate: http://foxhound.international/arma-3-sqf-grammar.html. It just misses some special operator precedences like atan2 but this is just needed for a more semantic check 3 Share this post Link to post Share on other sites
SkaceKachna 52 Posted September 21, 2016 Thanks for the article, my grammar source is pretty much the same (you can find it here) only with exception of having control structures defined explicitily. I'm wondering if there is any use to saving the [if/switch/while/for] type to variable... EDIT: While reading it, I noticed some problems in my grammar file. Will probably update it when I'm done with preprocessor. 2 Share this post Link to post Share on other sites
Guest Posted September 23, 2016 Release frontpaged on the Armaholic homepage. SQFLint v0.5 Share this post Link to post Share on other sites
SkaceKachna 52 Posted November 26, 2016 (moved extension to separate thread) New release, v0.6.0, mainly fixing the parser: Updated way code is parsed, enabling more complex analytics Added option to check paths used in execVM ( -cp, -r ) Added option to treat warnings as errors Added option to exit with ERR(1), when error is encountered Variable declaration is now correctly recognized in params and for Blocks not ending with semicolon are now correctly accepted Fixed string quotes not being handled properly Fixed token errors not being handled properly and leaking to stderr Fixed JSON flag being ignored in some cases You can find release packages at github. 1 Share this post Link to post Share on other sites
Guest Posted November 26, 2016 New version frontpaged on the Armaholic homepage. SQFLint v0.6 Share this post Link to post Share on other sites
Armitxes 36 Posted December 26, 2016 Really nice work, this could become a big thing :) Recommended your extension in my thread / website. Share this post Link to post Share on other sites
Senfo 28 Posted December 30, 2016 I am using this daily, great stuff! Just a suggestion: Add the returnvalue possibility for the switch/if cases Share this post Link to post Share on other sites
mindstorm 8 Posted February 7, 2017 By far on of the most potential plugins. Love using this on a daily base. Also eager for next release :). Share this post Link to post Share on other sites
Tankbuster 1746 Posted May 19, 2019 @SkaceKachna, I'm still getting loads of 'Possibly undefined variable' yellow warnings on variables defined in a global variables file earlier. All my own functions too - it's not getting stuff out of CfgFunctions. Finding the red warnings is brilliant and it's a valuable tool because it's very reliable at getting these. I was wondering; in the documentation, you say it works best with Armitxes SQF support extension and I use a different one, the Vladislav Sazonovs extension. Is it likely this is what is causing these yellow warnings? Share this post Link to post Share on other sites