Warning: strpos(): needle is not a string or an integer in /customers/a/f/c/fjorden.se/httpd.www/joel/index.php on line 31
Warning: strpos(): needle is not a string or an integer in /customers/a/f/c/fjorden.se/httpd.www/joel/index.php on line 37

Blog by Joel Fjordén a.k.a. Will o Wisp

Blog by Joel Fjordén a.k.a. Will o Wisp

Code Style Enforcer 3.0.43 Supporting DXCore 10.2.3

Sunday, December 12, 2010, 07:45 PM - Code Style Enforcer

This is simply a rebuild of Code Style Enforcer version 3.0.32 in order to support the new version of DXCore 10.2.3.

I thought I was going to enlighten you all of what's currently going on with Code Style Enforcer.

Right now I'm looking into a more flexible code rule system, where it should be possible to fine tune rules based on a combination of code type (field, method, etc.), visibility (public, private, etc.) and keyword (static, readonly, const, virtual, etc.).

My thought is that it should also be possible to choose the current standard, and easier, configuration of name rules, but that it also should be possible to specify custom regular expressions, probably resulting in the loss of automatic name corrections or suggestions.

The other relatively large implementation feature is to enable Code Style Enforcer to enforce the rules during MSBuild, either inside Visual Studio or through the command-line, e.g. automatic build server. Inside Visual Studio the violations will be added to the Error List tool window as either warnings or errors depending on configuration.

I think and hope these features are something you all have use for, but please let me know if anything else comes to your mind.

Here is the latest and so far the greatest version of Code Style Enforcer for Visual Studio 2010, closing in on all the features from Code Style Enforcer for Visual Studio 2008, but with some improvements of course.

Code Style Enforcer 3.0.32 requires the latest version of DXCore, that is 10.1.7.

New Features

• New UI for configuring code rules, utilizing grids to get a uniform view for all different rule types while also making the configuration easier to extend for a future and more flexible rule system.

• Code rules, for a specific solution, are now configurable from within Visual Studio 2010, through Code Style Enforcer -> Properties from the solution node's context menu in the Solution Explorer.

• Code Style Enforcer Configurator converted to a WPF application using the new rule configuration pages.

• Possible to configure different interface implementation rules for properties, methods and events.

Bug Fixes

• Probable prefix, in a name rule violation, was not removed from name when automatically suggesting a new name.

• Loading the default rules did not work when the local rules were the same as the global rules, i.e. the global rules were linked into the solution.

Breaking Changes

• Due to changes in the code rule definitions, any old customized code rules will get backed up and the default rules will instead be loaded, when opening Code Style Enforcer Configurator or a previously Code Style Enforcer activated solution.

Since I'm now back at work, since a couple of weeks, after a very relaxing vacation, I've also managed to get the time to add some missing, and improved, features to Code Style Enforcer for Visual Studio 2010.

Code Style Enforcer 3.0.17 Beta

New Features

• Activation/Deactivation of Code Style Enforcer can now be done for the complete solution and for specific projects. The "Active" command is available from the context menu when right-clicking on the solution node or a project node in the Solution Explorer.

• Generate reports functionality added for generating an XML file containing all rule violations for the complete solution. Different XSL style sheets can then be used for a proper presentation of the data. The "Generate Report..." command is available from the context menu when right-clicking on the solution node in the Solution Explorer.

Bug Fixes

• Code Style Enforcer Configurator could crash when trying to save rules to a read-only location.

• The wrong violation description was presented for name rules where no prefix was allowed.

Known Issues (some missing features from the previous releases)

• No user interface for changing the code rules inside Visual Studio, but it can still be done using the Code Style Enforcer Configurator application or manually by editing the XML rule files.