-
Notifications
You must be signed in to change notification settings - Fork 2
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
AI Fixer #58
base: trunk
Are you sure you want to change the base?
AI Fixer #58
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.
Awesome work on this @Luc45! I love the inclusion of an example plugin within the tests, too. This is great. Other than some minor suggested wording tweaks, I'm happy to add my approval to this. We just have a merge conflict that needs to be cleaned up as well before we can merge in.
PHP code or recommend non-existent functions. | ||
|
||
It is crucial for every suggested fix to be carefully reviewed and tested by | ||
a professional developer. Although this tool aims to ease the task of making |
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.
Minor wording tweak suggestion:
a professional developer. Although this tool aims to ease the task of making | |
a developer on your team. Although this tool aims to ease the task of making |
code secure, it is not a substitute for professional code review and should be | ||
used as a helper tool. | ||
|
||
We strongly encourage you to provide feedback about the suggestions. Your |
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 we can add something here to guide them on how to provide the feedback, something even simple like having them open a new issue:
We strongly encourage you to provide feedback about the suggestions. Your | |
We strongly encourage you to provide feedback about the suggestions by opening a new issue. Your |
|
||
if ( stripos( $file_in_json, '/ci/plugins/' ) ) { | ||
/* | ||
* PHPCS sends a path like this: |
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.
Thank you for adding these great comments in this section, this is super helpful.
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.
Tested and works like a charm! Thank you awesome work here @Luc45!
Just noticed we have a merge conflict on this PR, but otherwise I think we should be good to merge this one in whenever you're ready @Luc45 |
@zhongruige I'm holding a bit to merge this PR for the AI models to mature a bit, as requested. |
This PR adds the capability of automatically applying AI Recommendations of a test run to code.
This aims to make it easier for developers to apply the AI Recommendations without having to copy and paste much code manually. The modified files can then be reviewed by the developer, commited, and go through code review on a regular PR process. It just changes applies the AI Recommendations to the local files on a developer machine.
Usage:
qit run:security foo
qit fix 123456 /tmp/my-plugin
This will apply the AI Recommendations of Test Run ID 123456 to the plugin at that directory.
Currently, the Fixer usage is restricted behind a dev flag and requires Proxy authentication.
It should be made generally available in the future.