Skip to content

Instantly share code, notes, and snippets.

@LenweSaralonde
Created August 28, 2022 10:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LenweSaralonde/13a217b5d7186f9218ae62736e2bff90 to your computer and use it in GitHub Desktop.
Save LenweSaralonde/13a217b5d7186f9218ae62736e2bff90 to your computer and use it in GitHub Desktop.
Luacheck boilerplate for WoW add-ons
max_line_length = false
exclude_files = {
"lib", -- 3rd party libraries
};
ignore = {
-- Ignore global writes/accesses/mutations on anything prefixed with the current add-on name
-- This is the standard prefix for all of our global frame names and mixins.
"11./^MyAddonName",
-- Ignore unused self function argument.
-- This would popup for Mixins and Objects.
"212/self",
-- Ignore unused event function argument.
-- This would popup for event handlers.
"212/event",
};
globals = {
"MyAddonName",
-- Globals
"SLASH_MYADDONNAME1",
"SLASH_MYADDONNAME2",
-- Add-on overrides
ThirdPartyAddOn = {
fields = {
"SomeHookedFunction"
},
},
};
read_globals = {
-- Libraries
"LibStub",
-- 3rd party add-ons
"ThirdPartyAddOn",
};
std = "lua51+wow";
stds.wow = {
-- Globals that we mutate.
globals = {
"SlashCmdList",
},
-- Globals that we access.
read_globals = {
-- Lua function aliases and extensions
"strlower",
"strtrim",
"strsplit",
"strjoin",
"min",
"max",
"floor",
"ceil",
-- Global Functions
"Mixin",
"GetAddOnMetadata",
"GetLocale",
-- Global Mixins and UI Objects
GameTooltip = {
fields = {
"SetOwner",
"AddLine",
"Show",
"Hide",
}
},
"UIParent",
"Minimap",
-- Global Constants
"WOW_PROJECT_ID",
"LE_EXPANSION_LEVEL_CURRENT",
"NORMAL_FONT_COLOR",
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment