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

std = "lua51"
max_line_length = false
codes = true

-- Globals DEFINED by this addon
globals = {
    "VamoosesNeighbors",
    "VN_DB",

    -- Addon compartment functions
    "VamoosesNeighbors_OnAddonCompartmentClick",
    "VamoosesNeighbors_OnAddonCompartmentEnter",
    "VamoosesNeighbors_OnAddonCompartmentLeave",

    -- Slash commands
    "SLASH_VN1",
    "SLASH_VN2",
    "SlashCmdList",

    -- Teleport Home button
    "VN_HomeBtn",
}

-- Globals READ by this addon (WoW API + third-party)
read_globals = {
    -- WoW C_* namespaced APIs
    "C_AddOns",
    "C_BattleNet",
    "C_Housing",
    "C_HousingNeighborhood",
    "C_Map",
    "C_NeighborhoodInitiative",
    "C_SuperTrack",
    "C_Timer",
    "Enum",

    -- Map
    "UiMapPoint",

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

    -- Player APIs
    "BNGetNumFriends",
    "GetTime",
    "GetCursorPosition",
    "GetMinimapShape",
    "InCombatLockdown",
    "IsInGuild",
    "IsMouseButtonDown",
    "IsShiftKeyDown",
    "STANDARD_TEXT_FONT",
    "GetLocale",

    -- Club (guild roster)
    "C_Club",

    -- Formatting & fonts
    "GameFontNormal",
    "GameFontNormalSmall",
    "GameFontHighlightSmall",

    -- WoW Lua extensions
    "wipe",
    "time",

    -- Shared scheme constants (defined in VN_SchemeConstants, read in VN_Constants)
    "VAMOOSE_SchemeConstants",

    -- Slider template
    "OptionsSliderTemplate",

    -- Blizzard House Finder (loaded on demand)
    "HouseFinderNeighborhoodButtonMixin",
    "hooksecurefunc",

    -- Map interactions
    "GameTooltip_Hide",
    "IsModifiedClick",
    "ChatEdit_GetActiveWindow",
    "ChatFrameUtil",

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

-- Allow unused self parameter
self = false

-- Ignore specific warnings
ignore = {
    "211/addonName",   -- Unused 'addonName' from varargs
    "211/_.*",         -- Unused locals starting with underscore
    "212/_.*",         -- Unused args starting with underscore
    "212/self",        -- Unused self (WoW callback pattern)
    "231",             -- Variable set but never accessed
    "432",             -- Shadowing upvalue (common in WoW OnScript callbacks)
    "611",             -- Lines with only whitespace
}
