forked from oxsecurity/megalinter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for issue oxsecurity#3963 (oxsecurity#3974)
* fix for issue oxsecurity#3963 * regression with others linters than php_cs_fixer came from this chunk of code (removed) * extract code to enable or disable apply fixes feature * restore test file for risky rule in initial state * add note about PHP-PHPCSFIXER apply fixes * update CHANGELOG for oxsecurity#3963 --------- Co-authored-by: Nicolas Vuillamy <[email protected]>
- Loading branch information
Showing
6 changed files
with
81 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
ENABLE: | ||
- PHP | ||
DISABLE_LINTERS: | ||
- PHP_PSALM | ||
- PHP_PHPLINT | ||
- PHP_PHPCS | ||
- PHP_PHPSTAN | ||
LOG_LEVEL: debug | ||
PARALLEL: false | ||
UPDATED_SOURCES_REPORTER: true | ||
APPLY_FIXES: PHP_PHPCSFIXER | ||
PHP_PHPCSFIXER_CONFIG_FILE: .php-cs-fixer.risky.php | ||
PHP_PHPCSFIXER_ARGUMENTS: | ||
- "--allow-risky=yes" | ||
- "--diff" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
$finder = (new PhpCsFixer\Finder()) | ||
->in('.') | ||
; | ||
|
||
return (new PhpCsFixer\Config()) | ||
->setRules([ | ||
'@PER-CS' => true, | ||
'@PhpCsFixer:risky' => true, | ||
]) | ||
->setFinder($finder) | ||
; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
|
||
array_push($x, $y); |
This file contains 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
This file contains 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
This file contains 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