Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Keep Lua formatter output stable across Windows development and Linux CI.
*.lua text eol=lf
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ What actually happened.

## Environment

- **WoW Version**: (e.g., 11.0.5 Retail, Midnight Beta)
- **Interface Version**: (from TOC)
- **Addon Version**: (from ClassyMap.toc)
- **WoW Version / Build / Client**: (actual game version and build, Retail or Beta)
- **Other Addons**: (list any that might interact, or "none")
- **Context**: (in combat, using Edit Mode, switching profiles, or after a reload)

## Lua Errors

Expand Down
13 changes: 8 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,22 @@ Fixes # (issue number, if applicable)

## Testing Done

- [ ] Tested on WoW Retail
- [ ] Tested on Midnight Beta (if available)
List commands/results and the exact client version/build tested. Mark live checks N/A for documentation-only changes, or state what remains unverified.

- [ ] Relevant offline checks from CONTRIBUTING.md pass
- [ ] Tested runtime changes on the client targeted by ClassyMap.toc
- [ ] Addon loads without errors
- [ ] Minimap mask is square
- [ ] `GetMinimapShape()` reports `SQUARE`
- [ ] Border displays correctly and settings update live
- [ ] No Lua errors in combat
- [ ] Settings persist and profile switching/copying/resetting refreshes correctly
- [ ] Combat changes apply after combat without Lua errors

## Checklist

- [ ] My code follows the project's style guidelines
- [ ] I have read [CONTRIBUTING.md](CONTRIBUTING.md)
- [ ] I have read [CONTRIBUTING.md](../CONTRIBUTING.md)
- [ ] I have updated documentation if needed
- [ ] I have tested my changes in-game

## Screenshots

Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Quality

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

jobs:
lua:
name: Lua 5.1, manifest, tests, lint, and format
runs-on: ubuntu-24.04
env:
LUACHECK_VERSION: "0.23.0"
STYLUA_VERSION: "2.3.1"

steps:
- name: Check out repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false

- name: Install Lua tooling
shell: bash
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install --no-install-recommends --yes curl liblua5.1-0-dev lua5.1 luarocks unzip
luarocks --lua-version=5.1 --tree "$RUNNER_TEMP/luarocks" install luacheck "$LUACHECK_VERSION"
echo "$RUNNER_TEMP/luarocks/bin" >> "$GITHUB_PATH"
curl --fail --location --silent --show-error \
--output "$RUNNER_TEMP/stylua.zip" \
"https://github.com/JohnnyMorganz/StyLua/releases/download/v${STYLUA_VERSION}/stylua-linux-x86_64.zip"
unzip -q "$RUNNER_TEMP/stylua.zip" -d "$RUNNER_TEMP/stylua"
chmod +x "$RUNNER_TEMP/stylua/stylua"
echo "$RUNNER_TEMP/stylua" >> "$GITHUB_PATH"

- name: Verify tool versions
run: |
set -euo pipefail
lua5.1 -v
luacheck --version
stylua --version

- name: Run offline regression tests
run: |
set -euo pipefail
lua5.1 tests/run_core.lua
lua5.1 tests/run_core.lua --fencore
lua5.1 tests/runtime_regressions.lua
lua5.1 tests/settings_regressions.lua
lua5.1 tests/ace_integration.lua
lua5.1 tests/mechanic_regressions.lua

- name: Validate manifest, dependencies, and localization
run: python3 tests/check_repo.py --lua lua5.1

- name: Lint first-party Lua
run: luacheck . --config .luacheckrc

- name: Check first-party Lua formatting
shell: bash
run: |
set -euo pipefail
stylua --check --syntax Lua51 \
ClassyMap.lua Settings.lua Mechanic.lua Core/init.lua Locales/*.lua
101 changes: 90 additions & 11 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -1,18 +1,97 @@
-- ClassyMap Luacheck configuration
-- Extends the central configuration
-- ClassyMap Luacheck configuration.
--
-- Use the shared configuration when this repository is checked out beside
-- ADDON_DEV. Keep a small fallback here so a standalone clone can still run
-- Luacheck without requiring the wider development workspace.

local base = dofile("../ADDON_DEV/Linting/.luacheckrc")
local function add_unique(list, value)
for _, existing in ipairs(list) do
if existing == value then
return
end
end
table.insert(list, value)
end

local addon_globals = {
"ClassyMap",
"ClassyMapDB",
"ClassyMapCore",
"ClassyMapMechanic",
"GetMinimapShape",
}

-- WoW frames and APIs referenced by the minimap integration. Keeping this
-- list explicit preserves Luacheck's useful undefined-global warnings.
local addon_read_globals = {
"AddonCompartmentFrame",
"C_AddOns",
"C_Texture",
"C_Timer",
"CreateFrame",
"debugprofilestop",
"ExpansionLandingPage",
"ExpansionLandingPageMinimapButton",
"GameTimeFrame",
"GameTooltip",
"GetTime",
"geterrorhandler",
"hooksecurefunc",
"HybridMinimap",
"InCombatLockdown",
"IsLoggedIn",
"Minimap",
"MinimapCluster",
"MinimapCompassTexture",
"Minimap_Update",
"MinimapZoneText",
"TimeManagerClockButton",
"TimeManagerClockTicker",
"ToggleEncounterJournal",
}

local ok, shared = pcall(dofile, "../ADDON_DEV/Linting/.luacheckrc")
local base = ok and type(shared) == "table" and shared or {
std = "lua51",
max_line_length = false,
codes = true,
quiet = 1,
exclude_files = {
"**/Libs/**",
"**/*_spec.lua",
"tests/**",
".luacheckrc",
},
globals = { "_G", "SlashCmdList" },
read_globals = {
"LibStub",
"wipe",
table = { fields = { "unpack", "wipe" } },
},
ignore = {
"212/self",
"212/_.*",
"631",
},
}

-- Inherit everything from base
std = base.std
max_line_length = base.max_line_length
codes = base.codes
ignore = base.ignore
exclude_files = base.exclude_files
read_globals = base.read_globals
quiet = base.quiet
exclude_files = base.exclude_files or {}
globals = base.globals or {}
read_globals = base.read_globals or {}
ignore = base.ignore or {}

for _, name in ipairs(addon_globals) do
add_unique(globals, name)
end

-- Addon-specific globals
globals = base.globals
table.insert(globals, "ClassyMap")
table.insert(globals, "ClassyMapDB")
for _, name in ipairs(addon_read_globals) do
add_unique(read_globals, name)
end

-- Busted-style specs live beside the pure Core implementation and are not
-- first-party addon runtime code.
add_unique(exclude_files, "**/*_spec.lua")
28 changes: 28 additions & 0 deletions .pkgmeta
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,42 @@ ignore:
- .git
- .github
- .gitignore
- .cursorignore
- .gitattributes
- .luacheckrc
- .markdownlint.json
- .vscode
- AGENTS.md
- CHANGELOG.md
- CONTRIBUTING.md
- LICENSE
- README.md

# Development tests and review notes are not part of the addon package.
- tests
- docs
- Core/core_spec.lua

# FenCore's development-only material is not loaded by FenCore.xml.
- Libs/FenCore/AGENTS.md
- Libs/FenCore/Docs
- Libs/FenCore/PLAN
- Libs/FenCore/Tests
- Libs/FenCore/README.md
- Libs/FenCore/Core/!sandbox_bootstrap.lua
- Libs/FenCore/Core/zz_sandbox_domains.lua
- Libs/FenCore/FenCore.toc

# Libraries retained in the checkout from the original template but not
# referenced by embeds.xml or the addon source.
- Libs/AceHook-3.0
- Libs/LibDataBroker-1.1
- Libs/LibDBIcon-1.0
- Assets/classymap-logo-400.png

# Dependency tracking is for the repository and Mechanic tooling only.
- Libs/libs.json

manual-changelog:
filename: CHANGELOG.md
markup-type: markdown
Expand Down
Loading