SlideShare a Scribd company logo
1 of 27
Assuring the Code Quality of SharePoint Solutions and Apps 
Matthias Einig, MVPRENCORE AB
Who is that guy? 
matthias.einig@rencore.se 
www.matthiaseinig.de 
Matthias Einig 
CEO, SharePoint MVP 
Stockholm, Sweden
What is Code Quality? 
Source: Consortium for IT Software Quality 
•Reliability 
•Security 
•Efficiency 
•Maintainability 
•Size
Why should we care? 
•Avoid bugs 
•Reduce effort (coding & testing) 
•Improve maintainability 
•Prepare for changes/upgrade 
•Increase team flexibility 
Code Quality can’t be easily added later!
How to measure Code Quality? 
•Architectural standards 
•Coding Practices 
•Complexity 
•Documentation 
•Portability 
•Tech./Func. Volume 
Reliability 
Security 
Efficiency 
Maintainability 
Size
How to analyse Code Quality? 
•Static vs. Dynamic 
•Source Code vs. Object Code 
•Manual vs. Automated 
•Ad hoc vs. Continuously
Why is it important for SharePoint? 
•Solutions / apps are black boxes 
•Code quality differs a lot 
•Solutions change (ALM) 
•Complexity 
•Policies / Best Practices 
•Dev Teams Change 
•Farm stability / security / licensing
So, what is SharePoint Code? 
.NET code 
XML: Manifest, Features, Content Types, Templates 
HTML, ASPX, ASCX 
CSS, JavaScript 
Images, resources, document templates… 
Deployment locations!
Is my code 
correctand followsbest practices? 
Developer 
Is the codewelldesignedand maintainable? 
Architect 
Does the codecomplywithcompanypoliciesand standards? 
Quality Manager 
Who needs it and why? 
Will the code 
harm my farm? 
Administrator
What Tools do we have?` 
ObjectCodeFxCop/VSCA 
FxCop Metrics 
CAT.net 
SourceCode StyleCop 
SPCode SPDisposeCheck 
MSOCAF 
Checks against general coding errors (not SharePoint-specific) 
Calculates code metrics (only.NET code, not SharePoint specific) 
Checks codingstyle guidelines(only .NET code, not SharePoint specific) 
Analyzescode security 
(not SharePoint-specific) 
Checks memory leaks 
(SharePoint-specific) 
Combination of FxCop and SPDisposeCheck for SharePoint Online
The Gap… 
What’smissing? 
•Analyze SharePoint specific code quality! 
•Analyze SharePoint dependencies! 
•Gather SharePoint metrics! 
•Documentthe SharePoint solution / app! 
•Assess the migratabilityto the app model!
CommericalProducts 
Free version 
SPCopCommunity Edition 
Free version 
SPCAF Migration Assessment
CODE ANALYSISWITH SPCAF
•RunSPCAF manuallyor on solution build 
•Doubleclickresultsin ErrorList to openthe lineofcode 
SPCAF in Visual Studio
SPCAF Client Application
Use predefined rulesetse.g. SP2013 Compatibility 
Create your own ruleset 
Enable/disable rules 
Adjust severity of notifications 
Information 
Warning 
Error 
Configure Rulesets
Run SPCAF in TeamBuildas Quality Gate 
•Custom Build Activity 
•Supports TFS 2010/2012/2013, VS Online, Team City etc. 
Build in TFS on-premises 
Build in Visual Studio Online 
Continuous Integration
DEVELOP CUSTOM RULES
Youwantto ruleyourself? (1) usingSPCAF.Sdk; usingSPCAF.Sdk.Rules; usingSPCAF.Sdk.Model; usingSPCAF.Sdk.Model.Extensions; 
1.Createemptyclasslibrary 
2.AddSPCAF.SDK.dll assemblyreference 
3.Createclassand addusings 
4.Add methodstubby inheritingfrom ”Rule” namespaceSP24.Rules{ publicclassFeatureNameStartsWithSP24: Rule<FeatureDefinition> { publicoverridevoidVisit(FeatureDefinitiontarget, NotificationCollectionnotifications) {} }}
5.Add RuleMetadatanamespaceSP24.Rules{ [RuleMetadata(typeof(Naming), CheckId= "SPC99001", DisplayName= "Feature name should start with SP24", Description = "A feature name should be prefixed with 'SP24'.", DefaultSeverity= Severity.Warning, SharePointVersion= newstring[] { "12", "14", "15"}, Message = "Feature '{0}' should start with 'SP24'.", Resolution = "Change the folder name of the feature and add the name at the beginning, e.g.‘SP24.Intranet.Components.ContentTypesFeature'.")] publicclassFeatureNameStartsWithSP24: Rule<FeatureDefinition> { ... 
Youwantto ruleyourself? (2)
7.Build and drop the assembly into the SPCAF installation folderpublicclassFeatureNameStartsWithSP24: Rule<FeatureDefinition> { publicoverridevoidVisit(FeatureDefinitiontarget, NotificationCollectionnotifications) { if(!target.FeatureName.StartsWith("SP24")) { stringmessage = string.Format(this.MessageTemplate(), target.FeatureName); Notify(target, message, notifications); } } } 
6.Implement the rule 
Youwantto ruleyourself? (3)
Summary 
•Code Quality must notbe a fluke! 
•Helps you to find problems earlier 
•Saves yourtime & money 
•Prepares you for changes and upgrades 
•QA can be implemented in several steps 
Also check out my session: 
SharePoint Continuous Integration with VS Online and Azure 
D2S3DEV 10/16/201411:30 AM
References 
•SharePoint Code Analysis Frameworkspcaf.com 
•FreeSPCopCode Checkgo.spcaf.com/spcopceI 
•FreeSPCAF Code Migration Assessmentgo.spcaf.com/spcafma 
•SharePoint health check: Extracting SP Customizationsurl.spcaf.com/extract
questions? 
WWW.MATTHIASEINIG.DE 
@MATTEIN
thank you. 
SHAREPOINT AND PROJECT CONFERENCE ADRIATICS 
ZAGREB, 10/15/2014 -10/16/2014

More Related Content

More from Matthias Einig

SPS Helsinki: Transforming SharePoint Farm Solutions to the App Model
SPS Helsinki: Transforming SharePoint Farm Solutions to the App ModelSPS Helsinki: Transforming SharePoint Farm Solutions to the App Model
SPS Helsinki: Transforming SharePoint Farm Solutions to the App ModelMatthias Einig
 
Transforming SharePoint Farm Solutions to the App Model #SPSSTHLM23
Transforming SharePoint Farm Solutions to the App Model #SPSSTHLM23Transforming SharePoint Farm Solutions to the App Model #SPSSTHLM23
Transforming SharePoint Farm Solutions to the App Model #SPSSTHLM23Matthias Einig
 
Developing high quality SharePoint solutions/apps with SPCAF #SP24
Developing high quality SharePoint solutions/apps with SPCAF #SP24Developing high quality SharePoint solutions/apps with SPCAF #SP24
Developing high quality SharePoint solutions/apps with SPCAF #SP24Matthias Einig
 
Keynote - The future of SharePoint - SPC14 recap
Keynote - The future of SharePoint - SPC14 recapKeynote - The future of SharePoint - SPC14 recap
Keynote - The future of SharePoint - SPC14 recapMatthias Einig
 
SPSOslo: Automated code quality analysis of SharePoint solutions
SPSOslo: Automated code quality analysis of SharePoint solutionsSPSOslo: Automated code quality analysis of SharePoint solutions
SPSOslo: Automated code quality analysis of SharePoint solutionsMatthias Einig
 
Professional SharePoint Solution Deployment with PowerShell
Professional SharePoint Solution Deployment with PowerShellProfessional SharePoint Solution Deployment with PowerShell
Professional SharePoint Solution Deployment with PowerShellMatthias Einig
 
SPSD SharePoint Solution Deployer
SPSD SharePoint Solution DeployerSPSD SharePoint Solution Deployer
SPSD SharePoint Solution DeployerMatthias Einig
 
SSUG: SharePoint Application Lifecycle Management
SSUG: SharePoint Application Lifecycle ManagementSSUG: SharePoint Application Lifecycle Management
SSUG: SharePoint Application Lifecycle ManagementMatthias Einig
 

More from Matthias Einig (9)

SPS Helsinki: Transforming SharePoint Farm Solutions to the App Model
SPS Helsinki: Transforming SharePoint Farm Solutions to the App ModelSPS Helsinki: Transforming SharePoint Farm Solutions to the App Model
SPS Helsinki: Transforming SharePoint Farm Solutions to the App Model
 
Transforming SharePoint Farm Solutions to the App Model #SPSSTHLM23
Transforming SharePoint Farm Solutions to the App Model #SPSSTHLM23Transforming SharePoint Farm Solutions to the App Model #SPSSTHLM23
Transforming SharePoint Farm Solutions to the App Model #SPSSTHLM23
 
Developing high quality SharePoint solutions/apps with SPCAF #SP24
Developing high quality SharePoint solutions/apps with SPCAF #SP24Developing high quality SharePoint solutions/apps with SPCAF #SP24
Developing high quality SharePoint solutions/apps with SPCAF #SP24
 
Keynote - The future of SharePoint - SPC14 recap
Keynote - The future of SharePoint - SPC14 recapKeynote - The future of SharePoint - SPC14 recap
Keynote - The future of SharePoint - SPC14 recap
 
SPSOslo: Automated code quality analysis of SharePoint solutions
SPSOslo: Automated code quality analysis of SharePoint solutionsSPSOslo: Automated code quality analysis of SharePoint solutions
SPSOslo: Automated code quality analysis of SharePoint solutions
 
Professional SharePoint Solution Deployment with PowerShell
Professional SharePoint Solution Deployment with PowerShellProfessional SharePoint Solution Deployment with PowerShell
Professional SharePoint Solution Deployment with PowerShell
 
Developing for SP2013
Developing for SP2013Developing for SP2013
Developing for SP2013
 
SPSD SharePoint Solution Deployer
SPSD SharePoint Solution DeployerSPSD SharePoint Solution Deployer
SPSD SharePoint Solution Deployer
 
SSUG: SharePoint Application Lifecycle Management
SSUG: SharePoint Application Lifecycle ManagementSSUG: SharePoint Application Lifecycle Management
SSUG: SharePoint Application Lifecycle Management
 

Recently uploaded

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 

Recently uploaded (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

Assuring the Code Quality of SharePoint Solutions and Apps

  • 1. Assuring the Code Quality of SharePoint Solutions and Apps Matthias Einig, MVPRENCORE AB
  • 2.
  • 3. Who is that guy? matthias.einig@rencore.se www.matthiaseinig.de Matthias Einig CEO, SharePoint MVP Stockholm, Sweden
  • 4. What is Code Quality? Source: Consortium for IT Software Quality •Reliability •Security •Efficiency •Maintainability •Size
  • 5. Why should we care? •Avoid bugs •Reduce effort (coding & testing) •Improve maintainability •Prepare for changes/upgrade •Increase team flexibility Code Quality can’t be easily added later!
  • 6.
  • 7. How to measure Code Quality? •Architectural standards •Coding Practices •Complexity •Documentation •Portability •Tech./Func. Volume Reliability Security Efficiency Maintainability Size
  • 8. How to analyse Code Quality? •Static vs. Dynamic •Source Code vs. Object Code •Manual vs. Automated •Ad hoc vs. Continuously
  • 9. Why is it important for SharePoint? •Solutions / apps are black boxes •Code quality differs a lot •Solutions change (ALM) •Complexity •Policies / Best Practices •Dev Teams Change •Farm stability / security / licensing
  • 10. So, what is SharePoint Code? .NET code XML: Manifest, Features, Content Types, Templates HTML, ASPX, ASCX CSS, JavaScript Images, resources, document templates… Deployment locations!
  • 11. Is my code correctand followsbest practices? Developer Is the codewelldesignedand maintainable? Architect Does the codecomplywithcompanypoliciesand standards? Quality Manager Who needs it and why? Will the code harm my farm? Administrator
  • 12. What Tools do we have?` ObjectCodeFxCop/VSCA FxCop Metrics CAT.net SourceCode StyleCop SPCode SPDisposeCheck MSOCAF Checks against general coding errors (not SharePoint-specific) Calculates code metrics (only.NET code, not SharePoint specific) Checks codingstyle guidelines(only .NET code, not SharePoint specific) Analyzescode security (not SharePoint-specific) Checks memory leaks (SharePoint-specific) Combination of FxCop and SPDisposeCheck for SharePoint Online
  • 13. The Gap… What’smissing? •Analyze SharePoint specific code quality! •Analyze SharePoint dependencies! •Gather SharePoint metrics! •Documentthe SharePoint solution / app! •Assess the migratabilityto the app model!
  • 14. CommericalProducts Free version SPCopCommunity Edition Free version SPCAF Migration Assessment
  • 16. •RunSPCAF manuallyor on solution build •Doubleclickresultsin ErrorList to openthe lineofcode SPCAF in Visual Studio
  • 18. Use predefined rulesetse.g. SP2013 Compatibility Create your own ruleset Enable/disable rules Adjust severity of notifications Information Warning Error Configure Rulesets
  • 19. Run SPCAF in TeamBuildas Quality Gate •Custom Build Activity •Supports TFS 2010/2012/2013, VS Online, Team City etc. Build in TFS on-premises Build in Visual Studio Online Continuous Integration
  • 21. Youwantto ruleyourself? (1) usingSPCAF.Sdk; usingSPCAF.Sdk.Rules; usingSPCAF.Sdk.Model; usingSPCAF.Sdk.Model.Extensions; 1.Createemptyclasslibrary 2.AddSPCAF.SDK.dll assemblyreference 3.Createclassand addusings 4.Add methodstubby inheritingfrom ”Rule” namespaceSP24.Rules{ publicclassFeatureNameStartsWithSP24: Rule<FeatureDefinition> { publicoverridevoidVisit(FeatureDefinitiontarget, NotificationCollectionnotifications) {} }}
  • 22. 5.Add RuleMetadatanamespaceSP24.Rules{ [RuleMetadata(typeof(Naming), CheckId= "SPC99001", DisplayName= "Feature name should start with SP24", Description = "A feature name should be prefixed with 'SP24'.", DefaultSeverity= Severity.Warning, SharePointVersion= newstring[] { "12", "14", "15"}, Message = "Feature '{0}' should start with 'SP24'.", Resolution = "Change the folder name of the feature and add the name at the beginning, e.g.‘SP24.Intranet.Components.ContentTypesFeature'.")] publicclassFeatureNameStartsWithSP24: Rule<FeatureDefinition> { ... Youwantto ruleyourself? (2)
  • 23. 7.Build and drop the assembly into the SPCAF installation folderpublicclassFeatureNameStartsWithSP24: Rule<FeatureDefinition> { publicoverridevoidVisit(FeatureDefinitiontarget, NotificationCollectionnotifications) { if(!target.FeatureName.StartsWith("SP24")) { stringmessage = string.Format(this.MessageTemplate(), target.FeatureName); Notify(target, message, notifications); } } } 6.Implement the rule Youwantto ruleyourself? (3)
  • 24. Summary •Code Quality must notbe a fluke! •Helps you to find problems earlier •Saves yourtime & money •Prepares you for changes and upgrades •QA can be implemented in several steps Also check out my session: SharePoint Continuous Integration with VS Online and Azure D2S3DEV 10/16/201411:30 AM
  • 25. References •SharePoint Code Analysis Frameworkspcaf.com •FreeSPCopCode Checkgo.spcaf.com/spcopceI •FreeSPCAF Code Migration Assessmentgo.spcaf.com/spcafma •SharePoint health check: Extracting SP Customizationsurl.spcaf.com/extract
  • 27. thank you. SHAREPOINT AND PROJECT CONFERENCE ADRIATICS ZAGREB, 10/15/2014 -10/16/2014