AZ-400 · Question #26
AZ-400 Question #26: Real Exam Question with Answer & Explanation
The correct answer is D: In a Maven build task, select Run PMD.. PMD is a source code analyzer. It finds common programming flaws like unused variables, empty catch blocks, unnecessary object creation, and so forth. There is an Apache Maven PMD Plugin which allows you to automatically run the PMD code analysis tool on your project's source cod
Question
During a code review, you discover many quality issues. Many modules contain unused variables and empty catch blocks. You need to recommend a solution to improve the quality of the code. What should you recommend?
Options
- AIn a Gradle build task, select Run Checkstyle.
- BIn an Xcode build task, select Use xcpretty from Advanced
- CIn a Grunt build task, select Enabled from Control Options.
- DIn a Maven build task, select Run PMD.
Explanation
PMD is a source code analyzer. It finds common programming flaws like unused variables, empty catch blocks, unnecessary object creation, and so forth. There is an Apache Maven PMD Plugin which allows you to automatically run the PMD code analysis tool on your project's source code and generate a site report with its results. https://pmd.github.io/
Community Discussion
No community discussion yet for this question.