Looking to move to Continuous Delivery? Worried about the quality of your the code? Helping your developers understand clean-code practices and getting the right testing strategy in place can take a while. What should you do to control the quality of the incoming code till then? This talk shares our experience of using PRRiskAdvisor to gradually educate and influence developers to write better code and also help the code reviewer to be more effective at their reviews.
Every time a developer raises a pull-request, PRRiskAdvisor analyzes the files that were changed and publishes a report on the pull request itself with the overall risk associated with this pull request and also risk associated with each file. It also runs static code analysis using SonarQube and publishes the configured violations as comments on the pull request. This way the reviewer just has to look at the pull request to get a decent idea of what it means to review this pull request. If there are too many violations, then PRRiskAdvisor can also automatically reject the pull request.
By doing this, we saw our developers starting paying more attention to clean code practices and hence the overall quality of the incoming code improved, while we worked on putting the right engineering practices and testing strategy in place.
More details: https://confengine.com/last-conference-canberra-2018/proposal/7294/improving-the-quality-of-incoming-code
Conference Link: https://2019.agileindia.org
50. Build/Release Infra
Code a
Feature
Run Static
Analysis
Run Unit &
Component Tests
Run Functional Tests
for my Feature
Local Dev
Raise a PR
Static Analysis
on Change-set
Run All
Unit Tests
Code
Review
C O N T I N U O U S I N T E G R AT I O N
51. Build/Release Infra
Build
Mainline
Run Component &
Sanity Tests on
Instrumented Code
Run Workflow Tests on
Instrumented Code
Code a
Feature
Run Static
Analysis
Run Unit &
Component Tests
Run Functional Tests
for my Feature
Local Dev
Raise a PR
Merge
Static Analysis
on Change-set
Run All
Unit Tests
Code
Review
C O N T I N U O U S I N T E G R AT I O N
52. Build/Release Infra
Build
Mainline
Run Component &
Sanity Tests on
Instrumented Code
Run Workflow Tests on
Instrumented Code
Code a
Feature
Run Static
Analysis
Run Unit &
Component Tests
Run Functional Tests
for my Feature
Local Dev
Raise a PR
Merge
Full
Regression
Full Static
Code Analysis
Benchmark, Perf
Tests & Dynamic
Analysis
Nightly Build
Static Analysis
on Change-set
Run All
Unit Tests
Code
Review
C O N T I N U O U S I N T E G R AT I O N
53. Build/Release Infra
Build
Mainline
Run Component &
Sanity Tests on
Instrumented Code
Run Workflow Tests on
Instrumented Code
Code a
Feature
Run Static
Analysis
Run Unit &
Component Tests
Run Functional Tests
for my Feature
Local Dev
Raise a PR
Consumable
Certified
Artifact
Merge
Full
Regression
Full Static
Code Analysis
Benchmark, Perf
Tests & Dynamic
Analysis
Nightly Build
Static Analysis
on Change-set
Run All
Unit Tests
Code
Review
C O N T I N U O U S I N T E G R AT I O N
54. T H A N K Y O U !
Q U E S T I O N S ?
Naresh Jain
@nashjain
naresh@xnsio.com
https://xnsio.com