Permalink
Browse files

Updating stylecop rules

  • Loading branch information...
1 parent d0ede70 commit 7fb17cda7db88338a61e5b391a0500751e53f2b5 @jrusbatch committed Sep 8, 2012
Showing with 46 additions and 2 deletions.
  1. +45 −0 Settings.StyleCop
  2. +1 −2 Web/Controllers/HomeController.cs
View
@@ -12,6 +12,11 @@
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
+ <Rule Name="DoNotUseRegions">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">True</BooleanProperty>
+ </RuleSettings>
+ </Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
@@ -242,6 +247,46 @@
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
+ <Rule Name="ConstantsMustAppearBeforeFields">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">False</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="StaticElementsMustAppearBeforeInstanceElements">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">False</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="DeclarationKeywordsMustFollowOrder">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">False</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="ProtectedMustComeBeforeInternal">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">False</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="PropertyAccessorsMustFollowOrder">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">False</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="EventAccessorsMustFollowOrder">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">False</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="StaticReadonlyElementsMustAppearBeforeStaticNonReadonlyElements">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">False</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="InstanceReadonlyElementsMustAppearBeforeInstanceNonReadonlyElements">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">False</BooleanProperty>
+ </RuleSettings>
+ </Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
@@ -3,7 +3,6 @@
using System.Text;
using System.Web.Mvc;
using System.Web.Routing;
-using Compilify.DataAccess;
using Compilify.LanguageServices;
using Compilify.Models;
using Compilify.Web.Models;
@@ -62,7 +61,7 @@ public ActionResult Show(string slug, int? version)
if (version <= 1)
{
// Redirect the user to /:slug instead of /:slug/1
- return RedirectToActionPermanent("Show", "Home", new { slug = slug, version = (int?)null });
+ return RedirectToActionPermanent("Show", "Home", new { slug, version = (int?)null });
}
version = version ?? 1;

0 comments on commit 7fb17cd

Please sign in to comment.