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

std = "lua51"
max_line_length = false
codes = true

-- Globals DEFINED by this addon
globals = {
    "VamoosesCompanion",
    "VC",
    "VC_DB",
    "VC_QuoteDB",
    "VC_CompanionProfiles",

    -- Slash commands
    "SLASH_VC1",
    "SLASH_VC2",
    "SlashCmdList",
}

-- Globals READ by this addon (WoW API + third-party)
read_globals = {
    -- WoW C_* namespaced APIs
    "C_AddOns",
    "C_Item",
    "C_Map",
    "C_QuestLog",
    "C_Secrets",
    "C_Timer",

    -- Midnight secret values (12.0+)
    "issecretvalue",
    "canaccesstable",

    -- Modern scroll (WowScrollBoxList)
    "CreateDataProvider",
    "CreateScrollBoxListLinearView",
    "ScrollUtil",

    -- Frame creation & UI
    "CreateFrame",
    "CreateVector3D",
    "CreateColor",
    "UIParent",
    "GameTooltip",
    "BackdropTemplateMixin",
    "UISpecialFrames",

    -- Animation
    "UIFrameFadeIn",
    "UIFrameFadeOut",

    -- Chat
    "DEFAULT_CHAT_FRAME",

    -- Unit/Player APIs
    "UnitName",
    "GetAchievementInfo",
    "GetRealZoneText",
    "GetMoney",
    "GetTime",
    "InCombatLockdown",

    -- Formatting & fonts
    "STANDARD_TEXT_FONT",
    "GameFontNormal",
    "GameFontNormalSmall",
    "GameFontNormalLarge",
    "GameFontHighlightLarge",

    -- WoW Lua extensions
    "wipe",
    "tinsert",
    "tremove",
    "format",
    "time",
    "date",

    -- Shared scheme constants
    "VAMOOSE_SchemeConstants",

    -- Third-party (optional)
    "LibStub",
}

-- Exclude large data files
exclude_files = {
    "Data/VC_QuoteDB_*.lua",
}

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

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