From 20ce3ed27feb1b36c721377959b1386cb8527ebd Mon Sep 17 00:00:00 2001 From: NoM0Re Date: Thu, 20 Feb 2025 12:25:51 +0100 Subject: [PATCH] fix workflow/issue templates --- .github/ISSUE_TEMPLATE/bug_report.yml | 1 - .github/workflows/lint.yml | 5 ++++- .luacheckrc | 28 +++++++++++++++++++++++++-- WeakAuras/LibGroupTalentsWrapper.lua | 3 +-- WeakAurasOptions/Changelog.lua | 8 +------- 5 files changed, 32 insertions(+), 13 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index ba3b426..1b41eaf 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,7 +1,6 @@ name: "Bug Report" description: Create a report to help us improve labels: ['🐛 Bug'] -type: Bug body: - type: checkboxes attributes: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6e60235..cb8c310 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,6 +5,9 @@ on: paths: - '.github/workflows/**.yml' - '**.lua' + pull_request: + paths: + - '**.lua' jobs: lint: @@ -60,4 +63,4 @@ jobs: rm -rf $GITHUB_WORKSPACE/luarocks-${{ env.LUAROCKS_VERSION }} - name: Luacheck - run: .luarocks/bin/luacheck . -q + run: .luarocks/bin/luacheck . diff --git a/.luacheckrc b/.luacheckrc index ae10dff..07ba718 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -1,12 +1,15 @@ std = "lua51" max_line_length = false exclude_files = { - "babelfish.lua", "WeakAuras_Main.lua", "WeakAuras_Options.lua", "WeakAuras_Templates.lua", "WeakAuras/Libs/", - ".luacheckrc" + "WeakAurasOptions/Libs/", + "WeakAuras/Locales", + "WeakAurasOptions/Locales", + ".luacheckrc", + ".luarocks", } ignore = { "11./SLASH_.*", -- Setting an undefined (Slash handler) global variable @@ -27,6 +30,7 @@ ignore = { "542", -- An empty if branch "581", -- error-prone operator orders "582", -- error-prone operator orders + "512", -- loop is executed at most once (Retail function) } globals = { "_G", @@ -19545,4 +19549,24 @@ globals = { "ZOOM_OUT", "ZOOM_OUT_BUTTON_TEXT", "_RECORDING_WARNING_CORRUPTED", + + "GetNumPartyMembers", "GetNumRaidMembers", "noop", "tInvert", "DeltaLerp", + "GetNumEquipmentSets", "GetEquipmentSetInfo", "CR_HASTE_MELEE", "CR_HASTE_RANGED", + "CR_CRIT_TAKEN_MELEE", "CR_CRIT_TAKEN_RANGED", "CR_CRIT_TAKEN_SPELL", + "BNGetNumFriendToons", "BNGetFriendToonInfo", "KuiNameplates", "TidyPlatesThreat", + "UnitIsPartyLeader", "EasyMenu", "SELECTED_CHAT_FRAME", "handler", "InterfaceOptions_AddCategory", + "PanelTemplates_SetDisabledTabState", "PanelTemplates_SelectTab", "PanelTemplates_DeselectTab", + "PanelTemplates_TabResize", "GameFontNormalSmall", "ColorPickerFrame", "OpacitySliderFrame", + "AceGUIEditBoxInsertLink", "AceGUIMultiLineEditBoxInsertLink", + "ObjectPoolMixin", "FramePoolMixin", "FramePool_Hide", "FramePool_HideAndClearAnchors", + "TexturePoolMixin", "TexturePool_Hide", "TexturePool_HideAndClearAnchors", "CreateTexturePool", + "FontStringPoolMixin", "FontStringPool_Hide", "FontStringPool_HideAndClearAnchors", + "CreateFontStringPool", "ActorPoolMixin", "ActorPool_Hide", "ActorPool_HideAndClearModel", + "CreateActorPool", "FramePoolCollectionMixin", "CreateFramePoolCollection", + "FixedSizeFramePoolCollectionMixin", "CreateFixedSizeFramePoolCollection", + "WA_MaximizeMinimizeButtonFrame_Mixin", "WA_PortraitFrameTemplate_Mixin", + "WA_UpdateNineSliceBorders", "SecondsToMinutes", "MinutesToSeconds", "HasTimePassed", + "SecondsFormatterConstants", "ConvertSecondsToUnits", "SecondsToClock", + "MinutesToTime", "FormatShortDate", "NUMBER_ABBREVIATION_DATA", "WeakAurasProfilingReportTitleText", + "WeakAurasRealTimeProfiling", "WeakAurasRealTimeProfilingTitleText", "seconds" } diff --git a/WeakAuras/LibGroupTalentsWrapper.lua b/WeakAuras/LibGroupTalentsWrapper.lua index e9f8366..4ae20b3 100644 --- a/WeakAuras/LibGroupTalentsWrapper.lua +++ b/WeakAuras/LibGroupTalentsWrapper.lua @@ -2,14 +2,13 @@ if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... -local LibGroupTalents = LibStub:GetLibrary("LibGroupTalents-1.0", true) local subscribers = {} Private.LibGroupTalentsWrapper = { Register = function(f) end, } -if LibGroupTalents then +if WeakAuras.LGT and WeakAuras.LGT.RegisterCallback then function Private.LibGroupTalentsWrapper.CallbackHandler(_, _, _, unit) if unit then for _, f in ipairs(subscribers) do diff --git a/WeakAurasOptions/Changelog.lua b/WeakAurasOptions/Changelog.lua index 8419ff3..6b05d25 100644 --- a/WeakAurasOptions/Changelog.lua +++ b/WeakAurasOptions/Changelog.lua @@ -1,14 +1,8 @@ if not WeakAuras.IsLibsOK() then return end ----@type string + local AddonName = ... ----@class OptionsPrivate local OptionsPrivate = select(2, ...) -if not WeakAuras.IsLibsOK() then return end ----@type string -local AddonName = ... ----@class OptionsPrivate -local OptionsPrivate = select(2, ...) OptionsPrivate.changelog = { versionString = '5.19.1', dateString = '2025-01-30',