List of Listings

Chapter 1. An introduction to SonarQube

Listing 1.1. sonar-project.properties

Chapter 3. Ensuring that your code is doing things right

Listing 3.1. JUnit Test class that gives 100% coverage on the isAdult method

Listing 3.2. JUnit test class with no real testing

Chapter 4. Working with duplicate code

Listing 4.1. Order class

Listing 4.2. InternationalOrder class

Listing 4.3. AbstractOrder class

Listing 4.4. Refactored Order class

Listing 4.5. Refactored InternationalOrder class

Chapter 5. Optimizing source code documentation

Listing 5.1. InternationalOrder class

Chapter 6. Keeping your source code files elegant

Listing 6.1. Example of code that is too complex

Listing 6.2. Method that checks how many numbers are divisible by 4

Listing 6.3. Revised method that checks how many numbers are divisible by 4

Listing 6.4. AmericanBreakfast class with LCOM4 > 1

Listing 6.5. Refactored AmericanBreakfast class with LCOM4 = 1

Listing 6.6. Omelet class introduced after refactoring AmericanBreakfast

Listing 6.7. AmericanBreakfast class

Listing 6.8. AmericanBreakfast showing outgoing couplings

Chapter 7. Improving your application design

Listing 7.1. Simple ClassA of package A, referencing ClassC of package C

Listing 7.2. Simple ClassC of package C, referencing ClassD of package D

Listing 7.3. Simple ClassD of package D, referencing ClassA of package A

Listing 7.4. Sample dependencies section of a pom.xml file (commons-lang)

Listing 7.5. Revised dependencies section of a pom.xml file

Chapter 11. IDE integration

Listing 11.1. sonar-project.properties

Chapter 16. Writing your own plugin

Listing 16.1. RedminePlugin class: properties definition and plugin extensions

Listing 16.2. RedmineMetrics class: metrics definition

Listing 16.3. RedmineSensor class: analyzer implementation

Listing 16.4. RedmineWidget class: describing the widget

Listing 16.5. redmine_widget.html.erb

Listing 16.6. redmine.properties: localization file for the Redmine plugin

Listing 16.7. AbacusDecorator: example of simple decorator

Appendix A. Installation and setup

Listing A.1. Schema and user creation

Listing A.2. Ubuntu SonarQube installation

Listing A.3. Ubuntu upgrade script

Listing A.4. Windows upgrade script

Appendix B. Analysis

Listing B.1. SonarQube Runner project properties file

Listing B.2. Maven settings.xml configuration

Listing B.3. Maven 2 plug-in specification for project pom.xml

Listing B.4. Maven 3 plug-in specification for project pom.xml

Listing B.5. Analyzing a project with either Maven version

Listing B.6. Ant script

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.153.212