Skip to content

Commit

Permalink
Merge branch 'master' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
codecadwallader committed Dec 9, 2018
2 parents 43361ef + bd7300f commit 3ff9df5
Show file tree
Hide file tree
Showing 23 changed files with 209 additions and 66 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Expand Up @@ -5,12 +5,23 @@
These changes have not been released to the Visual Studio marketplace, but (if checked) are available in preview within the [CI build](http://vsixgallery.com/extension/4c82e17d-927e-42d2-8460-b473ac7df316/).

- [ ] Features

- [ ] Fixes

## Previous Releases

These are the changes to each version that has been released to the Visual Studio marketplace.

## 10.6

**2018-12-09**

- [x] Features
- [x] [#582](https://github.com/codecadwallader/codemaid/pull/582) - Digging: New option to show item types (e.g. method return or property type) - thanks [GammaWolf](https://github.com/GammaWolf)!
- [x] [#593](https://github.com/codecadwallader/codemaid/pull/593) - Switching: Add .cshtml -> .cshtml.cs to defaults - thanks [derekmckinnon](https://github.com/derekmckinnon)!
- [x] [#594](https://github.com/codecadwallader/codemaid/pull/594) - Cleaning: New option to add blank lines before/after single-line fields - thanks [jasonjtyler](https://github.com/jasonjtyler)!
- [x] [#604](https://github.com/codecadwallader/codemaid/pull/604) - Turn on VS2019 support - thanks [digovc](https://github.com/digovc)!

## 10.5

**2018-06-09**
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Expand Up @@ -2,7 +2,7 @@

Looking to contribute something? **Here's how you can help.**

Please read http://www.codemaid.net/contribute/ for setup and a quick code overview
Please read http://www.codemaid.net/contribute/ for setup and a quick code overview.

Following these guidelines helps to communicate that you respect the time of
the developers managing and developing this open source project. In return,
Expand All @@ -17,7 +17,7 @@ The issue tracker is the preferred channel for [bug reports](#bug-reports),
[submitting pull requests](#pull-requests), but please respect the
following restrictions:

* Please **do not** use the issue tracker for personal support requests. Stack
* Please **do not** use the issue tracker for personal support requests. Stack
Overflow is a better place to get help.

* Please **do not** derail or troll issues. Keep the discussion on topic and
Expand All @@ -42,7 +42,7 @@ Guidelines for bug reports:

3. **Isolate the problem** — ideally create an
[SSCCE](http://www.sscce.org/) and a live example.
Uploading the project on cloud storage (OneDrive, DropBox, et el.)
Uploading the project on cloud storage (OneDrive, DropBox, et al.)
or creating a sample GitHub repository is also helpful.


Expand Down
32 changes: 31 additions & 1 deletion CodeMaid.UnitTests/Formatting/XmlFormattingTests.cs
Expand Up @@ -52,6 +52,7 @@ public void XmlFormattingTests_AddSpaceToTagContentWithSelfClosingTag()

Settings.Default.Formatting_CommentXmlSplitSummaryTagToMultipleLines = false;
Settings.Default.Formatting_CommentXmlSpaceTags = true;
Settings.Default.Formatting_CommentXmlSpaceSingleTags = false;

CommentFormatHelper.AssertEqualAfterFormat(input, expected);
}
Expand All @@ -68,13 +69,14 @@ public void XmlFormattingTests_AddSpaceToTagContentWithSelfClosingTagMultiline()

Settings.Default.Formatting_CommentXmlSplitSummaryTagToMultipleLines = true;
Settings.Default.Formatting_CommentXmlSpaceTags = true;
Settings.Default.Formatting_CommentXmlSpaceSingleTags = false;

CommentFormatHelper.AssertEqualAfterFormat(input, expected);
}

[TestMethod]
[TestCategory("Formatting UnitTests")]
public void XmlFormattingTests_AddSpaceToTagContentShouldLeaveNoTrailingWhitespace()
public void XmlFormattingTests_AddSpaceToTagContentShouldLeaveNoTrailingWhitespace1()
{
var input = "<summary>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</summary>";
var expected =
Expand All @@ -90,6 +92,29 @@ public void XmlFormattingTests_AddSpaceToTagContentShouldLeaveNoTrailingWhitespa
CommentFormatHelper.AssertEqualAfterFormat(input, expected);
}

[TestMethod]
[TestCategory("Formatting UnitTests")]
[Ignore] // This is temporarily ignored until a better fix for #564 is found.
public void XmlFormattingTests_AddSpaceToTagContentShouldLeaveNoTrailingWhitespace2()
{
var input =
"<remarks>" + Environment.NewLine +
"Lorem ipsum dolor sit amet, consectetur adipiscing elit." + Environment.NewLine +
"</remarks>";

var expected =
"<remarks>" + Environment.NewLine +
" Lorem ipsum dolor sit amet, consectetur" + Environment.NewLine +
" adipiscing elit." + Environment.NewLine +
"</remarks>";

Settings.Default.Formatting_CommentWrapColumn = 50;
Settings.Default.Formatting_CommentXmlValueIndent = 4;
Settings.Default.Formatting_CommentXmlSpaceTags = true;

CommentFormatHelper.AssertEqualAfterFormat(input, expected);
}

[TestMethod]
[TestCategory("Formatting UnitTests")]
public void XmlFormattingTests_AllRootLevelTagsOnNewLine()
Expand Down Expand Up @@ -185,6 +210,7 @@ public void XmlFormattingTests_DoesIndentAfterLiteralContent()

Settings.Default.Formatting_CommentXmlValueIndent = 4;
Settings.Default.Formatting_CommentXmlKeepTagsTogether = true;
Settings.Default.Formatting_CommentXmlSpaceSingleTags = false;

// First pass.
var result = CommentFormatHelper.AssertEqualAfterFormat(input, expected);
Expand Down Expand Up @@ -264,6 +290,7 @@ public void XmlFormattingTests_DoNotAutoExpandTags()
var input = "<summary/>";

Settings.Default.Formatting_CommentXmlSplitSummaryTagToMultipleLines = false;
Settings.Default.Formatting_CommentXmlSpaceSingleTags = false;

CommentFormatHelper.AssertEqualAfterFormat(input);
}
Expand Down Expand Up @@ -350,6 +377,8 @@ public void XmlFormattingTests_InterpunctionNoSpacing()
{
var input = "<test>Line with <interpunction/>.</test>";

Settings.Default.Formatting_CommentXmlSpaceSingleTags = false;

CommentFormatHelper.AssertEqualAfterFormat(input);
}

Expand Down Expand Up @@ -405,6 +434,7 @@ public void XmlFormattingTests_RemoveSpaceFromInsideTags()
var expected = "<summary><see/></summary>";

Settings.Default.Formatting_CommentXmlSplitSummaryTagToMultipleLines = false;
Settings.Default.Formatting_CommentXmlSpaceSingleTags = false;

CommentFormatHelper.AssertEqualAfterFormat(input, expected);
}
Expand Down
Binary file modified CodeMaid/Integration/Images/about.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified CodeMaid/Integration/Images/about.xcf
Binary file not shown.
8 changes: 6 additions & 2 deletions CodeMaid/Logic/Cleaning/InsertBlankLinePaddingLogic.cs
Expand Up @@ -77,7 +77,9 @@ internal bool ShouldBePrecededByBlankLine(BaseCodeItem codeItem)
return Settings.Default.Cleaning_InsertBlankLinePaddingBeforeEvents;

case KindCodeItem.Field:
return codeItem.IsMultiLine && Settings.Default.Cleaning_InsertBlankLinePaddingBeforeFieldsMultiLine;
return codeItem.IsMultiLine
? Settings.Default.Cleaning_InsertBlankLinePaddingBeforeFieldsMultiLine
: Settings.Default.Cleaning_InsertBlankLinePaddingBeforeFieldsSingleLine;

case KindCodeItem.Interface:
return Settings.Default.Cleaning_InsertBlankLinePaddingBeforeInterfaces;
Expand Down Expand Up @@ -138,7 +140,9 @@ internal bool ShouldBeFollowedByBlankLine(BaseCodeItem codeItem)
return Settings.Default.Cleaning_InsertBlankLinePaddingAfterEvents;

case KindCodeItem.Field:
return codeItem.IsMultiLine && Settings.Default.Cleaning_InsertBlankLinePaddingAfterFieldsMultiLine;
return codeItem.IsMultiLine
? Settings.Default.Cleaning_InsertBlankLinePaddingAfterFieldsMultiLine
: Settings.Default.Cleaning_InsertBlankLinePaddingAfterFieldsSingleLine;

case KindCodeItem.Interface:
return Settings.Default.Cleaning_InsertBlankLinePaddingAfterInterfaces;
Expand Down
9 changes: 9 additions & 0 deletions CodeMaid/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions CodeMaid/Properties/Resources.en-US.resx
Expand Up @@ -771,6 +771,9 @@
<data name="ShowItemMetadata" xml:space="preserve">
<value>Show item metadata</value>
</data>
<data name="ShowItemTypes" xml:space="preserve">
<value>Show item types</value>
</data>
<data name="ShowMethodParameters" xml:space="preserve">
<value>Show method parameters</value>
</data>
Expand Down
13 changes: 8 additions & 5 deletions CodeMaid/Properties/Resources.resx
Expand Up @@ -20,13 +20,13 @@
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Expand Down Expand Up @@ -771,6 +771,9 @@
<data name="ShowItemMetadata" xml:space="preserve">
<value>Show item metadata</value>
</data>
<data name="ShowItemTypes" xml:space="preserve">
<value>Show item types</value>
</data>
<data name="ShowMethodParameters" xml:space="preserve">
<value>Show method parameters</value>
</data>
Expand Down
3 changes: 3 additions & 0 deletions CodeMaid/Properties/Resources.zh-Hans.resx
Expand Up @@ -771,6 +771,9 @@
<data name="ShowItemMetadata" xml:space="preserve">
<value>显示项目元数据</value>
</data>
<data name="ShowItemTypes" xml:space="preserve">
<value>显示项目类型</value>
</data>
<data name="ShowMethodParameters" xml:space="preserve">
<value>显示方法参数</value>
</data>
Expand Down
40 changes: 38 additions & 2 deletions CodeMaid/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion CodeMaid/Properties/Settings.settings
Expand Up @@ -329,6 +329,9 @@
<Setting Name="Digging_ShowItemMetadata" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="Digging_ShowItemTypes" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="Digging_ShowMethodParameters" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
Expand Down Expand Up @@ -480,7 +483,7 @@
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="Switching_RelatedFileExtensionsExpression" Type="System.String" Scope="User">
<Value Profile="(Default)">.cpp .h||.xaml .xaml.cs||.xml .xsd||.ascx .ascx.cs||.aspx .aspx.cs||.master .master.cs</Value>
<Value Profile="(Default)">.cpp .h||.xaml .xaml.cs||.xml .xsd||.ascx .ascx.cs||.aspx .aspx.cs||.master .master.cs||.cshtml .cshtml.cs</Value>
</Setting>
<Setting Name="ThirdParty_OtherCleaningCommandsExpression" Type="System.String" Scope="User">
<Value Profile="(Default)" />
Expand Down Expand Up @@ -555,5 +558,11 @@
&lt;string&gt;ReSharper enable &lt;/string&gt;
&lt;/ArrayOfString&gt;</Value>
</Setting>
<Setting Name="Cleaning_InsertBlankLinePaddingBeforeFieldsSingleLine" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="Cleaning_InsertBlankLinePaddingAfterFieldsSingleLine" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>

0 comments on commit 3ff9df5

Please sign in to comment.