We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Check my implementation first:
squizlabs/PHP_CodeSniffer@master...itpatrol:master
Comments about code.
This code update after each loop a file and then recollect line numbers changed by last commit and Sniff reports.
It helps to create diff file related only to commit.
Your task is to create command line option to pass commit->id So instead of
if($reportSha = getenv('SHA')) { if(!in_array($line, $this->_process_selected_lines)){ return false; ....
should be something like
$cliValues = $phpcs->cli->getCommandLineValues(); if (isset($cliValues['got-commit-id']) === true) { if(!in_array($line, $this->_process_selected_lines)){ return false;
Next code, probably, need to be replaced on PHP parsing base instead of grep and awk. For multi OS compatibility.
exec('git annotate -lt ' . $this->_file. "|grep -E '" . $reportSha . "|0000000000000000000000000000000000000000' |awk -F $'\t' '{print$4}'|awk -F\) '{print$1}'", $this->_process_selected_lines);
Please add verification if current folder is git repository when --git-commit-id provided. return error if it is not git repo and value provided.
Please make sure that code pass PHPCS code Standard.
The text was updated successfully, but these errors were encountered:
sergeypavlenko
No branches or pull requests
Check my implementation first:
squizlabs/PHP_CodeSniffer@master...itpatrol:master
Comments about code.
This code update after each loop a file and then recollect line numbers changed by last commit and Sniff reports.
It helps to create diff file related only to commit.
Your task is to create command line option to pass commit->id
So instead of
should be something like
Next code, probably, need to be replaced on PHP parsing base instead of grep and awk.
For multi OS compatibility.
Please add verification if current folder is git repository when --git-commit-id provided.
return error if it is not git repo and value provided.
Please make sure that code pass PHPCS code Standard.
The text was updated successfully, but these errors were encountered: