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 5
  • 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

for some reason the dropdown doesn't recognize the variables...with sqf language extension installed v2.0.3
4Eg1Fqp.png

 

Share this post


Link to post
Share on other sites

Author hasn't been here for nearly a year. I fear this excellent project might be dead

Share this post


Link to post
Share on other sites

he is still on github

Share this post


Link to post
Share on other sites

Yes, and he's actually active there. There is hope then. 🙂

Share this post


Link to post
Share on other sites

A bit sad you had to do this, but it's understandable, I don't really have a free time to work on this anymore. Damn the real life!

  • Like 2

Share this post


Link to post
Share on other sites
1 hour ago, SkaceKachna said:

A bit sad you had to do this, but it's understandable, I don't really have a free time to work on this anymore. Damn the real life!

Think of it this way; He recognised the immense value of your work and in tribute to you and it, he is continuing the project.

  • Like 1

Share this post


Link to post
Share on other sites

I'm glad @Senfo is helping to improve this project, I'm sad that I can't do it myself or help him 🙂

  • Like 2
  • Thanks 1

Share this post


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

I'm glad @Senfo is helping to improve this project, I'm sad that I can't do it myself or help him 🙂

I didnt mean to offend you by doing this by any means, quite the opposite actually.
In my opinion this is the "go to" tool for VSCode for any SQF/ArmA needs.

You did a great job developing this tool!

And I am glad you gave everyone the opportunity to to use it and improve it.

I hope I will be a good maintainer 🙂

Share this post


Link to post
Share on other sites

Alright, first real patch done.

SQFLint 0.12.0

- Fixed preproc parsing error for if(n)def, endif, else and undef
- Added some debug logs

- Improved status message

- Increased indexing speed

- Minor fixes and changes

 

Github

https://github.com/RZSenfo/vscode-sqflint

MS Store

https://marketplace.visualstudio.com/items?itemName=senfo.sqflint 

  • Like 1

Share this post


Link to post
Share on other sites

Maybe senfo could just get write access to the original repo and marketplace item and take over as maintainer? instead of having to keep a seperate fork?

Would make it easier, no more "duplicate" things in marketplace, no duplicate places to report issues or make pull requests.

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

×