Jump to content
Sign in to follow this  
sbsmac

Squint - the sqf editor and error-checker

Recommended Posts

102 now out - fixes the broken preprocessor view and has much more efficient update of project status when applying filters.

Should also load large projects faster because files are no longer pre-rendered.

Finally, projects are marked as 'dirty' when filters are changed.

In that case, I have one for you: text selection. Do something about it.

Unfortunately yet another brokeness to do with MS and their bl^%dy richtextbox. Apparently there are workarounds which I'm looking at.

Edited by sbsmac

Share this post


Link to post
Share on other sites

With the latest version I get a few errors, so I better drop them here, so that they won't get lost.

-Long files won't get scanned completely. I have multiple files where he stopped scanning somewhere in the document and doesn't report any more errors in it, even if the are present.

-Example code for the lbSize bug:

http://pastebin.jonasscholz.de/993

-Nearly similar for ?ctrlSetText?, maybe the str:

http://pastebin.jonasscholz.de/994

-in a catch-block, _exception is a defined variable:

http://community.bistudio.com/wiki/try

-Use a different fond in warning details to better differ _i from _j

Share this post


Link to post
Share on other sites

Thanks. The limited number of errors is

http://dev-heaven.net/issues/13226

Squint actually scans the whole file, it's just that because the datagridview is so slow, the number copied to the list in limited to 10. Still looking for a good workaround for this.

I've added the lbsize bug at http://dev-heaven.net/issues/13448

Will look at adding the _exception variable

>-Use a different fond in warning details to better differ _i from _j

If you look under settings/editor/other windows, you can change the font (and background colour) used in the warning window and filelist :)

Share this post


Link to post
Share on other sites

Here's something in the nature of mistake-it-didn't-find. :)

I'm doing a config, that has me copying and pasting from several different sources. I ended up duplicating about 3 entries. Is there some way to have it parse each config class and check if there's already been an entry for something?

No big deal - ArmA was happy enough to point it out to me upon starting. ;) 3 times.

Share this post


Link to post
Share on other sites

This is exactly the kind of thing I was hoping people would suggest - I've reached the limits of my imagination for error-checks so ideas from other people are most welcome. Also I don't work a lot with configs so currently squint is particularly light on cpp checking.

>Is there some way to have it parse each config class and check if there's already been an entry for something?

It's already parsing the whole file so yes, it's fairly straightforward to add rules based on structure. Can you post a short example code-fragment showing the error and a brief explanation of where and why it's an error. I'll then look at adding a rule.

Share this post


Link to post
Share on other sites
I've reached the limits of my imagination for error-checks...

Dude. My errors are some of the most imaginative around! :D

Can you post a short example code-fragment showing the error and a brief explanation of where and why it's an error. I'll then look at adding a rule.

Soitenly:

class cfgAmmo
{
class BulletBase;
class JTD_coolNewUberAmmo: BulletBase
{
	simulation = "";
	hit = 1;
	indirectHit = 1;
	indirectHitRange = 1;
	typicalSpeed = 100;
	model = "";
	cartridge = "";
	simulation = "shotShell";
	hit = 3;
	indirectHit = 2;

};
};

See how the last 3 are the same as the first 3? Those duplicate entries will prevent ArmA from starting. In terms of de/concatenation, I think if you take everything in front of the '=' and see if it matches any other entry up to the '=' that would work.

(I'm big on ideas, much shorter in terms of coding.)

Share this post


Link to post
Share on other sites

Dude. My errors are some of the most imaginative around!

(I'm big on ideas, much shorter in terms of coding.)

Excellent, I can see we were made for each other :p I'll take a look at adding this rule shortly.

In the meantime there is another release... 1.0.0.103. It fixes a couple of minor precedence issues and significantly increases the speed of the UI.

On my feeble old laptop (2.2Ghz core duo) I can now load and analyse the 1014 files from Operation ArrowHead's missions.pbo in under 30 seconds - not too shabby and I haven't even optimised the preprocessor or parsers yet.

You should also notice the editing experience is a bit smoother - auto-complete was horribly inefficient and has been reworked to be bit less cpu hungry.

Finally, I managed to introduce some flicker into the code-window in the last release- that should be gone now.

Share this post


Link to post
Share on other sites

If you like to have some inspiration for features:

What about scanning for duplicated code?

Would be a really nice feature on larger codes to reduce the complexity.

Share this post


Link to post
Share on other sites

Interesting idea. What 'scale' do you think is appropriate - codeblock, function, file ? Probably the most sensible way would be to produce a hash of the expression tree (ignoring specific variable names) Will think on this...

Share this post


Link to post
Share on other sites

Editing the .ext file with Squint, it wanted to remove equal sign(s) where there was no text after the equal sign e.g

Text = ;

, I did and got the .ext file bugging OA at the start related to the removed equal signs.:cool:

Squint is faster great improvement.:yay:

In a previous post of mine, you told me about not understandig my question, so I will try again to expalin. When saving a file, then reopening it after the code or txt loose its "order" e.g :

1 txt

// it makes coffee

2 txt

3 txt

File is saved and when I reopen it I got this (happens usually with large files):

1 txt // it makes coffee 2 txt 3 txt

As you see the // remove 2 txt and 3 txt, because at first it was not on a single line. Hope it's clear :rolleyes:

Share this post


Link to post
Share on other sites

When I run setup I keep getting "Not a valid win32 application. I've downloaded the .net you showed and tried three different links. From reading the posts I seem to be the only one who can't run it. Any ideas?

Share this post


Link to post
Share on other sites

Can't install it either. Tried to download the setup with different browsers and PCs to no avail.

Install.log

The following properties have been set:

Property: [AdminUser] = true {boolean}

Property: [installMode] = HomeSite {string}

Property: [ProcessorArchitecture] = AMD64 {string}

Property: [VersionNT] = 6.1.0 {version}

Running checks for package 'Windows Installer 3.1', phase BuildList

The following properties have been set for package 'Windows Installer 3.1':

Running checks for command 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe'

Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsi' and value '3.1': true

Result of checks for command 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe' is 'Bypass'

'Windows Installer 3.1' RunCheck result: No Install Needed

Running checks for package 'Microsoft .NET Framework 4 Client Profile (x86 and x64)', phase BuildList

Reading value 'Version' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Client'

Read string value '4.0.30319'

Setting value '4.0.30319 {string}' for property 'DotNet40Client_TargetVersion'

The following properties have been set for package 'Microsoft .NET Framework 4 Client Profile (x86 and x64)':

Property: [DotNet40Client_TargetVersion] = 4.0.30319 {string}

Running checks for command 'DotNetFX40Client\dotNetFx40_Client_x86_x64.exe'

Result of running operator 'ValueEqualTo' on property 'InstallMode' and value 'HomeSite': true

Result of checks for command 'DotNetFX40Client\dotNetFx40_Client_x86_x64.exe' is 'Bypass'

Running checks for command 'DotNetFX40Client\dotNetFx40_Client_setup.exe'

Result of running operator 'ValueNotEqualTo' on property 'InstallMode' and value 'HomeSite': false

Result of running operator 'VersionGreaterThanOrEqualTo' on property 'DotNet40Client_TargetVersion' and value '4.0.30129': true

Result of checks for command 'DotNetFX40Client\dotNetFx40_Client_setup.exe' is 'Bypass'

'Microsoft .NET Framework 4 Client Profile (x86 and x64)' RunCheck result: No Install Needed

Launching Application.

URLDownloadToCacheFile failed with HRESULT '-2146697208'

Error: An error occurred trying to download 'http://www.armaleague.com/mac/squint/bin/squint.application'.

Share this post


Link to post
Share on other sites

Strange - it might be that armaleague is struggling a bit under the load. People have reported problems in the past (not a valid win32 application seems to be a result of not successfully downloading the setup.exe file) but generally after a few retries things resolve themselves.

There is an alternate link to the setup file at http://dev-heaven.net/attachments/download/7105/setup.exe. Hopefully this will help. If not let me know.

Share this post


Link to post
Share on other sites

Funnily enough I was just looking at fsms yesterday trying to decide whether it was worth the effort to check the embedded sqf ;-)

Share this post


Link to post
Share on other sites

I'll mention this again too, everytime you open a file it warns you have changes before you can close even when no changes have been made, also I just noticed that when I drag a folder into it nothing happens anymore. The latter appears to be selective though as it's working after I closed it and restarted it. Also it still errors on global variables knowing full and well that it can not read global space and it still counts cautions about comparision strings and case as errors. It also errors as missing semi-colon or operator after the word class for some reason, but that may just be .fsms. Does not seem to even add description.ext to the files?

Edited by callihn

Share this post


Link to post
Share on other sites

When trying to install the editor I'm getting a virus warning Heur.Suspicious@105012991 dotNetFx40_client_setup[1].exe seems to be the file in question.

Has anyone else come across this?

Share this post


Link to post
Share on other sites

dotNetFx40_client_setup is the .Net installer rather than being anything particular to squint. Are you downloading .Net from the microsoft site ?

Share this post


Link to post
Share on other sites

I was just letting it install from the squint installer, I let it pass as only one virus checker was reporting a problem. After restarting the PC my other AV started to have a fit, some of the shields had been disabled.

It took a while to sort it out but everything seems ok but I'm currently doing a full scan which will take a while.

Share this post


Link to post
Share on other sites

FWIW you got me worried enough to run a full scan on my machine here with AVG. That has come up clean at least.

Share this post


Link to post
Share on other sites

Nothing has shown up in the full scans I did after installation, I'll keep an eye on things but it was probably a false positive.

---------- Post added at 03:21 PM ---------- Previous post was at 02:48 PM ----------

This will be really useful to check for errors, I'm not sure I can get used to the interface but time will tell.

One problem I'm having right from the get go is that the save filename.sqf As.. isn't working, all it does is overwrite the existing file I don't get the option of changing the name of the file.

Also where is the program located, I've searched for Squint.exe and Mac's Tools but other than finding the Squint save folder and the shortcut nothing else.

Edited by F2k Sel

Share this post


Link to post
Share on other sites
Funnily enough I was just looking at fsms yesterday trying to decide whether it was worth the effort to check the embedded sqf ;-)

Definitely worth the effort.

Share this post


Link to post
Share on other sites

sbsmac, Squint is a great tool at now, but needs single and better features, I'll offer some suggestions:

- Vinculate project file to a mission directory from Arma, is better to organize with project file in mission directory

- Recent files/Projects for fast access

- Better indentation levels using tabs (like Visual Studio Editor or notePad++)

- Block indentation using the key TAB and Shift-TAB

- Better Find Function Editor with protection against acidental text change

- fix the syndrome of the code listing scared: the code lines skips arbitrarily, no explication...

Best Regards!!

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
Sign in to follow this  

×