Template for a good new topic, formatted with Markdown:
- ALM used: Bitbucket Cloud,
- CI system used: Bitbucket Cloud
- Scanner command used when applicable (private details masked)
- Languages of the repository: JS
- Potential workaround: Accepted the issues in sonarcloud and rerun the pipeline to bypass the issue.
Following JS code:
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OtpDto {
private String id;
private String userId;
private Integer attempts;
private Integer maxAttempts;
private Integer expiresIn;
Sonarcloud issues page:
We are using bitbucket sonarcloud scan pipe for scanning: pipe: sonarsource/sonarcloud-scan:2.0.0. Pipeline code is as follows:
definitions:
services:
docker:
memory: 4096
type: docker
pipelines:
pull-requests:
'**':
- step: &sonarcloudAnalysis
name: SonarCloud Analysis
services:
- docker
size: 2x
script:
- if [ "${BITBUCKET_PR_DESTINATION_BRANCH}" != "master" ]; then echo "Pipeline is restricted to master branch only"; exit 0; fi
- pipe: sonarsource/sonarcloud-scan:2.0.0
variables:
SONAR_TOKEN: ${SONAR_TOKEN}
EXTRA_ARGS: '-Dsonar.organization=${SONAR_ORG} -Dsonar.projectKey=${PROJECT_KEY} -Dsonar.java.binaries=. -Dsonar.exclusions=dist/,.sonar/,.scannerwork/,node_modules/,.git/,nginx/,src/*/.spec.ts,src/*/.spec.tsx -Dsonar.javascript.node.maxspace=4096 -X'
- pipe: sonarsource/sonarcloud-quality-gate:0.1.6