-
Notifications
You must be signed in to change notification settings - Fork 430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add allow-list config option to securitychecker_enlightn #1052
base: v2.x
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ public function provideConfigurableOptions(): iterable | |
[ | ||
'lockfile' => './composer.lock', | ||
'run_always' => false, | ||
'allow-list' => [], | ||
] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you also add test-cases covering this new argument? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Like which cases? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The test cases should cover all options : you currently changed the default test-case, which has an empty allow list. |
||
]; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better to
or is there a specific reason you want to add an optional argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've never heard of
addArgumentArray
, I can't find documentation onaddArgumentArray
anywhere?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In your current code, you are iterating over the allow-list configuration just to add it as an argument;
Inside the
$arguments
(of type\GrumPHP\Collection\ProcessArgumentsCollection
), there is a shortcut methodaddArgumentArray()
that does this for you.This is being used all over the repository to make the tasks easier to read.
You could use it like this: