Skip to content
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

Problem on bigger Pull Request #68

Closed
Schuchie opened this issue Nov 29, 2023 · 3 comments
Closed

Problem on bigger Pull Request #68

Schuchie opened this issue Nov 29, 2023 · 3 comments

Comments

@Schuchie
Copy link

If you change a lot of files in a new Pull Request the following error occurs. This can happen if you add for example datapacks for media cloud etc.. These contain no apex classes, only jsons and xmls. Is there a way to ignore none apex files?

(node:2164) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Performing static code analysis on all of the relevant files...
{
  message: 'spawnSync /bin/sh E2BIG',
  status: null,
  stack: 'Error: spawnSync /bin/sh E2BIG\n' +
    '    at Object.spawnSync (node:internal/child_process:1119:20)\n' +
    '    at spawnSync (node:child_process:847:[24](https://github.com/ValanticDMC/Obi/actions/runs/6954874855/job/18922547072#step:4:25))\n' +
    '    at execSync (node:child_process:927:15)\n' +
    '    at /home/runner/work/_actions/mitchspano/sfdx-scan-pull-request/v0.1.15/dist/index.js:1:13003\n' +
    '    at Generator.next (<anonymous>)\n' +
    '    at /home/runner/work/_actions/mitchspano/sfdx-scan-pull-request/v0.1.15/dist/index.js:1:12738\n' +
    '    at new Promise (<anonymous>)\n' +
    '    at o (/home/runner/work/_actions/mitchspano/sfdx-scan-pull-request/v0.1.15/dist/index.js:1:12485)\n' +
    '    at cli (/home/runner/work/_actions/mitchspano/sfdx-scan-pull-request/v0.1.15/dist/index.js:1:12871)\n' +
    '    at /home/runner/work/_actions/mitchspano/sfdx-scan-pull-request/v0.1.15/dist/index.js:1:13[25](https://github.com/actions/runs/6954874855/job/18922547072#step:4:26)0',
  output: undefined
}
@mitchspano
Copy link
Owner

Currently, There is no support for perform language specific suppression.

How large of a pull request are you creating and which version of the action are you running?

@Schuchie
Copy link
Author

Schuchie commented Dec 1, 2023

@mitchspano

Action Version: mitchspano/sfdx-scan-pull-request@v0.1.15

The PR is huge, caused by the default/standard datapacks from salesforce. You could also add a lot of json files to the staticresource folder, that would result in the same error.

links: https://stackoverflow.com/questions/63796633/spawnsync-bin-sh-enobufs

That could be avoided by using a file with a list of files (--file-list param) instead of adding every file to the command as param (if possible by sfdx scanner:run). Or by piping the files.

@mitchspano
Copy link
Owner

This is a duplicate of known issue #6. I will be marking this as closed and updates will be tracked on the canonical issue.

In the meantime, I would recommend keeping your changes smaller (see this documentation from Google CL is an internal term for Pull Request) and/or limiting the branches on which the scan is executed to keep its scope relatively well defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants