bitbucket-codeinsights-reporter
v0.5.0
Published
[](https://www.npmjs.com/package/bitbucket-codeinsights-reporter) [ Your Bitbucket Server password. Preferentially, create a new HTTP
Access Token under your profile page and use it instead of your password.
--bitbucket-auth-username=<value> (required) Your Bitbucket Server username.
--bitbucket-project-key=<value> (required) The project key where the repository exists.
--bitbucket-repository-slug=<value> (required) The repository slug identifier.
--bitbucket-server-url=<value> (required) Bitbucket server url.
--commit-id=<value> (required) Commit hash where the code insights will be uploaded to in Bitbucket
Server.
--report-file=<value>... (required) The SFCA result JSON file with violations normalized. Accepts multiple
files.
--skip-engine-results=<option>... [default: ] Engines to not parse from the results flag.
<options: pmd|eslint|cpd|retire-js>
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Takes the static code analysis results of SFCA plugin and uploads them to a givem commit in Bitbucket, providing code
reviewers additional insights into the code being reviewed.
SFCA ("Salesforce Code Analyzer") plugin performs static code analysis using popular tools such as PMD, ESLINT,
RETIRE.Js, and more. This SFDX plugin takes the results of this analysis and uploads them to a specified commit in
Bitbucket Server. This allows code reviewers to do a better analysis of the code, gaining valuable insights into the
quality of the code being reviewed.
Note: Please make sure when running the `sfdx scanner:run` to provide the flag `--normalize-severity`, otherwise
reported severities in the code insights may not match to the actual severity level.
EXAMPLES
$ sf bcr codeinsights report \
--bitbucket-server-url "https://bitbucket.my-org-instance.org" \
--bitbucket-auth-username "[email protected]" \
--bitbucket-auth-password "http-access-token-password" \
--bitbucket-project-key "PRJ" \
--bitbucket-repository-slug "my-repo" \
--commit-id "f1eb3eb5710d2396d68987dd571433151714b499" \
--report-file report-output.json \
--skip-engine-results "eslint-lwc" \
--skip-engine-results "retire-js" \