mirror of
https://github.com/ACF-Team/CFW.git
synced 2025-03-04 03:03:16 -05:00
Add linter
This commit is contained in:
parent
657993c026
commit
8d17b0dbdd
17
.github/workflows/glualint.yml
vendored
Normal file
17
.github/workflows/glualint.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
name: GLuaLint
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'lua/**'
|
||||||
|
- '!lua/entities/gmod_wire_expression2/**'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'lua/**'
|
||||||
|
- '!lua/entities/gmod_wire_expression2/**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Lint:
|
||||||
|
uses: FPtje/GLuaFixer/.github/workflows/glualint.yml@master
|
||||||
|
with:
|
||||||
|
config: "./.glualint.json"
|
@ -12,9 +12,9 @@ jobs:
|
|||||||
- uses: CFC-Servers/gmod-upload@master
|
- uses: CFC-Servers/gmod-upload@master
|
||||||
with:
|
with:
|
||||||
id: 3154971187
|
id: 3154971187
|
||||||
changelog: "Deployment via Github to latest changes"
|
changelog: "${{ github.event.head_commit.message }}"
|
||||||
title: "Contraption Framework"
|
title: "Contraption Framework"
|
||||||
type: "ServerContent"
|
type: "tool"
|
||||||
tag1: "build"
|
tag1: "build"
|
||||||
env:
|
env:
|
||||||
STEAM_USERNAME: ${{ secrets.ACF_STEAM_ACCOUNT }}
|
STEAM_USERNAME: ${{ secrets.ACF_STEAM_ACCOUNT }}
|
33
.glualint.json
Normal file
33
.glualint.json
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
"lint_maxScopeDepth": 10,
|
||||||
|
"lint_syntaxErrors": true,
|
||||||
|
"lint_syntaxInconsistencies": true,
|
||||||
|
"lint_deprecated": true,
|
||||||
|
"lint_trailingWhitespace": true,
|
||||||
|
"lint_whitespaceStyle": true,
|
||||||
|
"lint_beginnerMistakes": true,
|
||||||
|
"lint_emptyBlocks": true,
|
||||||
|
"lint_shadowing": false,
|
||||||
|
"lint_gotos": true,
|
||||||
|
"lint_doubleNegations": true,
|
||||||
|
"lint_redundantIfStatements": true,
|
||||||
|
"lint_redundantParentheses": true,
|
||||||
|
"lint_duplicateTableKeys": true,
|
||||||
|
"lint_profanity": true,
|
||||||
|
"lint_unusedVars": true,
|
||||||
|
"lint_unusedParameters": true,
|
||||||
|
"lint_unusedLoopVars": true,
|
||||||
|
"lint_ignoreFiles": ["lua/entities/gmod_wire_expression2/core/custom/*.lua"],
|
||||||
|
|
||||||
|
"prettyprint_spaceAfterParens": false,
|
||||||
|
"prettyprint_spaceAfterBrackets": false,
|
||||||
|
"prettyprint_spaceAfterBraces": false,
|
||||||
|
"prettyprint_spaceAfterLabel": false,
|
||||||
|
"prettyprint_spaceBeforeComma": false,
|
||||||
|
"prettyprint_spaceAfterComma": true,
|
||||||
|
"prettyprint_semicolons": false,
|
||||||
|
"prettyprint_cStyle": false,
|
||||||
|
"prettyprint_rejectInvalidCode": false,
|
||||||
|
"prettyprint_indentation": "\t",
|
||||||
|
"log_format": "auto"
|
||||||
|
}
|
@ -4,7 +4,7 @@ local function floodFill(source, sinkIndex)
|
|||||||
local open = source:GetLinks()
|
local open = source:GetLinks()
|
||||||
|
|
||||||
while next(open) do
|
while next(open) do
|
||||||
local entIndex, entLink = next(open)
|
local entIndex = next(open) -- entIndex, entLink
|
||||||
|
|
||||||
open[entIndex] = nil
|
open[entIndex] = nil
|
||||||
closed[entIndex] = true
|
closed[entIndex] = true
|
||||||
@ -13,7 +13,7 @@ local function floodFill(source, sinkIndex)
|
|||||||
|
|
||||||
if entIndex == sinkIndex then return true, closed end
|
if entIndex == sinkIndex then return true, closed end
|
||||||
|
|
||||||
for neighborIndex, neighborLink in pairs(Entity(entIndex)._links) do
|
for neighborIndex, _ in pairs(Entity(entIndex)._links) do -- neighborIndex, neighborLink
|
||||||
if not closed[neighborIndex] then
|
if not closed[neighborIndex] then
|
||||||
open[neighborIndex] = true
|
open[neighborIndex] = true
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user