SUPER STRICT for LUA

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
ivan
Party member
Posts: 1939
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: SUPER STRICT for LUA

Post by ivan »

Good news, everybody!
Super Strict can now detect duplicate values and arguments:

Code: Select all

for b, b in pairs(t) do
  -- duplicate lvariable 'b'
end
c, c = 1, 2 -- duplicate variable 'c'
function (d, d)
  -- duplicate argument 'd'
end
Due to the way that metatables work this new check will not trigger errors when using the dot operator (for example: a = {} a.b, a.b = 1, 2)
User avatar
ivan
Party member
Posts: 1939
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: SUPER STRICT for LUA

Post by ivan »

Super Strict now provides a reusable workflow that allows you to validate all new commits pushed to your GitHub repository. First, make sure that GitHub Actions are enabled for your repository. Create a file in your repository titled ".github/workflows/validate.yml" and paste the following code:

Code: Select all

name: Lua Validation
on: [workflow_dispatch,push]
jobs:
  lua-validation:
    uses: 2dengine/sstrict.lua/.github/workflows/validate.yml@main
    with:
      lua-version: "5.1"
You may need to change the "lua-version" input depending on your environment (for example, LuaJIT uses 5.1) Lastly, go to the "Actions" tab of your repository to confirm that your code has passed the validation successfully. You can also trigger the validation manually by clicking the "Run Workflow" button.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 4 guests