mirror of
https://github.com/super-linter/super-linter.git
synced 2025-03-12 09:19:30 -04:00
feat: composer install with any php linters (#6599)
Some checks are pending
Publish Images / Build and Test (push) Waiting to run
Publish Images / Release (push) Blocked by required conditions
Build and Test / Set build metadata (push) Waiting to run
Build and Test / Build and Test (push) Blocked by required conditions
Build and Test / Test the Super-linter GitHub Action (push) Blocked by required conditions
Build and Test / Build test suite matrix (push) Waiting to run
Build and Test / Run test cases (push) Blocked by required conditions
Build and Test / Check if all the tests passed (push) Blocked by required conditions
Build and Test / preview-release-notes (push) Waiting to run
Lint commit / commitlint (push) Waiting to run
Some checks are pending
Publish Images / Build and Test (push) Waiting to run
Publish Images / Release (push) Blocked by required conditions
Build and Test / Set build metadata (push) Waiting to run
Build and Test / Build and Test (push) Blocked by required conditions
Build and Test / Test the Super-linter GitHub Action (push) Blocked by required conditions
Build and Test / Build test suite matrix (push) Waiting to run
Build and Test / Run test cases (push) Blocked by required conditions
Build and Test / Check if all the tests passed (push) Blocked by required conditions
Build and Test / preview-release-notes (push) Waiting to run
Lint commit / commitlint (push) Waiting to run
Install dependencies with Composer when any PHP linter is enabled and there are files to lint with that linter, not just when Psalm is enabled. Close #6336 Close #6598 Close #6597
This commit is contained in:
parent
b354da5267
commit
9f7f83bca5
2 changed files with 7 additions and 3 deletions
|
@ -33,7 +33,7 @@ Notes:
|
||||||
- If the default branch for your repository doesn't match the default, you can
|
- If the default branch for your repository doesn't match the default, you can
|
||||||
use the `DEFAULT_BRANCH` variable to set the default branch. For more
|
use the `DEFAULT_BRANCH` variable to set the default branch. For more
|
||||||
information about the default value of the `DEFAULT_BRANCH` variable, see the
|
information about the default value of the `DEFAULT_BRANCH` variable, see the
|
||||||
[README](../README.md).
|
[Readme](../README.md).
|
||||||
- You can add as many configuration options as needed. Configuration options are
|
- You can add as many configuration options as needed. Configuration options are
|
||||||
documented in the [readme](../README.md#configure-super-linter).
|
documented in the [readme](../README.md#configure-super-linter).
|
||||||
|
|
||||||
|
|
|
@ -293,9 +293,13 @@ function RunAdditionalInstalls() {
|
||||||
##################################
|
##################################
|
||||||
# Run installs for Psalm and PHP #
|
# Run installs for Psalm and PHP #
|
||||||
##################################
|
##################################
|
||||||
if [ "${VALIDATE_PHP_PSALM}" == "true" ] && [ -e "${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PHP_PSALM" ]; then
|
if [[ ("${VALIDATE_PHP:-"${VALIDATE_PHP_BUILTIN}"}" == "true" && -e "${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PHP_BUILTIN") ]] ||
|
||||||
|
[[ ("${VALIDATE_PHP_BUILTIN}" == "true" && -e "${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PHP_BUILTIN") ]] ||
|
||||||
|
[[ ("${VALIDATE_PHP_PHPCS}" == "true" && -e "${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PHP_PHPCS") ]] ||
|
||||||
|
[[ ("${VALIDATE_PHP_PHPSTAN}" == "true" && -e "${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PHP_PHPSTAN") ]] ||
|
||||||
|
[[ ("${VALIDATE_PHP_PSALM}" == "true" && -e "${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PHP_PSALM") ]]; then
|
||||||
# found PHP files and were validating it, need to composer install
|
# found PHP files and were validating it, need to composer install
|
||||||
info "Found PHP files to validate, and VALIDATE_PHP_PSALM is set to ${VALIDATE_PHP_PSALM}. Check if we need to run composer install"
|
info "Found PHP files to validate. Check if we need to run composer install"
|
||||||
mapfile -t COMPOSER_FILE_ARRAY < <(find "${GITHUB_WORKSPACE}" -name composer.json 2>&1)
|
mapfile -t COMPOSER_FILE_ARRAY < <(find "${GITHUB_WORKSPACE}" -name composer.json 2>&1)
|
||||||
debug "COMPOSER_FILE_ARRAY contents: ${COMPOSER_FILE_ARRAY[*]}"
|
debug "COMPOSER_FILE_ARRAY contents: ${COMPOSER_FILE_ARRAY[*]}"
|
||||||
if [ "${#COMPOSER_FILE_ARRAY[@]}" -ne 0 ]; then
|
if [ "${#COMPOSER_FILE_ARRAY[@]}" -ne 0 ]; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue