FPtje/GLuaFixer

`.glualint.json: withFile: does not exist (No such file or directory)`

Closed this issue · 2 comments

Since last week's recent changes and after running GLuaFixer with GitHub Actions today, I get this error:
image

Below is the workflow file used by GitHub Actions:

name: GLuaFixer

on:
  push:
    paths:
      - "**.lua"
  pull_request:
    paths:
      - "**.lua"

jobs:
  Lint:
    uses: FPtje/GLuaFixer/.github/workflows/glualint.yml@master

And here is the .glualint.json configuration file located at the root of my GitHub repository:

{
    "lint_maxScopeDepth": 10,
    "lint_syntaxErrors": true,
    "lint_syntaxInconsistencies": true,
    "lint_deprecated": false,
    "lint_trailingWhitespace": true,
    "lint_whitespaceStyle": true,
    "lint_beginnerMistakes": true,
    "lint_emptyBlocks": true,
    "lint_shadowing": true,
    "lint_gotos": false,
    "lint_goto_identifier": true,
    "lint_doubleNegations": true,
    "lint_redundantIfStatements": true,
    "lint_redundantParentheses": true,
    "lint_duplicateTableKeys": true,
    "lint_profanity": true,
    "lint_unusedVars": true,
    "lint_unusedParameters": false,
    "lint_unusedLoopVars": true,
    "lint_inconsistentVariableStyle": false,
    "lint_spaceBetweenParens": false,
    "lint_spaceBetweenBrackets": false,
    "lint_spaceBetweenBraces": false,
    "lint_spaceBeforeComma": false,
    "lint_spaceAfterComma": true,
    "lint_maxLineLength": 0,

    "prettyprint_spaceBetweenParens": false,
    "prettyprint_spaceBetweenBrackets": false,
    "prettyprint_spaceBetweenBraces": false,
    "prettyprint_spaceEmptyParens": false,
    "prettyprint_spaceEmptyBrackets": true,
    "prettyprint_spaceAfterLabel": false,
    "prettyprint_spaceBeforeComma": false,
    "prettyprint_spaceAfterComma": true,
    "prettyprint_semicolons": false,
    "prettyprint_cStyle": false,
    "prettyprint_removeRedundantParens": true,
    "prettyprint_minimizeParens": true,
    "prettyprint_assumeOperatorAssociativity": true,
    "prettyprint_rejectInvalidCode": false,
    "prettyprint_indentation": "    ",

    "log_format": "auto"
}

I think this bug is a regression from a recent change, but I was able to fix it by specifying another access path to GLuaFixer. My repository is called Combined-Roleplay-Scripts and the folders at the root are simply addons and not another Combined-Roleplay-Scripts subfolder as indicated by GLuaFixer.

FPtje commented

Thanks for reporting! I think I see what's happening here. In the refactor, I found out out that the --config option was completely ignored. I think the workflow was always broken, but it never actually failed anything until now.

FPtje commented

This is fixed in the latest master, in fd8fae9

This fix should be in effect immediately, so the next time you run the workflow, it should magically start working again.

CC @brandonsturgeon

Some details on the fix:

I reproduced the bug in FPtje/DarkRP#3223. After fixing it in a branch, I checked to make sure that it works both when passing the config, and when not passing the config.