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
 
Developing for SP2013
Developing for SP2013Developing for SP2013
Developing for SP2013Matthias 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

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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
 
🐬 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
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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
 
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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel AraĂşjo
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 

Recently uploaded (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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...
 
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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

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