Jump to content

Recommended Posts

sqflint.png Lint
Summary
Extension for Visual Studio Code, that does some syntax error checking, variable existence checking and more.
( It's now completely separated from sqflint CLI tool, with many other features, so I decided to make separate thread for it. )
 
Homepage: http://sqflint.zipek.cz/
VSCode Market: https://marketplace.visualstudio.com/items?itemName=skacekachna.sqflint
Github: https://github.com/SkaceKamen/vscode-sqflint
 
NOTE: Works best with SQF Language extension
 

Changelog

You can find changelog at here.

 

Features

  • Syntax error checking
  • Checks existence for variables (global and local)
  • Go to definition and Find usages for variables
  • Displays help (hover help and signature help) for BIS/CBA functions and commands
  • Autocomplete for BIS/CBA functions, commands and unit/ui events
  • Debugger (RPT file monitor)

 

Screenshots

Syntax errors:
 
sqflint-error.png
 
Hover support:
 
sqflint-hover.png
 
Signature help:
 
sqflint-signature.png
 
 
Autocomplete for commands and BIS functions (including basic description)
 
sqflint-autocomplete.png
 
Events
 
sqflint-events-autocomplete.png
 
sqflint-events-hover.png

 

Debugger

 

sqflint-debugger.png

 

  • Like 4
  • Thanks 1

Share this post


Link to post
Share on other sites

Looking good so far SkaceKachna!

Will throw my Blitzkrieg game mode against it and see how your parser fares so far. :)

For the "debugger" a regex based filter would be very handy. Especially with some kind of simple sharing system between people.

Share this post


Link to post
Share on other sites

Looking good so far SkaceKachna!

Will throw my Blitzkrieg game mode against it and see how your parser fares so far. :)

For the "debugger" a regex based filter would be very handy. Especially with some kind of simple sharing system between people.

 

That's good idea, I don't know how to do this (current VSCode UI currently has no input for it), but I'll try.

  • Like 1

Share this post


Link to post
Share on other sites

just released new version, here is list of changes since last time I posted on this forum

Version 0.7.8

  • Added basic coloring for ext/hpp files
  • Added code completion for description.ext
  • Hovering over variable will now display its definiton(s)
  • Update hover format to match default vscode style
  • Fixed hover documentation for some BIS functions
  • Added basic description.ext parser, which will try to parse cfgFunctions and load user defined functions (this actually took a lot of effort)
  • Workspace indexing optimization, SQFLint can now parse multiple files in one process, which greatly incerases performance (this means we have language server behind language server, which is sad)

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

I've recently moved to VSC and this has already saved my arse more than once 🙂

 

A question, perhaps more to follow

 

It's highlighting global and public variables with a green underline. I assume this means the extension giving a warning?

Share this post


Link to post
Share on other sites
On 4/22/2019 at 10:23 AM, Tankbuster said:

It's highlighting global and public variables with a green underline. I assume this means the extension giving a warning?

Possibly undefined variable. So yes, a warning.

It also shows that when you hover over it.

 

Code_2019-04-23_11-12-07.png

Share this post


Link to post
Share on other sites

That's what I thought. The variable is defined in other scripts so this is a false positive and there is a lot of them.

Share this post


Link to post
Share on other sites

@SkaceKachna - Can we get the command list updated to 1.90 please?

Share this post


Link to post
Share on other sites

@Tankbuster you might wanna open your mission/addon as folder in the editor, then all files in that folder will be automatically indexed

 

I'm sorry everyone, I'm very busy with my life right now and can barely keep up, hopefully I will have some time to update the extension soon.

  • Like 3

Share this post


Link to post
Share on other sites
17 minutes ago, SkaceKachna said:

@Tankbuster you might wanna open your mission/addon as folder in the editor, then all files in that folder will be automatically indexed

 

I'm sorry everyone, I'm very busy with my life right now and can barely keep up, hopefully I will have some time to update the extension soon.

I open the mission folder root using VSC, but I notice it's showing all my functions as undefined, as well as all my global and public variables.

It is working in other respects - my version control is full of commits where I've written the comment "missing semicolon/bracket found by SQFLint" 🙂

  • Haha 1

Share this post


Link to post
Share on other sites

@Tankbuster Maybe the functions definitions are using too much macros, the parser of cfgFunctions is currently pretty dumb.

 

Just released new version:

 

Version 0.9.8

  • Added new functions and operators
  • Fixed parser getting stuck in infinite loop under certain conditions (#49) (thanks billw2012)

 

There's some more features I'd like to add in future, unfortunately, I don't really have much free time anymore 😢

  • Thanks 3

Share this post


Link to post
Share on other sites

Thank you. I'll install it this evening.

  • Like 1

Share this post


Link to post
Share on other sites
8 hours ago, SkaceKachna said:

@Tankbuster Maybe the functions definitions are using too much macros, the parser of cfgFunctions is currently pretty dumb.

 

Just released new version:

 

Version 0.9.8

  • Added new functions and operators
  • Fixed parser getting stuck in infinite loop under certain conditions (#49) (thanks billw2012)

 

There's some more features I'd like to add in future, unfortunately, I don't really have much free time anymore 😢

Thanks mate! Do you have PayPal? Want to throw some money your way, for beer or hookers. Whichever you prefer... 🤣😋

  • Like 1

Share this post


Link to post
Share on other sites

Sorry everyone for the previous release, there were some critical bugs in it (it was long time since I last time worker on the extension)

 

Version 0.9.9

  • Workspace indexing now displays status in statusbar
  • Workspace indexing no longer displays undefined warnings on first pass
  • Fixed autocompletion not working
  • Fixed description.ext parser
  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×