chore!: use secure version of godsdev/tools library (#69)
#607
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| ########################### | |
| ########################### | |
| ## Linter GitHub Actions ## | |
| ########################### | |
| ########################### | |
| name: Lint Code Base | |
| # | |
| # Documentation: | |
| # https://help.github.com/en/articles/workflow-syntax-for-github-actions | |
| # | |
| ############################# | |
| # Start the job on all push # | |
| ############################# | |
| on: | |
| push: | |
| branches-ignore: | |
| # notest branches to ignore testing of partial online commits | |
| - "notest/**" | |
| pull_request: | |
| branches-ignore: | |
| # notest branches to ignore testing of partial online commits | |
| - "notest/**" | |
| workflow_call: | |
| permissions: | |
| contents: read | |
| ############### | |
| # Set the Job # | |
| ############### | |
| jobs: | |
| build: | |
| # Name the Job | |
| name: Lint Code Base | |
| # Set the agent to run on | |
| runs-on: ubuntu-latest | |
| # Limit the running time | |
| timeout-minutes: 10 | |
| ################## | |
| # Load all steps # | |
| ################## | |
| steps: | |
| ########################## | |
| # Checkout the code base # | |
| ########################## | |
| - name: Checkout Code | |
| uses: actions/checkout@v6 | |
| with: | |
| # Fetch all history for all branches and tags. Otherwise github.event.pull_request.base.ref SHA isn't found. | |
| fetch-depth: 0 | |
| # git credentials are needed later, `false` would be safer: token not left in git config | |
| persist-credentials: true | |
| ################################ | |
| # Run Linter against code base # | |
| ################################ | |
| - name: Lint Code Base | |
| # fix: uses super-linter:v7.2.1 which doesn't invoke composer | |
| # slim (instead of main) is used for sake of efficiency as these linters are not used in PHP anyway: Rustfmt, Rust Clippy, Azure Resource Manager Template Toolkit (arm-ttk), PSScriptAnalyzer, dotnet (.NET) commands and subcommands. | |
| uses: super-linter/super-linter/slim@v7.2.1 | |
| env: | |
| VALIDATE_ALL_CODEBASE: true | |
| DEFAULT_BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || github.ref_name }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| #JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.yml | |
| VALIDATE_ANSIBLE: false | |
| VALIDATE_CSS: false | |
| # TODO 211017 returns false positive `unknown Webhook event "workflow_call"` | |
| VALIDATE_GITHUB_ACTIONS: false | |
| # TODO 211003 returns false positive: {"line":" <li><a href=\"https://www.linkedin.com/company/MYCMSPROJECTSPECIFIC\" title=\"{=\"MYCMSPROJECTSPECIFIC na LinkedIn\"|translate}\"><i class=\"fa fa-linkedin\" aria-hidden=\"true\"></i></a></li>","lineNumber":56,"offender":"linkedin.com/company/MYCMSPROJECTSPECIFIC","offenderEntropy":-1,"commit":"","repo":"","repoURL":"","leakURL":"","rule":"LinkedIn Secret Key","commitMessage":"","author":"","email":"","file":".","date":"0001-01-01T00:00:00Z","tags":"secret, LinkedIn"} | |
| VALIDATE_GITLEAKS: false | |
| # 240803, there's no way to configure JAVASCRIPT_PRETTIER, neither it shows what exactly an issue is. Just 'Code style issue found in file.', which is useless. | |
| VALIDATE_JAVASCRIPT_PRETTIER: false | |
| #VALIDATE_JAVASCRIPT_STANDARD: false | |
| # TODO VALIDATE_JSCPD later | |
| VALIDATE_JSCPD: false | |
| # PHPStan run in matrix strategy in php-composer-phpunit.yml | |
| VALIDATE_PHP_PHPSTAN: false | |
| VALIDATE_PHP_PSALM: false | |
| # 240519 .shfmt is not taken into account, so far | |
| VALIDATE_SHELL_SHFMT: false |