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
15 changes: 15 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"permissions": {
"deny": [
"Bash(git push:*)",
"Bash(git commit:*)",
"Bash(git add:*)",
"Bash(git submodule update:*)",
"Bash(gh:*)",
"Edit(~/.github/addons/refs/**)"
],
"additionalDirectories": [
"../refs"
]
}
}
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto eol=lf
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
38 changes: 38 additions & 0 deletions .github/workflows/interface.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Interface

on:
schedule:
- cron: '0 6 1 * *'
workflow_dispatch:

jobs:
bump:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v7

- name: Update TOC
uses: p3lim/toc-interface-updater@v4
with:
depth: '1' # only Filger.toc, not submodule TOCs
# written in this order, unsorted: keep it matching Filger.toc
flavor: |
vanilla
tbc
wrath
mists
retail
forever

- name: Create PR
uses: peter-evans/create-pull-request@v8
with:
branch: toc-bump
delete-branch: true
commit-message: 'toc: update interface'
title: 'toc: update interface'
body: Live client versions changed. Test in-game before merging.
27 changes: 27 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Lint

on:
push:
branches: [master]
paths: ['**.lua', '**.xml', '*.toc', '.luacheckrc', '.github/workflows/lint.yml']
pull_request:
paths: ['**.lua', '**.xml', '*.toc', '.luacheckrc', '.github/workflows/lint.yml']

jobs:
check:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: recursive # TOC lists files inside submodules
token: ${{ secrets.SUBMODULES_TOKEN }} # libs/CallbackHandler-1.0 is private
persist-credentials: false

- name: Luacheck
uses: lunarmodules/luacheck@v1

- name: TOC check
uses: lua-wow/toc-check@v1
59 changes: 24 additions & 35 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,24 @@
name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_FILE: "Filger.zip"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.GH_PAT }}

- name: Build
run: make zip FILENAME=${{ env.RELEASE_FILE }}

- name: Create Release
run: |
gh release create \
--repo ${{ github.repository }} \
--title ${{ github.ref_name }} \
--generate-notes \
${{ github.ref_name }}

- name: Upload Zip File
run: |
gh release upload \
--clobber "${{ github.ref_name }}" \
--repo ${{ github.repository }} \
${{ env.RELEASE_FILE }}
name: Release

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: recursive
token: ${{ secrets.SUBMODULES_TOKEN }} # libs/CallbackHandler-1.0 is private
persist-credentials: false

- name: Package
uses: lua-wow/packager@v1
with:
check-version: true
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# IDE
.vscode/
.idea/
*.iml

# Files
docs/issues/
79 changes: 79 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
std = 'lua51'

quiet = 1 -- suppress report output for files without warnings

unused_secondaries = false -- e.g. local name, _, itemLevel = GetItemInfo(...)

-- see https://luacheck.readthedocs.io/en/stable/warnings.html#list-of-warnings
-- and https://luacheck.readthedocs.io/en/stable/cli.html#patterns
exclude_files = {
'.claude/**',
'docs/**',
'core/development.lua', -- dev-only helpers
'libs/**', -- submodules
}

ignore = {
'212', -- unused argument (callback signatures)
'213', -- unused loop variable
'431', -- shadowing an upvalue
'432/self', -- shadowing upvalue argument self (nested methods)
'611', -- line contains only whitespace
'612', -- line contains trailing whitespace
'614', -- trailing whitespace in comment
'631', -- line is too long
}

-- data files keep the full expansion ladder for authoring entries
files['data/shared/blacklist.lua'] = { ignore = { '211/LE_EXPANSION_.*' } }
files['data/shared/cooldowns.lua'] = { ignore = { '211/LE_EXPANSION_.*' } }

-- globals Filger is allowed to set or mutate
globals = {
-- slash commands
'SLASH_FILGER1',
'SlashCmdList',
}

read_globals = {
string = {fields = {'split'}},
table = {fields = {'wipe'}},

-- namespaces
'C_AddOns',
'C_Container',
'C_Item',
'C_Spell',
'C_SpellBook',
'C_UnitAuras',

-- constants
'WOW_PROJECT_BURNING_CRUSADE_CLASSIC',
'WOW_PROJECT_CAMELOT',
'WOW_PROJECT_CATACLYSM_CLASSIC',
'WOW_PROJECT_CLASSIC',
'WOW_PROJECT_ID',
'WOW_PROJECT_MAINLINE',
'WOW_PROJECT_MISTS_CLASSIC',
'WOW_PROJECT_WRATH_CLASSIC',

-- API and FrameXML
'AuraUtil',
'CreateColor',
'CreateFrame',
'Display_DisplayModeDropDown',
'EnumerateFrames',
'GameTooltip',
'GetBuildInfo',
'GetCVar',
'GetPhysicalScreenSize',
'GetTime',
'LibStub',
'Mixin',
'UIParent',
'UnitCanAssist',
'UnitCanAttack',
'UnitClass',
'UnitGUID',
'UnitName',
}
22 changes: 20 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Support for Midnight (12.0) secret values: restricted auras are looked up by listed spell ids, secret cooldowns use duration objects
- Support for Classic Forever, TBC Anniversary and Titan WotLK clients
- Spells for Mists of Pandaria Classic
- CI: luacheck lint, interface version bump, packager release

### Changed

- patch 5.5.0
- Added spells for Mists of Pandaria Classic
- Single `Filger.toc` for every client; removed `Filger_Classic.toc` and `Filger_Mists.toc`
- Spell data split into per-client `data/` folders, loaded through the TOC `[Game]` variable
- Replaced deprecated item/spell globals with `C_Item`, `C_Container`, `C_SpellBook` and `C_Spell`
- Debuff colors from `AuraUtil`
- Updated libraries (LibStub, CallbackHandler-1.0, LibDispel)

### Removed

- Cataclysm Classic from the TOC

### Fixed

- luacheck warnings, leaked `numVisible` and `itemType` globals

## [5.2.1] - 2025-03-08

Expand Down
73 changes: 73 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# CLAUDE.md

`Filger` is a World of Warcraft addon: a minimal buff/debuff tracker.
It is minimal both in-game and in source. The same addon directory is copied unchanged into
every client's `Interface` folder and must look and behave the same everywhere.

**Status:** being revived after a long break. Expect code broken by changed/removed Blizzard
APIs and by secret values. Don't assume existing code is correct.

## Philosophy

**No configuration.** No options UI, slash-command configuration (`/filger` is help/dev only),
profiles, per-character or per-client settings, and no SavedVariables added just to make
something configurable. Decisions are made in code and constants (`config.lua`, `data/`).
The declared SavedVariable (`FilgerData`) is currently unused. If a feature genuinely needs new persistent state, explain
why before adding it.

**Minimalism.** No frameworks, abstractions, compatibility layers, helper systems or
dependencies unless they solve a real problem. 30 understandable lines beat a 300-line
generic system.

**Efficiency.** Prefer "detect change → update only what changed" over "event → reapply
everything". Avoid repeated updates, repeated calls to the same API, unnecessary loops,
tables/closures in hot paths, redundant event registrations and reapplying the same style.
Don't micro-optimize ordinary code, but treat repeated work as a design problem.

**Style.** Lua 5.1 / WoW runtime. Small focused functions, locals, minimal shared mutable
state, no new globals, calculation separated from side effects where practical. Use the
prototype style where it is already used. This is a preference: WoW's API and the existing
architecture win when they conflict.

## Changing code

- Preserve existing behavior and visual design unless it is broken or the API makes it impossible.
- Smallest correct change. No unrelated refactors, reformatting or modernization.
- For API compatibility problems: identify the failing API/event/frame behavior → find every
Filger usage → verify current behavior on each affected client → fix → check other
usages of the same changed API.

## Compatibility

- One `Filger.toc` serves every client; never add `Filger_*.toc`. Client-specific files are
tagged per line with `[AllowLoadGameType ...]`.
- Never assume an API exists on every client, or that Retail and Classic behave the same.
- Never guess about secret/restricted values: check the target client's generated Blizzard
API docs before using a result in logic. If unsure, say so.
- Never invent an API. Mark anything you can't verify as "unverified".
- Supported clients, TOC rules, libraries, runtime client checks, secret values: [docs/compatibility.md](docs/compatibility.md).

## References

- Blizzard `wow-ui-source` (local clone in `../refs`, read-only) is the API authority. Use
targeted searches, not broad exploration. Map: [docs/reference-repositories.md](docs/reference-repositories.md).

## Git & GitHub

I review and test changes in-game, then group them into commits myself.

- Read freely: git status/diff/log/show/blame, branches, worktrees, submodule status;
`gh` issues, PRs and repo info.
- Edit files in the working tree and leave changes uncommitted.
- Never mutate the repository or its history unless I explicitly ask: no commit, add, push,
pull, fetch, merge, rebase, checkout/switch, reset, restore, stash, cherry-pick, tag,
or submodule pointer changes. A finished task is not permission to commit.
- Don't create, edit or comment on GitHub issues/PRs unless I explicitly ask.
- Issue workflow: read the issue → inspect code → propose a plan → implement → leave uncommitted.
- Never add `Co-authored by Claude Code` on commits, PRs or issues.

## Verifying

- After Lua changes, run `mise exec -- make check` (luacheck) and report the result.
- Claude can't run the game. Tell me what to verify in-game (`/reload`) and on which clients;
I'll paste Lua errors back.
Loading
Loading