Skip to content

Commit

Permalink
Add .luarc.json and migrate globals check (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
emmericp authored May 16, 2024
1 parent bd05a5c commit ab02eb3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 54 deletions.
56 changes: 2 additions & 54 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---@diagnostic disable: lowercase-global
std = "lua51"
max_line_length = false
exclude_files = {
".luacheckrc"
}
ignore = {
"1..", -- Everything related to globals, the LuaLS check is better
"211", -- Unused local variable
"211/L", -- Unused local variable "L"
"211/CL", -- Unused local variable "CL"
Expand All @@ -14,57 +16,3 @@ ignore = {
"431", -- shadowing upvalue
"542", -- An empty if branch
}
globals = {
-- DBM
"DBM",
"DBM_CORE_L",
"DBM_COMMON_L",

-- Lua
"bit.band",
"table.wipe",
"string.split",

-- WoW
"ALTERNATE_POWER_INDEX",
"COMBATLOG_OBJECT_REACTION_HOSTILE",
"GUILD_INTEREST_RP",
"LOCALIZED_CLASS_NAMES_MALE",
"RAID_CLASS_COLORS",

"C_LFGInfo.GetDungeonInfo",
"C_Scenario.GetInfo",
"C_UIWidgetManager.GetIconAndTextWidgetVisualizationInfo",
"Ambiguate",
"EJ_GetCreatureInfo",
"CheckInteractDistance",
"GetCVar",
"C_LFGInfo.GetDungeonInfo",
"GetLocale",
"GetPartyAssignment",
"GetRaidRosterInfo",
"GetTime",
"GetWorldStateUIInfo",
"InCombatLockdown",
"SendChatMessage",
"SetCVar",
"SetRaidTarget",
"UnitCastingInfo",
"UnitClass",
"UnitDetailedThreatSituation",
"UnitExists",
"UnitFactionGroup",
"UnitGroupRolesAssigned",
"UnitGUID",
"UnitHealth",
"UnitHealthMax",
"UnitInRaid",
"UnitIsDead",
"UnitIsDeadOrGhost",
"UnitIsFriend",
"UnitIsUnit",
"UnitName",
"UnitPosition",
"UnitPower",
"UnitPowerMax",
}
14 changes: 14 additions & 0 deletions .luarc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"runtime.version": "Lua 5.1",
"diagnostics.disable": [
"empty-block",
"invisible",
"deprecated",
"duplicate-doc-field"
],
"diagnostics.globals": [
"ALTERNATE_POWER_INDEX",
"GUILD_INTEREST_RP"
]
}

0 comments on commit ab02eb3

Please sign in to comment.