-- luacheck configuration for VamoosesDyeStudio
-- WoW Lua 5.1 environment with addon-specific globals

std = "lua51"
max_line_length = false
codes = true

-- Globals DEFINED by this addon
globals = {
    "VamoosesDyeStudio",
    "VDS",
    "VDS_DB",
    "VDS_DyePanel",
    "VDS_DyeData",
    "VDS_DyeCraftingDB",
    "HDG_DyePanel",

    -- Addon compartment callbacks (TOC references)
    "VamoosesDyeStudio_OnAddonCompartmentClick",
    "VamoosesDyeStudio_OnAddonCompartmentEnter",
    "VamoosesDyeStudio_OnAddonCompartmentLeave",

    -- Slash commands
    "SLASH_VDSDYES1",
    "SLASH_VDSDYES2",
    "SLASH_VDSDYES3",
    "SlashCmdList",
}

-- Globals READ by this addon (WoW API + third-party)
read_globals = {
    -- WoW C_* namespaced APIs
    "C_AddOns",
    "C_DyeColor",
    "C_HousingCatalog",
    "C_HousingCustomizeMode",
    "C_Item",
    "C_Timer",
    "C_TradeSkillUI",

    -- Frame creation & UI
    "CreateFrame",
    "ScrollUtil",
    "UIParent",
    "GameTooltip",
    "Minimap",
    "BackdropTemplateMixin",
    "UISpecialFrames",
    "HouseEditorFrame",
    "AuctionHouseFrame",
    "DyeSelectionPopout",
    "Item",
    "bit",
    "hooksecurefunc",
    "GetCursorPosition",
    "IsShiftKeyDown",
    "CastSpell",
    "GetProfessionInfo",
    "GetProfessions",

    -- Minimap compat (third-party addons)
    "SexyMapCustomBackdrop",
    "SexyMapSuperTrackerBackground",
    "BasicMinimapSquare",

    -- Formatting & fonts
    "STANDARD_TEXT_FONT",
    "GameFontNormal",
    "GameFontNormalSmall",
    "GameFontHighlightExtraSmall",

    -- Sound
    "PlaySound",
    "SOUNDKIT",

    -- Locale
    "GetLocale",
    "GetMinimapShape",

    -- Popup dialogs
    "StaticPopupDialogs",
    "StaticPopup_Show",

    -- WoW Lua extensions
    "wipe",
    "strtrim",
    "format",

    -- WoW constants
    "Enum",

    -- Shared scheme constants
    "VAMOOSE_SchemeConstants",

    -- Third-party (optional)
    "LibStub",
    "HousingDecorGuide",
    "HDG_DB",
    "Auctionator",
}

-- Allow unused self parameter (common in WoW OnClick/OnScript patterns)
self = false

-- Ignore specific warnings
ignore = {
    "211/addonName",   -- Unused 'addonName' from varargs
    "211/privateDB",   -- Unused 'privateDB' from varargs
    "212/_.*",         -- Unused variables starting with underscore
    "212/self",        -- Unused self (WoW callback pattern)
    "611",             -- Lines with only whitespace
}
