Dependency Graph

Online documentation:

Dependency Matrix

Online documentation:

Visualizing Code Metrics through Treemaping

With the Online documentation, understand how Treemaping can help you see patterns in your code base, that would be hard to spot with other ways.

Abstractness versus Instability Diagram

The Abstractness versus Instability Diagram helps to detect which Projects are potentially painful to maintain (i.e concrete and stable) and which Projects are potentially useless (i.e abstract and instable).

Online documentation:

For beginners: Where to start

Code queries and rules results are truncated to list a maximum of 100 code elements in this report

Does this report gets too large?

The list contains only code elements refactored or added since the baseline for comparison.

The setting Recent Violations Only is enabled

Why should I enable the setting Recent Violations Only ?

Quick Tips

Main
Main \ Rules
Main \ Rules \ Architecture and Layering
Main \ Rules \ Dead Code
Main \ Rules \ Visibility
Main \ Rules \ Naming Conventions
Main \ Rules \ Source Files Organization
Main \ Group of Queries \ Object Oriented Design
Main \ Group of Queries \ API Breaking Changes
Main \ Group of Queries \ Code Diff Summary
Main \ Group of Queries \ Dead Code
Main \ Metrics \ Application Statistics
Main \ Metrics \ Projects Metrics
Main \ Metrics \ Namespaces Metrics
Main \ Metrics \ Types Metrics
Main \ Projects Dependencies
Main \ Namespaces Dependencies
Main \ Types Dependencies
Main \ Build Order
Main \ Analysis Log
Main \ Trend Charts
XClarify report summary application nameNew Project1report build date07/01/2014 20:50:35analysis duration01:37XClarify version 3.1.0.0 (Evaluation: 14 days left)baseline for comparison Not Defined. To define a Baseline for Comparison, please read this online documentation.
Get started.Quick tips.Back to XClarify. The present HTML report is a summary of data gathered by the analysis.
It is recommended to use the XClarify interactive UI capabilities
to make the most of XClarify by mastering all aspects of your code.

Diagrams

ObjC Projects Dependency Graph
Dependency Graph
View as ?fullscaled
ObjC Projects Dependency Matrix
Dependency Matrix
View as ?fullscaled
Treemap View
Treemap Metric View
View as ?fullscaled
Abstractness versus Instability
Abstractness vs. Instability
View as ?fullscaled

Application Metrics

Note: Further Application Statistics are available.
# Lines of Code
505      
0 (NotMyCode)
# Types
40      
2   Projects      
2   Namespaces      
156   Methods      
59   Fields      
44   Source Files      
Comment
0.98%      
5   Lines of Comment      
Method Complexity
8   Max      
1.3   Average      
Type Complexity
24   Max      
5.75   Average      
Third-Party Usage
8   Projects used      
8   Namespaces used      
70   Types used      
146   Methods used      
13   Fields used      

Rules summary

34100This section lists all Rules violated, and Rules or Queries with Error
  • Number of Rules or Queries with Error (syntax error, exception thrown, time-out): 0
  • Number of Rules violated: 10

Summary of Rules violated

Name # Matches Elements Group
warning   Projects with poor cohesion (RelationalCohesion)
1 projectsArchitecture and Layering
warning   Potentially dead Types
15 typesDead Code
warning   Potentially dead Methods
149 methodsDead Code
warning   Potentially dead Fields
2 fieldsDead Code
warning   Fields should be declared as private
49 fieldsVisibility
warning   Instance fields should be prefixed with a 'm_'
10 fieldsNaming Conventions
warning   Static fields should be prefixed with a 's_'
10 fieldsNaming Conventions
warning   Avoid methods with name too long
5 methodsNaming Conventions
warning   Avoid fields with name too long
12 fieldsNaming Conventions
warning   Avoid defining multiple types in a source file
16 typesSource Files Organization

Application Statistics

Stat # Occurences Avg StdDev Max
Public properties on classes 37 Classes 000 public properties on Keywords
Public methods on classes 37 classes 4.223.514 public methods on ATZPackageTableCellView
Arguments on public methods on classes 156 methods 0.850.994 arguments on ATZShell.executeCommand(NSString*,NSArray*,NSString*,void(^)(NSString*,NSError*))
Cyclomatic complexity on non abstract Methods 160 Methods 00 CC = 0 for ATZColorScheme.installer()

Projects Metrics

If you wish to define thresholds on Projects' Code Metrics, consider writing some Rules.
Clicking column header arrows sorts values.
Clicking column header title text redirect to the online Code Metric definition.
Projects # lines of code # Types # Abstract Types # lines of comment% CommentAfferent CouplingEfferent CouplingRelational CohesionInstabilityAbstractnessDistance
Alcatraz v1.0.0.0315240300641100
AlcatrazTests v1.0.0.0190180210441.33100

Types Metrics : Code Quality

For a particular Code Metric defined for types, values in red represent the 15% highest values.
If you wish to define thresholds on types' Code Metrics, consider writing some Rule.
Clicking column header arrows sorts values.
Clicking column header title text redirect to the online Code Metric definition.
Type Name Type Rank# Lines Of Code# Lines Of Comment% CommentCyclomatic ComplexityAfferent CouplingEfferent Coupling Type Namespace
__Globals5.821400060-1110
__Globals5.82000-00-110
ATZTemplate1.64500050-34
ATZTemplate1.64500050-34
ATZTemplateInstaller1.022510090-218
ATZTemplateInstaller1.022510090-218
NSFileManager+Alcatraz0.651300020-35
NSFileManager+Alcatraz0.65600020-35
ATZColorScheme0.34500050-14
ATZColorScheme0.34500050-14
ATZPbxprojParser0.28900030-111
ATZPlugin0.28400040-14
ATZShell0.2849000110-111
ATZPlugin0.28400040-14
ATZPbxprojParser0.28900030-111
ATZShell0.2828000110-111
ATZAlcatrazPackage0.15500030-03
ATZShell+AnonymousExtension0.15000-00-00
ATZProjectTemplate0.15200020-04
ATZFileTemplate0.15200020-04
ATZProjectTemplateInstaller0.15200020-06
ATZFileTemplateInstaller0.15200020-06
ATZPluginInstaller0.1545124.26150-020
ATZColorSchemeInstaller0.1518000130-014
ATZShell+AnonymousExtension0.15000-00-00
ATZProjectTemplateInstaller0.15200020-06
ATZPluginInstaller0.1552123.7150-020
ATZFileTemplateInstaller0.15200020-06
ATZColorSchemeInstaller0.1533000150-014
ATZProjectTemplate0.15200020-04
ATZFileTemplate0.15200020-04
ATZStatusView0.151100020-06
ATZVersionLabel0.151800030-09
ATZPackageTableCellView+AnonymousExtension0.15000-00-00
ATZPackageTableCellView0.1530000240-013
ATZAlcatrazPackage0.151900030-03
ATZPackageCheckboxCell0.1522014.3540-017
ATZDetailItemButton0.15800050-011
ATZProgressIndicator0.15400020-04
ATZVersionLabel0.151800030-09

Types Metrics : Code Members and Inheritance

Type Name # Instance Methods Nb Static Methods # Fields# Children ClassesDepth Of Inheritance Tree Type Namespace
__Globals5002500
__Globals0002400
ATZTemplate500022
ATZTemplate500022
ATZTemplateInstaller600022
ATZTemplateInstaller600022
NSFileManager+Alcatraz20-0--
NSFileManager+Alcatraz20-0--
ATZColorScheme500002
ATZColorScheme500002
ATZPbxprojParser100001
ATZPlugin400102
ATZShell1000101
ATZPlugin400102
ATZPbxprojParser100001
ATZShell1000101
ATZAlcatrazPackage300002
ATZShell+AnonymousExtension00-1--
ATZProjectTemplate200003
ATZFileTemplate200003
ATZProjectTemplateInstaller200003
ATZFileTemplateInstaller200003
ATZPluginInstaller900002
ATZColorSchemeInstaller1000002
ATZShell+AnonymousExtension00-1--
ATZProjectTemplateInstaller200003
ATZPluginInstaller900002
ATZFileTemplateInstaller200003
ATZColorSchemeInstaller1000002
ATZProjectTemplate200003
ATZFileTemplate200003
ATZStatusView100003
ATZVersionLabel200005
ATZPackageTableCellView+AnonymousExtension00-1--
ATZPackageTableCellView1400304
ATZAlcatrazPackage300002
ATZPackageCheckboxCell200004
ATZDetailItemButton500005
ATZProgressIndicator100004
ATZVersionLabel200005

Types Metrics : Lack Of Cohesion Of Methods and Association Between Classes

Type Name Lack Of Cohesion Of MethodsLack Of Cohesion Of Methods HSAssociation Between Classes Type Namespace
__Globals0021
__Globals000
ATZTemplate005
ATZTemplate005
ATZTemplateInstaller0022
ATZTemplateInstaller0022
NSFileManager+Alcatraz005
NSFileManager+Alcatraz005
ATZColorScheme004
ATZColorScheme004
ATZPbxprojParser0013
ATZPlugin11.334
ATZShell11.1221
ATZPlugin11.334
ATZPbxprojParser0013
ATZShell11.1221
ATZAlcatrazPackage004
ATZShell+AnonymousExtension000
ATZProjectTemplate002
ATZFileTemplate002
ATZProjectTemplateInstaller005
ATZFileTemplateInstaller005
ATZPluginInstaller0041
ATZColorSchemeInstaller0020
ATZShell+AnonymousExtension000
ATZProjectTemplateInstaller005
ATZPluginInstaller0041
ATZFileTemplateInstaller005
ATZColorSchemeInstaller0020
ATZProjectTemplate002
ATZFileTemplate002
ATZStatusView0015
ATZVersionLabel0023
ATZPackageTableCellView+AnonymousExtension000
ATZPackageTableCellView11.0824
ATZAlcatrazPackage004
ATZPackageCheckboxCell0026
ATZDetailItemButton0015
ATZProgressIndicator003
ATZVersionLabel0023

110
Architecture and Layering  

warningCritical    Rule warning: Projects with poor cohesion (RelationalCohesion)
// <Name>Projects with poor cohesion (RelationalCohesion)</Name>
warnif count > 0 from a in Application.Projects where 
  
a.NbTypes > 20 && // Relational Cohesion metrics is relevant only if there are several types 
  (a.RelationalCohesion < 1.5 || 
   
a.RelationalCohesion > 4.0)
select new { a, a.NbTypes, a.RelationalCohesion }

// As classes inside an project should be strongly related, 
// the cohesion should be high. On the other hand, a value 
// which is too high may indicate over-coupling. A good range 
// for RelationalCohesion is 1.5 to 4.0.
// See the definition of the RelationalCohesion metric here 
// http://www.cppdepend.com/Metrics.aspx#RelationalCohesion

1 projects matched

project# TypesRelational cohesionFull Name
Alcatraz241Alcatraz

Statistics

Stat   # Types   Relational cohesion
Sum:241
Average:241
Minimum:241
Maximum:241
Standard deviation:00
Variance:00

030
Dead Code  

warningCritical    Rule warning: Potentially dead Types
// <Name>Potentially dead Types</Name>
warnif count > 0
let typesUsedByMethods=Types.UsedByAny(Application.Methods)

// Select types unused
let typesUnused = 
   
from t in JustMyCode.Types where
   
t.NbTypesUsingMe == 0  select t

// Dead types = types used only by unused types (recursive)
let deadTypesMetric = typesUnused.FillIterative(
types => from t2 in codeBase.Application.Types.UsedByAny(types).Except(types)
         
where
               
t2.TypesUsingMe.Intersect(types).Count() == t2.NbTypesUsingMe
         
select t2)

from t3 in deadTypesMetric.DefinitionDomain where typesUsedByMethods.Contains(t3)
select new { t3, t3.TypesUsingMe, depth = deadTypesMetric[t3] }
        
        

15 types matched

typesTypesUsingMedepthFull Name
ATZColorSchemeInstaller0 type0ATZColorSchemeInstaller
ATZPluginInstaller0 type0ATZPluginInstaller
ATZDetailItemButton0 type0ATZDetailItemButton
ATZPackageCheckboxCell0 type0ATZPackageCheckboxCell
ATZPackageTableCellView0 type0ATZPackageTableCellView
ATZVersionLabel0 type0ATZVersionLabel
ATZColorSchemeInstaller0 type0ATZColorSchemeInstaller
ATZPluginInstaller0 type0ATZPluginInstaller
ATZVersionLabel0 type0ATZVersionLabel
ATZTemplateInstaller2 types1ATZTemplateInstaller
ATZShell1 type1ATZShell
ATZPbxprojParser1 type1ATZPbxprojParser
ATZTemplateInstaller2 types1ATZTemplateInstaller
ATZShell1 type1ATZShell
ATZPbxprojParser1 type1ATZPbxprojParser

Statistics

Stat   TypesUsingMe   depth
Sum:06
Average:00.4
Minimum:00
Maximum:01
Standard deviation:00.49
Variance:00.24
warningCritical    Rule warning: Potentially dead Methods
// <Name>Potentially dead Methods</Name>
warnif count > 0
// Filter procedure for methods that should'nt be considered as dead
let canMethodBeConsideredAsDeadProc = new Func<IMethod, bool>(
    
m => !m.IsGeneratedByCompiler
)

// Get methods unused
let methodsUnused = 
   
from m2 in JustMyCode.Methods where 
   
m2.NbMethodsCallingMe == 0 && 
   
canMethodBeConsideredAsDeadProc(m2)
   
select m2

// Dead methods = methods used only by unused methods (recursive)
let deadMethodsMetric = methodsUnused.FillIterative(
   
methods => // Unique loop, just to let a chance to build the hashset.
              from o in new[] { new object() }
              
// Use a hashet to make Intersect calls much faster!
              let hashset = methods.ToHashSet()
              
from m3 in codeBase.Application.Methods.UsedByAny(methods).Except(methods)
              
where canMethodBeConsideredAsDeadProc(m3) &&
                    
// Select methods called only by methods already considered as dead
                    hashset.Intersect(m3.MethodsCallingMe).Count() == m3.NbMethodsCallingMe
              
select m3)

from m4 in JustMyCode.Methods.Intersect(deadMethodsMetric.DefinitionDomain)
select new { m4, m4.MethodsCallingMe, depth = deadMethodsMetric[m4] }

149 methods matched

methodsMethodsCallingMedepthFull Name
installer()0 method0ATZColorScheme.installer()
type()0 method0ATZColorScheme.type()
requiresRestart()0 method0ATZColorScheme.requiresRestart()
extension()0 method0ATZColorScheme.extension()
iconName()0 method0ATZColorScheme.iconName()
installer()0 method0ATZFileTemplate.installer()
type()0 method0ATZFileTemplate.type()
installer()0 method0ATZPlugin.installer()
type()0 method0ATZPlugin.type()
extension()0 method0ATZPlugin.extension()
iconName()0 method0ATZPlugin.iconName()
installer()0 method0ATZProjectTemplate.installer()
type()0 method0ATZProjectTemplate.type()
installer()0 method0ATZTemplate.installer()
type()0 method0ATZTemplate.type()
requiresRestart()0 method0ATZTemplate.requiresRestart()
extension()0 method0ATZTemplate.extension()
iconName()0 method0ATZTemplate.iconName()
updateBlock2(NSData*,NSError*)0 method0ATZColorSchemeInstaller.updateBlock2(NSData*,NSError*)
downloadPackage(ATZPackage*,void(^)(NSError*))0 method0ATZColorSchemeInstaller.downloadPackage(ATZPackage*,void(^)(NSError*))
updatePackage(ATZPackage*,void(^)(NSString*,NSError*))0 method0ATZColorSchemeInstaller.updatePackage(ATZPackage*,void(^)(NSString* ,NSError*))
installPackage(ATZColorScheme*,void(^)(NSError*))0 method0ATZColorSchemeInstaller.installPackage(ATZColorScheme*,void(^) (NSError*))
downloadRelativePath()0 method0ATZColorSchemeInstaller.downloadRelativePath()
pathForInstalledPackage(ATZPackage*)0 method0ATZColorSchemeInstaller.pathForInstalledPackage(ATZPackage*)
saveColorScheme(ATZPackage*,NSData*,void(^)(NSError*))1 method1ATZColorSchemeInstaller.saveColorScheme(ATZPackage*,NSData*,void(^) (NSError*))
copyColorSchemeToXcode(ATZPackage*,void(^)(NSError*))1 method1ATZColorSchemeInstaller.copyColorSchemeToXcode(ATZPackage*,void(^) (NSError*))
createDownloadedColorsDirectoryIfNeeded()1 method1ATZColorSchemeInstaller.createDownloadedColorsDirectoryIfNeeded()
createInstalledColorsDirectoryIfNeeded()1 method1ATZColorSchemeInstaller.createInstalledColorsDirectoryIfNeeded()
installedColorSchemesPath()1 method2ATZColorSchemeInstaller.installedColorSchemesPath()
downloadRelativePath()0 method0ATZFileTemplateInstaller.downloadRelativePath()
pathForInstalledPackage(ATZPackage*)0 method0ATZFileTemplateInstaller.pathForInstalledPackage(ATZPackage*)
downloadPackage(ATZPackage*,void(^)(NSError*))0 method0ATZPluginInstaller.downloadPackage(ATZPackage*,void(^)(NSError*))
updatePackage(ATZPackage*,void(^)(NSString*,NSError*))0 method0ATZPluginInstaller.updatePackage(ATZPackage*,void(^)(NSString* ,NSError*))
installPackage(ATZPlugin*,void(^)(NSError*))0 method0ATZPluginInstaller.installPackage(ATZPlugin*,void(^)(NSError*))
downloadRelativePath()0 method0ATZPluginInstaller.downloadRelativePath()
pathForInstalledPackage(ATZPackage*)0 method0ATZPluginInstaller.pathForInstalledPackage(ATZPackage*)
reloadXcodeForPackage(ATZPackage*,void(^)(NSError*))0 method0ATZPluginInstaller.reloadXcodeForPackage(ATZPackage*,void(^)(NSError*) )
buildPlugin(ATZPlugin*,void(^)(NSError*))1 method1ATZPluginInstaller.buildPlugin(ATZPlugin*,void(^)(NSError*))
findXcodeprojPathForPlugin(ATZPlugin*)1 method2ATZPluginInstaller.findXcodeprojPathForPlugin(ATZPlugin*)
installNameFromPbxproj(ATZPackage*)1 method1ATZPluginInstaller.installNameFromPbxproj(ATZPackage*)
downloadRelativePath()0 method0ATZProjectTemplateInstaller.downloadRelativePath()
pathForInstalledPackage(ATZPackage*)0 method0ATZProjectTemplateInstaller.pathForInstalledPackage(ATZPackage*)
downloadPackage(ATZPackage*,void(^)(NSError*))0 method0ATZTemplateInstaller.downloadPackage(ATZPackage*,void(^)(NSError*))
updatePackage(ATZPackage*,void(^)(NSString*,NSError*))0 method0ATZTemplateInstaller.updatePackage(ATZPackage*,void(^)(NSString* ,NSError*))
installPackage(ATZTemplate*,void(^)(NSError*))0 method0ATZTemplateInstaller.installPackage(ATZTemplate*,void(^)(NSError*))
copyTemplatesToXcode(ATZTemplate*,void(^)(NSError*))1 method1ATZTemplateInstaller.copyTemplatesToXcode(ATZTemplate*,void(^) (NSError*))
createTemplateInstallDirectory(ATZTemplate*,NSError**)1 method2ATZTemplateInstaller.createTemplateInstallDirectory(ATZTemplate* ,NSError**)
templateFilesForClonedTemplate(ATZTemplate*)1 method2ATZTemplateInstaller.templateFilesForClonedTemplate(ATZTemplate*)
removeItemAtPath(NSString*,void(^)(NSError*))0 method0NSFileManager+Alcatraz.removeItemAtPath(NSString*,void(^)(NSError*))
taskOutput()0 method0ATZShell.taskOutput()
setTaskOutput(NSMutableData*)0 method0ATZShell.setTaskOutput(NSMutableData*)
areCommandLineToolsAvailable()0 method0ATZShell.areCommandLineToolsAvailable()
executeCommand(NSString*,NSArray*,void(^)(NSString*,NSError*))1 method2ATZShell.executeCommand(NSString*,NSArray*,void(^)(NSString*,NSError*) )
executeCommand(NSString*,NSArray*,NSString*,void(^)(NSString*,NSError* ))1 method3ATZShell.executeCommand(NSString*,NSArray*,NSString*,void(^)(NSString* ,NSError*))
setUpShellOutputForTask(NSTask*)1 method4ATZShell.setUpShellOutputForTask(NSTask*)
setUpStdErrorOutputForTask(NSTask*)1 method4ATZShell.setUpStdErrorOutputForTask(NSTask*)
setUpTerminationHandlerForTask(NSTask*,void(^)(NSString*,NSError*))1 method4ATZShell.setUpTerminationHandlerForTask(NSTask*,void(^)(NSString* ,NSError*))
tryToLaunchTask(NSTask*,void(^)(NSString*,NSError*))1 method4ATZShell.tryToLaunchTask(NSTask*,void(^)(NSString*,NSError*))
drawRect(NSRect)0 method0ATZStatusView.drawRect(NSRect)
initWithCoder(NSCoder*)0 method0ATZProgressIndicator.initWithCoder(NSCoder*)
mouseEntered(NSEvent*)0 method0ATZDetailItemButton.mouseEntered(NSEvent*)
mouseExited(NSEvent*)0 method0ATZDetailItemButton.mouseExited(NSEvent*)
resetCursorRects()0 method0ATZDetailItemButton.resetCursorRects()
awakeFromNib()0 method0ATZDetailItemButton.awakeFromNib()
createTrackingArea()1 method1ATZDetailItemButton.createTrackingArea()
xcpluginNameFromPbxproj(NSString*)1 method2ATZPbxprojParser.xcpluginNameFromPbxproj(NSString*)
drawIconForPackage(NSImage*,ATZPackage*,NSRect)1 method1ATZPackageCheckboxCell.drawIconForPackage(NSImage*,ATZPackage*,NSRect)
drawImage(NSImage*,NSRect,NSView*)0 method0ATZPackageCheckboxCell.drawImage(NSImage*,NSRect,NSView*)
installer()0 method0ATZAlcatrazPackage.installer()
update()0 method0ATZAlcatrazPackage.update()
setScreenshotButton(NSButton*)0 method0ATZPackageTableCellView.setScreenshotButton(NSButton*)
setWebsiteButton(NSButton*)0 method0ATZPackageTableCellView.setWebsiteButton(NSButton*)
awakeFromNib()0 method0ATZPackageTableCellView.awakeFromNib()
viewWillDraw()0 method0ATZPackageTableCellView.viewWillDraw()
mouseEntered(NSEvent*)0 method0ATZPackageTableCellView.mouseEntered(NSEvent*)
mouseExited(NSEvent*)0 method0ATZPackageTableCellView.mouseExited(NSEvent*)
mouseMoved(NSEvent*)0 method0ATZPackageTableCellView.mouseMoved(NSEvent*)
createTrackingArea()1 method1ATZPackageTableCellView.createTrackingArea()
showButtonsIfNeeded()2 methods1ATZPackageTableCellView.showButtonsIfNeeded()
initWithFrame(NSRect)0 method0ATZVersionLabel.initWithFrame(NSRect)
setStyle()1 method1ATZVersionLabel.setStyle()
createFakeMenu()0 method0__Globals.createFakeMenu()
clickMenuItem()0 method0__Globals.clickMenuItem()
fakeJSON()0 method0__Globals.fakeJSON()
setUpTerminationHandlerForTaskBlock1(ATZPackage*,NSDictionary*)0 method0__Globals.setUpTerminationHandlerForTaskBlock1(ATZPackage* ,NSDictionary*)
packageWithName(NSArray*,NSString*)0 method0__Globals.packageWithName(NSArray*,NSString*)
buildMockInstaller(int*)0 method0__Globals.buildMockInstaller(int*)
installer()0 method0ATZPlugin.installer()
type()0 method0ATZPlugin.type()
extension()0 method0ATZPlugin.extension()
iconName()0 method0ATZPlugin.iconName()
installer()0 method0ATZTemplate.installer()
type()0 method0ATZTemplate.type()
requiresRestart()0 method0ATZTemplate.requiresRestart()
extension()0 method0ATZTemplate.extension()
iconName()0 method0ATZTemplate.iconName()
installer()0 method0ATZAlcatrazPackage.installer()
update()0 method0ATZAlcatrazPackage.update()
installer()0 method0ATZColorScheme.installer()
type()0 method0ATZColorScheme.type()

Statistics

Stat   MethodsCallingMe   depth
Sum:080
Average:00.54
Minimum:00
Maximum:04
Standard deviation:01.07
Variance:01.13
warningCritical    Rule warning: Potentially dead Fields
// <Name>Potentially dead Fields</Name>
warnif count > 0
from f in JustMyCode.Fields where
   
f.NbMethodsUsingMe == 0 && 
   
!f.IsPublic &&     // Although not recommended, public fields might be used by client applications of your Projects.
   !f.IsEnumValue   
  
select f

2 fields matched

fieldsFull Name
requiresRestartATZPlugin.requiresRestart
requiresRestartATZPlugin.requiresRestart

Statistics

Stat
Sum:
Average:
Minimum:
Maximum:
Standard deviation:
Variance:

010
Visibility  

warningCritical    Rule warning: Fields should be declared as private
// <Name>Fields should be declared as private</Name>
warnif count > 0 from f in Application.Fields where 
 
f.IsPublic && !f.IsProperty &&

 
// These conditions filter cases where fields 
 // doesn't represent state that should be encapsulated. 
 !f.IsGeneratedByCompiler && 
 
!f.IsEnumValue
select new { f }

49 fields matched

fieldsFull Name
COLOR_SCHEME__Globals.COLOR_SCHEME
DVTCOLORSCHEME__Globals.DVTCOLORSCHEME
COLOR_SCHEME_ICON_NAME__Globals.COLOR_SCHEME_ICON_NAME
FILE_TEMPLATE__Globals.FILE_TEMPLATE
PLUGIN__Globals.PLUGIN
XCPLUGIN__Globals.XCPLUGIN
PLUGIN_ICON_NAME__Globals.PLUGIN_ICON_NAME
PROJECT_TEMPLATE__Globals.PROJECT_TEMPLATE
XCTEMPLATE__Globals.XCTEMPLATE
TEMPLATE_ICON_NAME__Globals.TEMPLATE_ICON_NAME
INSTALLED_COLOR_SCHEMES_RELATIVE_PATH__Globals.INSTALLED_COLOR_SCHEMES_RELATIVE_PATH
DOWNLOADED_COLOR_SCHEMES_RELATIVE_PATH__Globals.DOWNLOADED_COLOR_SCHEMES_RELATIVE_PATH
INSTALLED_FILE_TEMPLATES_RELATIVE_PATH__Globals.INSTALLED_FILE_TEMPLATES_RELATIVE_PATH
DOWNLOADED_FILE_TEMPLATES_RELATIVE_PATH__Globals.DOWNLOADED_FILE_TEMPLATES_RELATIVE_PATH
INSTALLED_PLUGINS_RELATIVE_PATH__Globals.INSTALLED_PLUGINS_RELATIVE_PATH
DOWNLOADED_PLUGINS_RELATIVE_PATH__Globals.DOWNLOADED_PLUGINS_RELATIVE_PATH
XCODE_BUILD__Globals.XCODE_BUILD
PROJECT__Globals.PROJECT
XCODEPROJ__Globals.XCODEPROJ
PROJECT_PBXPROJ__Globals.PROJECT_PBXPROJ
INSTALLED_PROJECT_TEMPLATES_RELATIVE_PATH__Globals.INSTALLED_PROJECT_TEMPLATES_RELATIVE_PATH
DOWNLOADED_PROJECT_TEMPLATES_RELATIVE_PATH__Globals.DOWNLOADED_PROJECT_TEMPLATES_RELATIVE_PATH
singleton__Globals.singleton
PLUGIN_NAME_REGEX__Globals.PLUGIN_NAME_REGEX
ALCATRAZ_PATH__Globals.ALCATRAZ_PATH
PLUGIN__Globals.PLUGIN
XCPLUGIN__Globals.XCPLUGIN
PLUGIN_ICON_NAME__Globals.PLUGIN_ICON_NAME
XCTEMPLATE__Globals.XCTEMPLATE
TEMPLATE_ICON_NAME__Globals.TEMPLATE_ICON_NAME
COLOR_SCHEME__Globals.COLOR_SCHEME
DVTCOLORSCHEME__Globals.DVTCOLORSCHEME
COLOR_SCHEME_ICON_NAME__Globals.COLOR_SCHEME_ICON_NAME
PROJECT_TEMPLATE__Globals.PROJECT_TEMPLATE
FILE_TEMPLATE__Globals.FILE_TEMPLATE
INSTALLED_COLOR_SCHEMES_RELATIVE_PATH__Globals.INSTALLED_COLOR_SCHEMES_RELATIVE_PATH
DOWNLOADED_COLOR_SCHEMES_RELATIVE_PATH__Globals.DOWNLOADED_COLOR_SCHEMES_RELATIVE_PATH
INSTALLED_FILE_TEMPLATES_RELATIVE_PATH__Globals.INSTALLED_FILE_TEMPLATES_RELATIVE_PATH
DOWNLOADED_FILE_TEMPLATES_RELATIVE_PATH__Globals.DOWNLOADED_FILE_TEMPLATES_RELATIVE_PATH
INSTALLED_PLUGINS_RELATIVE_PATH__Globals.INSTALLED_PLUGINS_RELATIVE_PATH
DOWNLOADED_PLUGINS_RELATIVE_PATH__Globals.DOWNLOADED_PLUGINS_RELATIVE_PATH
XCODE_BUILD__Globals.XCODE_BUILD
PROJECT__Globals.PROJECT
XCODEPROJ__Globals.XCODEPROJ
PROJECT_PBXPROJ__Globals.PROJECT_PBXPROJ
INSTALLED_PROJECT_TEMPLATES_RELATIVE_PATH__Globals.INSTALLED_PROJECT_TEMPLATES_RELATIVE_PATH
DOWNLOADED_PROJECT_TEMPLATES_RELATIVE_PATH__Globals.DOWNLOADED_PROJECT_TEMPLATES_RELATIVE_PATH
singleton__Globals.singleton
PLUGIN_NAME_REGEX__Globals.PLUGIN_NAME_REGEX

Statistics

Stat
Sum:
Average:
Minimum:
Maximum:
Standard deviation:
Variance:

340
Naming Conventions  

warningCritical    Rule warning: Instance fields should be prefixed with a 'm_'
// <Name>Instance fields should be prefixed with a 'm_'</Name>
warnif count > 0 (from f in Fields where 
  
!f.NameLike (@"^m_") && 
  
!f.IsStatic  
  
// Don't hesitate to customize the regex of NameLike to your preference. 
 && !f.IsGlobal
select new { f }).Take(10)

10 fields matched

fieldsFull Name
NSUTF8StringEncodingAnonymous36.NSUTF8StringEncoding
NSRegularExpressionAnchorsMatchLinesNSRegularExpressionOptions.NSRegularExpressionAnchorsMatchLines
NSGraphiteControlTintAnonymous93.NSGraphiteControlTint
NSTrackingMouseEnteredAndExitedAnonymous16.NSTrackingMouseEnteredAndExited
NSTrackingMouseMovedAnonymous16.NSTrackingMouseMoved
NSTrackingActiveInActiveAppAnonymous23.NSTrackingActiveInActiveApp
NSTrackingAssumeInsideAnonymous31.NSTrackingAssumeInside
NSTrackingInVisibleRectAnonymous31.NSTrackingInVisibleRect
NSRightTextAlignmentAnonymous29.NSRightTextAlignment
heightCGSize.height

Statistics

Stat
Sum:
Average:
Minimum:
Maximum:
Standard deviation:
Variance:
warningCritical    Rule warning: Static fields should be prefixed with a 's_'
// <Name>Static fields should be prefixed with a 's_'</Name>
   warnif count > 0 (from f in Fields where 
  
!f.NameLike (@"^s_") && 
  
f.IsStatic
  
select new { f }).Take(10)  
  
// Don't hesitate to customize the regex of NameLike to your preference.


10 fields matched

fieldsFull Name
COLOR_SCHEME__Globals.COLOR_SCHEME
DVTCOLORSCHEME__Globals.DVTCOLORSCHEME
COLOR_SCHEME_ICON_NAME__Globals.COLOR_SCHEME_ICON_NAME
FILE_TEMPLATE__Globals.FILE_TEMPLATE
PLUGIN__Globals.PLUGIN
XCPLUGIN__Globals.XCPLUGIN
PLUGIN_ICON_NAME__Globals.PLUGIN_ICON_NAME
PROJECT_TEMPLATE__Globals.PROJECT_TEMPLATE
XCTEMPLATE__Globals.XCTEMPLATE
TEMPLATE_ICON_NAME__Globals.TEMPLATE_ICON_NAME

Statistics

Stat
Sum:
Average:
Minimum:
Maximum:
Standard deviation:
Variance:
warningCritical    Rule warning: Avoid methods with name too long
// <Name>Avoid methods with name too long</Name>
warnif count > 0 from m in Application.Methods where 
 
!m.IsGeneratedByCompiler 
  
&& m.SimpleName.Length > 35

select new { m, m.SimpleName }

// The regex matches methods with name longer 
// than 35 characters.
// Method Name doesn't contain the type 
// prefix, FullName does.
// The regex computes the method name length from 
// the beginning until the first open parenthesis 
// or first lower than (for generic methods).
      

5 methods matched

methodsSimpleNameFull Name
createDownloadedColorsDirectoryIfNeeded()createDownloadedColorsDirectoryIfNeededATZColorSchemeInstaller.createDownloadedColorsDirectoryIfNeeded()
createInstalledColorsDirectoryIfNeeded()createInstalledColorsDirectoryIfNeededATZColorSchemeInstaller.createInstalledColorsDirectoryIfNeeded()
setUpTerminationHandlerForTaskBlock1(ATZPackage*,NSDictionary*)setUpTerminationHandlerForTaskBlock1__Globals.setUpTerminationHandlerForTaskBlock1(ATZPackage* ,NSDictionary*)
createDownloadedColorsDirectoryIfNeeded()createDownloadedColorsDirectoryIfNeededATZColorSchemeInstaller.createDownloadedColorsDirectoryIfNeeded()
createInstalledColorsDirectoryIfNeeded()createInstalledColorsDirectoryIfNeededATZColorSchemeInstaller.createInstalledColorsDirectoryIfNeeded()

Statistics

Stat   SimpleName
Sum:0
Average:0
Minimum:0
Maximum:0
Standard deviation:0
Variance:0
warningCritical    Rule warning: Avoid fields with name too long
// <Name>Avoid fields with name too long</Name>
warnif count > 0 from f in Application.Fields where
 
!f.IsGeneratedByCompiler &&
  
f.Name.Length > 35
select f

// The regex matches fields with name longer 
// than 35 characters.
// Field Name doesn't contain the type and 
// namespace prefix, FullName does.
      

12 fields matched

fieldsFull Name
INSTALLED_COLOR_SCHEMES_RELATIVE_PATH__Globals.INSTALLED_COLOR_SCHEMES_RELATIVE_PATH
DOWNLOADED_COLOR_SCHEMES_RELATIVE_PATH__Globals.DOWNLOADED_COLOR_SCHEMES_RELATIVE_PATH
INSTALLED_FILE_TEMPLATES_RELATIVE_PATH__Globals.INSTALLED_FILE_TEMPLATES_RELATIVE_PATH
DOWNLOADED_FILE_TEMPLATES_RELATIVE_PATH__Globals.DOWNLOADED_FILE_TEMPLATES_RELATIVE_PATH
INSTALLED_PROJECT_TEMPLATES_RELATIVE_PATH__Globals.INSTALLED_PROJECT_TEMPLATES_RELATIVE_PATH
DOWNLOADED_PROJECT_TEMPLATES_RELATIVE_PATH__Globals.DOWNLOADED_PROJECT_TEMPLATES_RELATIVE_PATH
INSTALLED_COLOR_SCHEMES_RELATIVE_PATH__Globals.INSTALLED_COLOR_SCHEMES_RELATIVE_PATH
DOWNLOADED_COLOR_SCHEMES_RELATIVE_PATH__Globals.DOWNLOADED_COLOR_SCHEMES_RELATIVE_PATH
INSTALLED_FILE_TEMPLATES_RELATIVE_PATH__Globals.INSTALLED_FILE_TEMPLATES_RELATIVE_PATH
DOWNLOADED_FILE_TEMPLATES_RELATIVE_PATH__Globals.DOWNLOADED_FILE_TEMPLATES_RELATIVE_PATH
INSTALLED_PROJECT_TEMPLATES_RELATIVE_PATH__Globals.INSTALLED_PROJECT_TEMPLATES_RELATIVE_PATH
DOWNLOADED_PROJECT_TEMPLATES_RELATIVE_PATH__Globals.DOWNLOADED_PROJECT_TEMPLATES_RELATIVE_PATH

Statistics

Stat
Sum:
Average:
Minimum:
Maximum:
Standard deviation:
Variance:

010
Source Files Organization  

warningCritical    Rule warning: Avoid defining multiple types in a source file
// <Name>Avoid defining multiple types in a source file</Name>
warnif count > 0 

// Build a lookup indexed by source files, values being a sequence of types defined in the source file.
let lookup = Application.Types.Where(t => 
                                
!t.IsGlobal && 
                               
// except nested types and types generated by compilers!
                               !t.IsGeneratedByCompiler )                                
                         
// It could make sense to not apply this rule for enumerations.
                         // && !t.IsEnumeration)

            
// We use multi-key, since a type can be declared in multiple source files.
           .ToMultiKeyLookup(t => t.SourceDecls.Select(d => d.SourceFile))
 
from @group in lookup where @group.Count() > 1
   
let sourceFile = @group.Key

   
// CQLinq doesn't let indexing result with sourceFile 
   // so we choose a typeIndex in types, 
   // preferably the type that has the file name.
   let typeWithSourceFileName = @group.FirstOrDefault(t => t.SimpleName == sourceFile.FileNameWithoutExtension)
   
let typeIndex = typeWithSourceFileName ?? @group.First()

select new { typeIndex, 
             
types = @group as IEnumerable<IType>, 
             
sourceFile.FilePathString }

16 types matched

typestypesFilePathStringFull Name
ATZColorScheme2 types/Users/macbookpro/Downloads/Alcatraz-master/Alcatraz/Packages/ATZColorScheme.hATZColorScheme
ATZFileTemplate2 types/Users/macbookpro/Downloads/Alcatraz-master/Alcatraz/Packages/ATZFileTemplate.hATZFileTemplate
ATZPlugin2 types/Users/macbookpro/Downloads/Alcatraz-master/Alcatraz/Packages/ATZPlugin.hATZPlugin
ATZProjectTemplate2 types/Users/macbookpro/Downloads/Alcatraz-master/Alcatraz/Packages/ATZProjectTemplate.hATZProjectTemplate
ATZTemplate2 types/Users/macbookpro/Downloads/Alcatraz-master/Alcatraz/Packages/ATZTemplate.hATZTemplate
ATZColorSchemeInstaller2 types/Users/macbookpro/Downloads/Alcatraz-master/Alcatraz/Installers/ATZColorSchemeInstaller.hATZColorSchemeInstaller
ATZFileTemplateInstaller2 types/Users/macbookpro/Downloads/Alcatraz-master/Alcatraz/Installers/ATZFileTemplateInstaller.hATZFileTemplateInstaller
ATZPluginInstaller2 types/Users/macbookpro/Downloads/Alcatraz-master/Alcatraz/Installers/ATZPluginInstaller.hATZPluginInstaller
ATZProjectTemplateInstaller2 types/Users/macbookpro/Downloads/Alcatraz-master/Alcatraz/Installers/ATZProjectTemplateInstaller.hATZProjectTemplateInstaller
ATZTemplateInstaller2 types/Users/macbookpro/Downloads/Alcatraz-master/Alcatraz/Installers/ATZTemplateInstaller.hATZTemplateInstaller
NSFileManager+Alcatraz2 types/Users/macbookpro/Downloads/Alcatraz-master/Alcatraz/Categories/NSFileManager+Alcatraz.mNSFileManager+Alcatraz
ATZShell2 types/Users/macbookpro/Downloads/Alcatraz-master/Alcatraz/Helpers/ATZShell.hATZShell
ATZShell+AnonymousExtension2 types/Users/macbookpro/Downloads/Alcatraz-master/Alcatraz/Helpers/ATZShell.mATZShell+AnonymousExtension
ATZPbxprojParser2 types/Users/macbookpro/Downloads/Alcatraz-master/Alcatraz/Helpers/ATZPBXProjParser.hATZPbxprojParser
ATZAlcatrazPackage2 types/Users/macbookpro/Downloads/Alcatraz-master/Alcatraz/Packages/ATZAlcatrazPackage.hATZAlcatrazPackage
ATZVersionLabel2 types/Users/macbookpro/Downloads/Alcatraz-master/Alcatraz/Views/ATZVersionLabel.hATZVersionLabel

Statistics

Stat   types   FilePathString
Sum:00
Average:00
Minimum:00
Maximum:00
Standard deviation:00
Variance:00

Object Oriented Design

Base class should not use derivatives
// <Name>Base class should not use derivatives</Name>
warnif count > 0 
from baseClass in JustMyCode.Types
where baseClass.IsClass && baseClass.NbChildren > 0 // <-- for optimization!
let derivedClassesUsed = baseClass.DerivedTypes.UsedBy(baseClass)
where derivedClassesUsed.Count() > 0
select new { baseClass, derivedClassesUsed }

No types matched

Class shouldn't be too deep in inheritance tree
// <Name>Class shouldn't be too deep in inheritance tree</Name>
warnif count > 0 from t in JustMyCode.Types 
where t.IsClass
let baseClasses = t.BaseClasses.ExceptThirdParty()

// Warn for classes with 3 or more base classes.
// Notice that we don't count third-party classes 
// because this rule concerns your code design,
// not third-party libraries consumed design.
where baseClasses.Count() >= 3

select new { t, baseClasses, 
                
// The metric value DepthOfInheritance takes account
                // of third-party base classes
                t.DepthOfInheritance } 

// Branches too long in the derivation should be avoided.
// See the definition of the DepthOfInheritance metric here 
// http://www.cppdepend.com/Metrics.aspx#DIT

No types matched

API Breaking Changes

API Breaking Changes: Types
// <Name>API Breaking Changes: Types</Name>
// This rule warns if a publicly visible type is 
// not publicly visible anymore or if it has been removed.
// Such type can break the code of your clients.

warnif count > 0 from t in codeBase.OlderVersion().Application.Types
where t.IsPublic && 

     
// The type has been removed and its parent project hasn't been removed ...
     ( (t.WasRemoved() && !t.ParentProject.WasRemoved()) ||

     
// ... or the type is not publicly visible anymore
       !t.WasRemoved() && !t.NewerVersion().IsPublic)

select new { t,
             
t.NewerVersion().Visibility }

No types matched

API Breaking Changes: Methods
// <Name>API Breaking Changes: Methods</Name>
// This rule warns if a publicly visible method is 
// not publicly visible anymore or if it has been removed.
// Such method can break the code of your clients.

warnif count > 0 from m in codeBase.OlderVersion().Application.Methods
where m.IsPublic && 

     
// The method has been removed and its parent type hasn't been removed ...
     ( (m.WasRemoved() && !m.ParentType.WasRemoved()) ||

     
// ... or the method is not publicly visible anymore
       !m.WasRemoved() && !m.NewerVersion().IsPublic)

select new { m,
             
NewVisibility = m.NewerVersion().Visibility }

No methods matched

API Breaking Changes: Fields
// <Name>API Breaking Changes: Fields</Name>
// This rule warns if a publicly visible field is 
// not publicly visible anymore or if it has been removed.
// Such field can break the code of your clients.

warnif count > 0 from f in codeBase.OlderVersion().Application.Fields
where f.IsPublic &&

     
// The field has been removed and its parent type hasn't been removed ...
     ( (f.WasRemoved() && !f.ParentType.WasRemoved()) ||

     
// ... or the field is not publicly visible anymore
       !f.WasRemoved() && !f.NewerVersion().IsPublic)

select new { f,
             
NewVisibility = f.NewerVersion().Visibility }

No fields matched

API Breaking Changes: Protocols
// <Name>API Breaking Changes: Protocols</Name>
// This rule warns if a publicly visible interface or abstract class 
// has been changed and contains new abstract methods or 
// if some abstract methods have been removed.
// This can break the code of clients 
// that implement such interface or derive from such abstract class.

warnif count > 0 from tNewer in Application.Types where 
 
(tNewer.IsProtocol ) && 
  
tNewer.IsPublic && 
  
tNewer.IsPresentInBothBuilds()

let tOlder = tNewer.OlderVersion() where tOlder.IsPublic

let methodsRemoved = tOlder.Methods.Where(m => m.WasRemoved())
let methodsAdded = tNewer.Methods.Where(m => m.WasAdded())

where methodsAdded.Count() > 0 || methodsRemoved.Count() > 0
select new { tNewer, methodsAdded, methodsRemoved }

No types matched

Avoid transforming immutable types into mutable types
// <Name>Avoid transforming immutable types into mutable types</Name>

// Immutability is a strong property on a type.
// Breaking immutability can result in serious problem for an algorithm consummer
// that has been written taking account of the type immutability.

// To visualize changes in code, right-click a matched type and select:
//  - Compare older and newer versions of source file
//  - Compare older and newer versions disassembled with Reflector

warnif count > 0 
from t in Application.Types where
  
t.IsPresentInBothBuilds() &&
 
!t.IsStatic &&
 
!t.IsImmutable && 
  
t.OlderVersion().IsImmutable

let mutableFields = from f in t.InstanceFields where !f.IsImmutable select f

select new { t, mutableFields }

No types matched

API: New publicly visible types
// <Name>API: New publicly visible types</Name>
// List types that are new in the public surface of your Projects

from t in Application.Types
where t.IsPublic && 

     
// The type has been removed and its parent project hasn't been removed ...
     ( (t.WasAdded() && !t.ParentProject.WasAdded()) ||

     
// ... or the type existed but was not publicly visible
       !t.WasAdded() && !t.OlderVersion().IsPublic)

select new { t,
             
OldVisibility = t.OlderVersion().Visibility }

No types matched

API: New publicly visible fields
// <Name>API: New publicly visible fields</Name>
// List fields that are new in the public surface of your Projects

from f in Application.Fields
where f.IsPublic && 

     
// The method has been removed and its parent project hasn'f been removed ...
     ( (f.WasAdded() && !f.ParentType.WasAdded()) ||

     
// ... or the t existed but was not publicly visible
       !f.WasAdded() && !f.OlderVersion().IsPublic)

select new { f,
             
OldVisibility = f.OlderVersion().Visibility }

No fields matched

Code Diff Summary

New Projects
// <Name>New Projects</Name>
from a in Application.Projects where a.WasAdded()
select new { a, a.NbLinesOfCode }

No projects matched

Projects removed
// <Name>Projects removed</Name>
from a in codeBase.OlderVersion().Application.Projects where a.WasRemoved()
select new { a, a.NbLinesOfCode }

No projects matched

Projects where code was changed
// <Name>Projects where code was changed</Name>
from a in Application.Projects where a.CodeWasChanged()
select new { a, a.NbLinesOfCode, 
             
oldNbLinesOfCode = a.OlderVersion().NbLinesOfCode ,
             
delta = (int) a.NbLinesOfCode - a.OlderVersion().NbLinesOfCode }

No projects matched

New types
// <Name>New types</Name>
from t in Application.Types where 
  
t.WasAdded()
select new { t, t.NbLinesOfCode }

No types matched

Types removed
// <Name>Types removed</Name>
from t in codeBase.OlderVersion().Application.Types where 
  
t.WasRemoved()
select new { t, t.NbLinesOfCode }

No types matched

Types where code was changed
// <Name>Types where code was changed</Name>
// To visualize changes in code, right-click a matched type and select:
//  - Compare older and newer versions of source file
//  - Compare older and newer versions disassembled with Reflector

from t in Application.Types where t.CodeWasChanged() 
//select new { t, t.NbLinesOfCode }
select new { t, t.NbLinesOfCode, 
             
oldNbLinesOfCode = t.OlderVersion().NbLinesOfCode ,
             
delta = (int?) t.NbLinesOfCode - t.OlderVersion().NbLinesOfCode } 
/*from t in Application.Types where t.CodeWasChanged() && t.IsPresentInBothBuild
select new { t, t.NbLinesOfCode, 
             oldNbLinesOfCode = t.OlderVersion().NbLinesOfCode ,
             delta = (int) t.NbLinesOfCode - t.OlderVersion().NbLinesOfCode }*/

No types matched

Types directly using one or several types changed
// <Name>Types directly using one or several types changed</Name>
let typesChanged = Application.Types.Where(t => t.CodeWasChanged()).ToHashSet()

from t2 in JustMyCode.Types.UsingAny(typesChanged) where
  
!t2.CodeWasChanged() && 
  
!t2.WasAdded()
let typesChangedUsed = t2.TypesUsed.Intersect(typesChanged) 
select new { t2, typesChangedUsed }

No types matched

Types indirectly using one or several types changed
// <Name>Types indirectly using one or several types changed</Name>
let typesChanged = Application.Types.Where(t => t.CodeWasChanged()).ToHashSet()

// 'depth' represents a code metric defined on types using
// directly or indirectly any type where code was changed.
let depth = JustMyCode.Types.DepthOfIsUsingAny(typesChanged) 

from t2 in depth.DefinitionDomain where
  
!t2.CodeWasChanged() && 
  
!t2.WasAdded()

let typesChangedDirectlyUsed = t2.TypesUsed.Intersect(typesChanged) 
let depthOfUsingTypesChanged = depth[t2]
orderby depthOfUsingTypesChanged 

select new { t2, depthOfUsingTypesChanged, typesChangedDirectlyUsed }

No types matched

New methods
// <Name>New methods</Name>
from m in Application.Methods where 
 
!m.ParentType.WasAdded() &&
  
m.WasAdded()
select new { m, m.NbLinesOfCode }

No methods matched

Methods removed
// <Name>Methods removed</Name>
from m in codeBase.OlderVersion().Application.Methods where 
 
!m.ParentType.WasRemoved() &&
  
m.WasRemoved()
select new { m, m.NbLinesOfCode }

No methods matched

Methods where code was changed
// <Name>Methods where code was changed</Name>
// To visualize changes in code, right-click a matched method and select:
//  - Compare older and newer versions of source file
//  - Compare older and newer versions disassembled with Reflector

from m in Application.Methods where m.CodeWasChanged()
select new { m, m.NbLinesOfCode, 
             
oldNbLinesOfCode = m.OlderVersion().NbLinesOfCode ,
             
delta = (int?) m.NbLinesOfCode - m.OlderVersion().NbLinesOfCode }

No methods matched

Methods directly calling one or several methods changed
// <Name>Methods directly calling one or several methods changed</Name>
let methodsChanged = Application.Methods.Where(m => m.CodeWasChanged()).ToHashSet()

from m2 in JustMyCode.Methods.UsingAny(methodsChanged ) where
  
!m2.CodeWasChanged() && 
  
!m2.WasAdded()
let methodsChangedCalled = m2.MethodsCalled.Intersect(methodsChanged) 
select new { m2, methodsChangedCalled }

No methods matched

Methods indirectly calling one or several methods changed
// <Name>Methods indirectly calling one or several methods changed</Name>
let methodsChanged = Application.Methods.Where(m => m.CodeWasChanged()).ToHashSet()

// 'depth' represents a code metric defined on methods using
// directly or indirectly any method where code was changed.
let depth = JustMyCode.Methods.DepthOfIsUsingAny(methodsChanged) 

from m2 in depth.DefinitionDomain where
  
!m2.CodeWasChanged() && 
  
!m2.WasAdded()

let methodsChangedDirectlyUsed = m2.MethodsCalled.Intersect(methodsChanged) 
let depthOfUsingMethodsChanged = depth[m2]
orderby depthOfUsingMethodsChanged 

select new { m2, depthOfUsingMethodsChanged, methodsChangedDirectlyUsed }

No methods matched

New fields
// <Name>New fields</Name>
from f in Application.Fields where 
 
!f.ParentType.WasAdded() &&
  
f.WasAdded()
select new { f }

No fields matched

Fields removed
// <Name>Fields removed</Name>
from f in codeBase.OlderVersion().Application.Fields where 
 
!f.ParentType.WasRemoved() &&
  
f.WasRemoved()
select new { f }

No fields matched

Third party types that were not used and that are now used
// <Name>Third party types that were not used and that are now used</Name>
from t in ThirdParty.Types where t.IsUsedRecently()
select new { t, t.Methods, t.Fields } 

No types matched

Third party types that were used and that are not used anymore
// <Name>Third party types that were used and that are not used anymore</Name>
from t in codeBase.OlderVersion().Types where t.IsNotUsedAnymore()
select new { t, t.Methods, t.Fields }  

No types matched

Third party methods that were not used and that are now used
// <Name>Third party methods that were not used and that are now used</Name>
from m in ThirdParty.Methods where 
  
m.IsUsedRecently() &&
 
!m.ParentType.IsUsedRecently()
select m

No methods matched

Third party methods that were used and that are not used anymore
// <Name>Third party methods that were used and that are not used anymore</Name>
from m in codeBase.OlderVersion().Methods where 
  
m.IsNotUsedAnymore() &&
 
!m.ParentType.IsNotUsedAnymore()
select m

No methods matched

Third party fields that were not used and that are now used
// <Name>Third party fields that were not used and that are now used</Name>
from f in ThirdParty.Fields where 
  
f.IsUsedRecently() &&
 
!f.ParentType.IsUsedRecently()
select f

No fields matched

Third party fields that were used and that are not used anymore
// <Name>Third party fields that were used and that are not used anymore</Name>
from f in codeBase.OlderVersion().Fields where 
  
f.IsNotUsedAnymore() &&
 
!f.ParentType.IsNotUsedAnymore()
select f

No fields matched

Dead Code

Potentially dead Types
// <Name>Potentially dead Types</Name>
warnif count > 0
let typesUsedByMethods=Types.UsedByAny(Application.Methods)

// Select types unused
let typesUnused = 
   
from t in JustMyCode.Types where
   
t.NbTypesUsingMe == 0  select t

// Dead types = types used only by unused types (recursive)
let deadTypesMetric = typesUnused.FillIterative(
types => from t2 in codeBase.Application.Types.UsedByAny(types).Except(types)
         
where
               
t2.TypesUsingMe.Intersect(types).Count() == t2.NbTypesUsingMe
         
select t2)

from t3 in deadTypesMetric.DefinitionDomain where typesUsedByMethods.Contains(t3)
select new { t3, t3.TypesUsingMe, depth = deadTypesMetric[t3] }
        
        

15 types matched

typesTypesUsingMedepthFull Name
ATZColorSchemeInstaller0 type0ATZColorSchemeInstaller
ATZPluginInstaller0 type0ATZPluginInstaller
ATZDetailItemButton0 type0ATZDetailItemButton
ATZPackageCheckboxCell0 type0ATZPackageCheckboxCell
ATZPackageTableCellView0 type0ATZPackageTableCellView
ATZVersionLabel0 type0ATZVersionLabel
ATZColorSchemeInstaller0 type0ATZColorSchemeInstaller
ATZPluginInstaller0 type0ATZPluginInstaller
ATZVersionLabel0 type0ATZVersionLabel
ATZTemplateInstaller2 types1ATZTemplateInstaller
ATZShell1 type1ATZShell
ATZPbxprojParser1 type1ATZPbxprojParser
ATZTemplateInstaller2 types1ATZTemplateInstaller
ATZShell1 type1ATZShell
ATZPbxprojParser1 type1ATZPbxprojParser

Statistics

Stat   TypesUsingMe   depth
Sum:06
Average:00.4
Minimum:00
Maximum:01
Standard deviation:00.49
Variance:00.24
Potentially dead Methods
// <Name>Potentially dead Methods</Name>
warnif count > 0
// Filter procedure for methods that should'nt be considered as dead
let canMethodBeConsideredAsDeadProc = new Func<IMethod, bool>(
    
m => !m.IsGeneratedByCompiler
)

// Get methods unused
let methodsUnused = 
   
from m2 in JustMyCode.Methods where 
   
m2.NbMethodsCallingMe == 0 && 
   
canMethodBeConsideredAsDeadProc(m2)
   
select m2

// Dead methods = methods used only by unused methods (recursive)
let deadMethodsMetric = methodsUnused.FillIterative(
   
methods => // Unique loop, just to let a chance to build the hashset.
              from o in new[] { new object() }
              
// Use a hashet to make Intersect calls much faster!
              let hashset = methods.ToHashSet()
              
from m3 in codeBase.Application.Methods.UsedByAny(methods).Except(methods)
              
where canMethodBeConsideredAsDeadProc(m3) &&
                    
// Select methods called only by methods already considered as dead
                    hashset.Intersect(m3.MethodsCallingMe).Count() == m3.NbMethodsCallingMe
              
select m3)

from m4 in JustMyCode.Methods.Intersect(deadMethodsMetric.DefinitionDomain)
select new { m4, m4.MethodsCallingMe, depth = deadMethodsMetric[m4] }

149 methods matched

methodsMethodsCallingMedepthFull Name
installer()0 method0ATZColorScheme.installer()
type()0 method0ATZColorScheme.type()
requiresRestart()0 method0ATZColorScheme.requiresRestart()
extension()0 method0ATZColorScheme.extension()
iconName()0 method0ATZColorScheme.iconName()
installer()0 method0ATZFileTemplate.installer()
type()0 method0ATZFileTemplate.type()
installer()0 method0ATZPlugin.installer()
type()0 method0ATZPlugin.type()
extension()0 method0ATZPlugin.extension()
iconName()0 method0ATZPlugin.iconName()
installer()0 method0ATZProjectTemplate.installer()
type()0 method0ATZProjectTemplate.type()
installer()0 method0ATZTemplate.installer()
type()0 method0ATZTemplate.type()
requiresRestart()0 method0ATZTemplate.requiresRestart()
extension()0 method0ATZTemplate.extension()
iconName()0 method0ATZTemplate.iconName()
updateBlock2(NSData*,NSError*)0 method0ATZColorSchemeInstaller.updateBlock2(NSData*,NSError*)
downloadPackage(ATZPackage*,void(^)(NSError*))0 method0ATZColorSchemeInstaller.downloadPackage(ATZPackage*,void(^)(NSError*))
updatePackage(ATZPackage*,void(^)(NSString*,NSError*))0 method0ATZColorSchemeInstaller.updatePackage(ATZPackage*,void(^)(NSString* ,NSError*))
installPackage(ATZColorScheme*,void(^)(NSError*))0 method0ATZColorSchemeInstaller.installPackage(ATZColorScheme*,void(^) (NSError*))
downloadRelativePath()0 method0ATZColorSchemeInstaller.downloadRelativePath()
pathForInstalledPackage(ATZPackage*)0 method0ATZColorSchemeInstaller.pathForInstalledPackage(ATZPackage*)
saveColorScheme(ATZPackage*,NSData*,void(^)(NSError*))1 method1ATZColorSchemeInstaller.saveColorScheme(ATZPackage*,NSData*,void(^) (NSError*))
copyColorSchemeToXcode(ATZPackage*,void(^)(NSError*))1 method1ATZColorSchemeInstaller.copyColorSchemeToXcode(ATZPackage*,void(^) (NSError*))
createDownloadedColorsDirectoryIfNeeded()1 method1ATZColorSchemeInstaller.createDownloadedColorsDirectoryIfNeeded()
createInstalledColorsDirectoryIfNeeded()1 method1ATZColorSchemeInstaller.createInstalledColorsDirectoryIfNeeded()
installedColorSchemesPath()1 method2ATZColorSchemeInstaller.installedColorSchemesPath()
downloadRelativePath()0 method0ATZFileTemplateInstaller.downloadRelativePath()
pathForInstalledPackage(ATZPackage*)0 method0ATZFileTemplateInstaller.pathForInstalledPackage(ATZPackage*)
downloadPackage(ATZPackage*,void(^)(NSError*))0 method0ATZPluginInstaller.downloadPackage(ATZPackage*,void(^)(NSError*))
updatePackage(ATZPackage*,void(^)(NSString*,NSError*))0 method0ATZPluginInstaller.updatePackage(ATZPackage*,void(^)(NSString* ,NSError*))
installPackage(ATZPlugin*,void(^)(NSError*))0 method0ATZPluginInstaller.installPackage(ATZPlugin*,void(^)(NSError*))
downloadRelativePath()0 method0ATZPluginInstaller.downloadRelativePath()
pathForInstalledPackage(ATZPackage*)0 method0ATZPluginInstaller.pathForInstalledPackage(ATZPackage*)
reloadXcodeForPackage(ATZPackage*,void(^)(NSError*))0 method0ATZPluginInstaller.reloadXcodeForPackage(ATZPackage*,void(^)(NSError*) )
buildPlugin(ATZPlugin*,void(^)(NSError*))1 method1ATZPluginInstaller.buildPlugin(ATZPlugin*,void(^)(NSError*))
findXcodeprojPathForPlugin(ATZPlugin*)1 method2ATZPluginInstaller.findXcodeprojPathForPlugin(ATZPlugin*)
installNameFromPbxproj(ATZPackage*)1 method1ATZPluginInstaller.installNameFromPbxproj(ATZPackage*)
downloadRelativePath()0 method0ATZProjectTemplateInstaller.downloadRelativePath()
pathForInstalledPackage(ATZPackage*)0 method0ATZProjectTemplateInstaller.pathForInstalledPackage(ATZPackage*)
downloadPackage(ATZPackage*,void(^)(NSError*))0 method0ATZTemplateInstaller.downloadPackage(ATZPackage*,void(^)(NSError*))
updatePackage(ATZPackage*,void(^)(NSString*,NSError*))0 method0ATZTemplateInstaller.updatePackage(ATZPackage*,void(^)(NSString* ,NSError*))
installPackage(ATZTemplate*,void(^)(NSError*))0 method0ATZTemplateInstaller.installPackage(ATZTemplate*,void(^)(NSError*))
copyTemplatesToXcode(ATZTemplate*,void(^)(NSError*))1 method1ATZTemplateInstaller.copyTemplatesToXcode(ATZTemplate*,void(^) (NSError*))
createTemplateInstallDirectory(ATZTemplate*,NSError**)1 method2ATZTemplateInstaller.createTemplateInstallDirectory(ATZTemplate* ,NSError**)
templateFilesForClonedTemplate(ATZTemplate*)1 method2ATZTemplateInstaller.templateFilesForClonedTemplate(ATZTemplate*)
removeItemAtPath(NSString*,void(^)(NSError*))0 method0NSFileManager+Alcatraz.removeItemAtPath(NSString*,void(^)(NSError*))
taskOutput()0 method0ATZShell.taskOutput()
setTaskOutput(NSMutableData*)0 method0ATZShell.setTaskOutput(NSMutableData*)
areCommandLineToolsAvailable()0 method0ATZShell.areCommandLineToolsAvailable()
executeCommand(NSString*,NSArray*,void(^)(NSString*,NSError*))1 method2ATZShell.executeCommand(NSString*,NSArray*,void(^)(NSString*,NSError*) )
executeCommand(NSString*,NSArray*,NSString*,void(^)(NSString*,NSError* ))1 method3ATZShell.executeCommand(NSString*,NSArray*,NSString*,void(^)(NSString* ,NSError*))
setUpShellOutputForTask(NSTask*)1 method4ATZShell.setUpShellOutputForTask(NSTask*)
setUpStdErrorOutputForTask(NSTask*)1 method4ATZShell.setUpStdErrorOutputForTask(NSTask*)
setUpTerminationHandlerForTask(NSTask*,void(^)(NSString*,NSError*))1 method4ATZShell.setUpTerminationHandlerForTask(NSTask*,void(^)(NSString* ,NSError*))
tryToLaunchTask(NSTask*,void(^)(NSString*,NSError*))1 method4ATZShell.tryToLaunchTask(NSTask*,void(^)(NSString*,NSError*))
drawRect(NSRect)0 method0ATZStatusView.drawRect(NSRect)
initWithCoder(NSCoder*)0 method0ATZProgressIndicator.initWithCoder(NSCoder*)
mouseEntered(NSEvent*)0 method0ATZDetailItemButton.mouseEntered(NSEvent*)
mouseExited(NSEvent*)0 method0ATZDetailItemButton.mouseExited(NSEvent*)
resetCursorRects()0 method0ATZDetailItemButton.resetCursorRects()
awakeFromNib()0 method0ATZDetailItemButton.awakeFromNib()
createTrackingArea()1 method1ATZDetailItemButton.createTrackingArea()
xcpluginNameFromPbxproj(NSString*)1 method2ATZPbxprojParser.xcpluginNameFromPbxproj(NSString*)
drawIconForPackage(NSImage*,ATZPackage*,NSRect)1 method1ATZPackageCheckboxCell.drawIconForPackage(NSImage*,ATZPackage*,NSRect)
drawImage(NSImage*,NSRect,NSView*)0 method0ATZPackageCheckboxCell.drawImage(NSImage*,NSRect,NSView*)
installer()0 method0ATZAlcatrazPackage.installer()
update()0 method0ATZAlcatrazPackage.update()
setScreenshotButton(NSButton*)0 method0ATZPackageTableCellView.setScreenshotButton(NSButton*)
setWebsiteButton(NSButton*)0 method0ATZPackageTableCellView.setWebsiteButton(NSButton*)
awakeFromNib()0 method0ATZPackageTableCellView.awakeFromNib()
viewWillDraw()0 method0ATZPackageTableCellView.viewWillDraw()
mouseEntered(NSEvent*)0 method0ATZPackageTableCellView.mouseEntered(NSEvent*)
mouseExited(NSEvent*)0 method0ATZPackageTableCellView.mouseExited(NSEvent*)
mouseMoved(NSEvent*)0 method0ATZPackageTableCellView.mouseMoved(NSEvent*)
createTrackingArea()1 method1ATZPackageTableCellView.createTrackingArea()
showButtonsIfNeeded()2 methods1ATZPackageTableCellView.showButtonsIfNeeded()
initWithFrame(NSRect)0 method0ATZVersionLabel.initWithFrame(NSRect)
setStyle()1 method1ATZVersionLabel.setStyle()
createFakeMenu()0 method0__Globals.createFakeMenu()
clickMenuItem()0 method0__Globals.clickMenuItem()
fakeJSON()0 method0__Globals.fakeJSON()
setUpTerminationHandlerForTaskBlock1(ATZPackage*,NSDictionary*)0 method0__Globals.setUpTerminationHandlerForTaskBlock1(ATZPackage* ,NSDictionary*)
packageWithName(NSArray*,NSString*)0 method0__Globals.packageWithName(NSArray*,NSString*)
buildMockInstaller(int*)0 method0__Globals.buildMockInstaller(int*)
installer()0 method0ATZPlugin.installer()
type()0 method0ATZPlugin.type()
extension()0 method0ATZPlugin.extension()
iconName()0 method0ATZPlugin.iconName()
installer()0 method0ATZTemplate.installer()
type()0 method0ATZTemplate.type()
requiresRestart()0 method0ATZTemplate.requiresRestart()
extension()0 method0ATZTemplate.extension()
iconName()0 method0ATZTemplate.iconName()
installer()0 method0ATZAlcatrazPackage.installer()
update()0 method0ATZAlcatrazPackage.update()
installer()0 method0ATZColorScheme.installer()
type()0 method0ATZColorScheme.type()

Statistics

Stat   MethodsCallingMe   depth
Sum:080
Average:00.54
Minimum:00
Maximum:04
Standard deviation:01.07
Variance:01.13
Potentially dead Fields
// <Name>Potentially dead Fields</Name>
warnif count > 0
from f in JustMyCode.Fields where
   
f.NbMethodsUsingMe == 0 && 
   
!f.IsPublic &&     // Although not recommended, public fields might be used by client applications of your Projects.
   !f.IsEnumValue   
  
select f

2 fields matched

fieldsFull Name
requiresRestartATZPlugin.requiresRestart
requiresRestartATZPlugin.requiresRestart

Statistics

Stat
Sum:
Average:
Minimum:
Maximum:
Standard deviation:
Variance:

Trend Charts


Lines of Code


Rules Violated


Rules Violations


Max


Average


Third-Party Usage

Projects Dependencies

Assembly Depends on Is referenced by
Externals v1.0.0.0 - Alcatraz v1.0.0.0 ; AlcatrazTests v1.0.0.0 ;
Foundation v1.0.0.0 - Alcatraz v1.0.0.0 ; AlcatrazTests v1.0.0.0 ;
AppKit v1.0.0.0 - Alcatraz v1.0.0.0 ; AlcatrazTests v1.0.0.0 ;
ApplicationServices v1.0.0.0 - Alcatraz v1.0.0.0 ; AlcatrazTests v1.0.0.0 ;
CoreGraphics v1.0.0.0 - Alcatraz v1.0.0.0 ;
ImageIO v1.0.0.0 - Alcatraz v1.0.0.0 ;
CoreFoundation v1.0.0.0 - Alcatraz v1.0.0.0 ;
QuartzCore v1.0.0.0 - Alcatraz v1.0.0.0 ; AlcatrazTests v1.0.0.0 ;
Alcatraz v1.0.0.0Externals v1.0.0.0 ; Foundation v1.0.0.0 ; AppKit v1.0.0.0 ; ApplicationServices v1.0.0.0 ; CoreGraphics v1.0.0.0 ; ImageIO v1.0.0.0 ; CoreFoundation v1.0.0.0 ; QuartzCore v1.0.0.0 ; -
AlcatrazTests v1.0.0.0AppKit v1.0.0.0 ; Foundation v1.0.0.0 ; Externals v1.0.0.0 ; ApplicationServices v1.0.0.0 ; QuartzCore v1.0.0.0 ; -

Projects Build Order

  1. Alcatraz
  2. AlcatrazTests

Projects Build Order

  1. Alcatraz
  2. AlcatrazTests

Analysis Log : Information and Warnings

Here are Logs emitted during XClarify analysis.
The Warnings can reveal potential flaws concerning the health of the build process.
A particular warn can be disabled through the XClarify interactive UI, panel Error List, tick the checkbox Disabled corresponding to the warn to disable.


Kind Message
Info07/01/2014 20:48:57 Begin full analysis with XClarify v3.1.0.0
InfoNo Baseline for Comparison loaded.
Warning'Kiwi.h' file not found at /Users/macbookpro/Downloads/Alcatraz-master/AlcatrazTests/Packages/ATZPackageFactoryTests.m:24:9
Warning'Kiwi.h' file not found at /Users/macbookpro/Downloads/Alcatraz-master/AlcatrazTests/AlcatrazTests.m:24:9
Warning'Kiwi.h' file not found at /Users/macbookpro/Downloads/Alcatraz-master/AlcatrazTests/Packages/ATZPackageTests.m:9:9
InfoNo dependency cycle detected in projects referencement graph.
Info07/01/2014 20:50:23 Analyse dependencies of your application.
Info07/01/2014 20:50:23 Building the report (standard).
Info07/01/2014 20:50:32 Log trend metrics values.
Info07/01/2014 20:50:33 Execute queries and rules