Skip to content

Commit

Permalink
Run luacheck on pushes
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim committed Oct 24, 2022
1 parent ba01089 commit d733a9a
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Lint

on:
- push
- pull_request

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Run luacheck
uses: nebularg/actions-luacheck@v1
with:
annotate: warning
args: --no-color
70 changes: 70 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
std = 'lua51'

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

-- see https://luacheck.readthedocs.io/en/stable/warnings.html#list-of-warnings
-- and https://luacheck.readthedocs.io/en/stable/cli.html#patterns
ignore = {
'212/self', -- unused argument self
'212/event', -- unused argument event
'212/unit', -- unused argument unit
'212/element', -- unused argument element
'312/event', -- unused value of argument event
'312/unit', -- unused value of argument unit
'431', -- shadowing an upvalue
'614', -- trailing whitespace in a comment
'631', -- line is too long
}

exclude_files = {}

globals = {}

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

-- SharedXML objects
'CopyTable', -- SharedXML/TableUtil.lua

-- SharedXML functions
'GetItemInfoFromHyperlink', -- SharedXML/LinkUtil.lua

-- namespaces
'Enum',
'C_Item',
'C_TradeSkillUI',

-- GlobalStrings
'TRADE_SKILLS',

-- enums (old style)
'LE_ITEM_QUALITY_UNCOMMON', -- classic only
'LE_ITEM_QUALITY_EPIC', -- classic only
'LE_EXPANSION_CLASSIC',
'LE_EXPANSION_BURNING_CRUSADE',
'LE_EXPANSION_WRATH_OF_THE_LICH_KING',
'LE_EXPANSION_CATACLYSM',
'LE_EXPANSION_MISTS_OF_PANDARIA',
'LE_EXPANSION_WARLORDS_OF_DRAENOR',
'LE_EXPANSION_LEGION',
'LE_EXPANSION_BATTLE_FOR_AZEROTH',
'LE_EXPANSION_SHADOWLANDS',
'LE_EXPANSION_DRAGONFLIGHT',

-- API
'CreateFrame',
'GetBuildInfo',
'GetItemCount',
'GetItemInfo',
'GetProfessionInfo',
'GetProfessions',
'GetSpellInfo',
'IsSpellKnown',
'UnitLevel',
'GetNumSkillLines', -- classic only
'GetSkillLineInfo', -- classic only
'ExpandSkillHeader', -- classic only

-- exposed from other addons
'LibStub',
}

0 comments on commit d733a9a

Please sign in to comment.