Quantcast WoWDevelopment Sublime Package - Page 3 - WoWInterface
Thread Tools Display Modes
08-02-17, 04:03 AM   #41
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,215
Originally Posted by Kkthnx View Post
I am not sure if this has been discussed before though I read through the 2 pages here and didn't see anything about it. Is it at all possible to set this so when we run something like this it will quit highlighting/reporting a global?

For example

Lua Code:
  1. if (not KkthnxUIConfig) then
  2.     print(L["KkthnxUI config not found!"])
  3.     return
  4. end

Obviously, it is going to call KkthnxUIConfig and print

Now want I am wanting to happen is if I were to call this up at the top of my file like so it will quit highlighting/reporting them so in theory s I know I have covered them.

Lua Code:
  1. local print = print

of even in that case as I handle it

Lua Code:
  1. local _G = _G
  2.  
  3. local print = _G.print

Code:
-- Global variables that we don't need to cache, list them here
-- GLOBALS: KkthnxUIConfig
Once we declare them here it will stop reporting them to us. If my post makes no sense I apologize as it is 4:26 am as of writing this.
It should work the way that you described, if you upvalue something than it should no longer report it as a global, that's the whole point of the global finder. Did you set up your SublimeLinter properly?

I think you might have the default luacheker set as a linter for SublimeLinter instead of my special globalfinder linter script:

Go to Tools -> SublimeLinter -> Toggle Linter then enable globalfinder and disable luacheck.

I might forgot to include this step from the how to set up the linter. :P

Last edited by Resike : 08-02-17 at 04:24 AM.
  Reply With Quote
08-02-17, 04:22 AM   #42
Kkthnx
A Cobalt Mageweaver
 
Kkthnx's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2011
Posts: 235
Originally Posted by Resike View Post
It should work the way that you described, if you upvalue something than it should no longer report it as a global, that's the whole point of the global finder. Did you set up your SublimeLinter properly?
As far as I am aware I did. Stil new at it as I switched directly from Atom. I'll post some screenshots and see if you notice something that is off.

Okay, guess it works. Reset everything to default.

Now, how do we handle it if we do not wanna cache a global? In Atom with "mikk's FindGlobals script" linter we could just run -- GLOBALS: GLOBANAME and it would stop reporting it.
__________________
Success isn't what you've done compared to others. Success is what you've done compared to what you were made to do.

Last edited by Kkthnx : 08-02-17 at 04:32 AM.
  Reply With Quote
08-02-17, 06:05 AM   #43
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,215
Originally Posted by Kkthnx View Post
As far as I am aware I did. Stil new at it as I switched directly from Atom. I'll post some screenshots and see if you notice something that is off.

Okay, guess it works. Reset everything to default.

Now, how do we handle it if we do not wanna cache a global? In Atom with "mikk's FindGlobals script" linter we could just run -- GLOBALS: GLOBANAME and it would stop reporting it.
Currently you can't ignore globals. I'll look into that how can you do this, with lua-check with my script and SublimeLinter.
  Reply With Quote
08-02-17, 06:14 AM   #44
Kkthnx
A Cobalt Mageweaver
 
Kkthnx's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2011
Posts: 235
Originally Posted by Resike View Post
Currently you can't ignore globals. I'll look into that how can you do this, with lua-check with my script and SublimeLinter.
Thank you!
__________________
Success isn't what you've done compared to others. Success is what you've done compared to what you were made to do.
  Reply With Quote
08-02-17, 07:13 AM   #45
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,215
Originally Posted by Kkthnx View Post
Thank you!
Add this line just like with the mik's script with no commas:

Lua Code:
  1. -- luacheck: globals math string

This will ignore math and string globals.
  Reply With Quote
09-02-17, 06:53 AM   #46
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,215
Pushed a full update for 7.3.0.
  Reply With Quote

WoWInterface » Developer Discussions » Dev Tools » WoWDevelopment Sublime Package

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off