Allgemein Für Administratoren Für Architekten Für Entwickler Für Projektleiter Für Tester News Produkte Publikationen
Jan Mattner

Jan Mattner

New feature for AIT Apply Company Policy: include and exlude projects

Dienstag, 19. August 2014

Coding guidelines are very useful and should be enforced wherever possible. The free tool AIT Apply Company Policy (ACP), which we already presented in another blog entry, can help here. But there might be some guidelines or rules that should be applied to only some projects or to all except some projects. This is now possible with the new version of AIT Apply Company Policy, which is available in the download section.

For example one could create an ACP package that will be applied to all projects, but for all test projects the documentation should not be created. Then the respective section in the CompanyPolicy.config could look like this:

<Documentation exclude="*.Test"> 
    <Configuration Name="Debug" enabled="true" /> 
    <Configuration Name="Release" enabled="true" />    
    <Configuration Name="Staging" enabled="true" /> 

The exclude attribute determines that in all projects ending with „.Test“ the documentation will not be created.

In another scenario one could create an ACP package which should be applied only to test projects, e.g. specific rules for the static code analysis, and one has to make sure that this package can really be applied only to test projects. This is possible using the following entry:

<StaticCodeAnalysis includeOnly="*.Test"> 
    <Configuration Name="Debug" enabled="true" ruleSet="AIT.ruleset" /> 
    <Configuration Name="Release" enabled="true" ruleSet="AIT.ruleset" />     
    <Configuration Name="Staging" enabled="true" ruleSet="AIT.ruleset"/> 

Here the includeOnly attribute defines that the rules for the static code analysis is applied only to projects ending with „.Test“.

Furthermore it is possible to combine both of these attributes. This way, one can apply rules e.g. only to projects whose name contains „Infrastructure“ but does not end with „.Test“.

Verwandte Artikel:

Benötigen Sie Unterstützung bei der Software-Entwicklung und Architektur von .NET basierten Lösungen oder bei Einführung und Anpassung von Visual Studio / Microsoft Test Manager / Team Foundation Server?

Wir stehen Ihnen unter info(at) gerne zur Verfügung.

Tags: , , , , , , , , ,

Hinterlasse eine Antwort