-
Notifications
You must be signed in to change notification settings - Fork 440
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 Progpilot task #507
Add Progpilot task #507
Conversation
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.
Looks good to me
***Composer*** | ||
|
||
``` | ||
composer config minimum-stability dev |
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.
Shouldn't we propose a released version instead?
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.
Unfortunately, progpilot relies on ircmaxell/php-cfg which doesn't currently have a stable version
$resolver = new OptionsResolver(); | ||
$resolver->setDefaults( | ||
[ | ||
'config_file' => '.progpilot/configuration.yml', |
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.
Isn't it better to set this value to null so that the defaults from the cli tool are being used?
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.
Defaults values from the tool are also used when the configuration file specified in the cli doesn't exist so if someone doesn't have a file .progpilot/configuration.yml the defaults values from the tool will be used and if someone has a file .progpilot/configuration.yml but has forgotten to define it in the parameters of the task the values of .progpilot/configuration.yml will be used.
$arguments = $this->processBuilder->createArgumentsForCommand('progpilot'); | ||
|
||
$arguments->addOptionalArgumentWithSeparatedValue('--configuration', $config['config_file']); | ||
$arguments->addFiles($files); |
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.
Maybe better not to specify files during run context?
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.
If I comment the line 67 the commited files are not analyzed by the tool
Sounds reasonable. Thanks for the feedback! |
Add Progpilot task
New Task Checklist:
run()
method readable?run()
method using the configuration correctly?