-
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If file has no preprocessor symbols, only format it once (#560)
* Don't format a document with no preprocessor symbols twice. closes #555 * Fixing edge case that showed up after we no longer format a file twice in a row
- Loading branch information
Showing
9 changed files
with
51 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,3 +50,5 @@ publish | |
*.actual.cst | ||
*.vsix | ||
/.husky/pre-commit | ||
|
||
debug.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
Src/CSharpier.Tests/FormattingTests/TestFiles/ClassDeclarations_EdgeCase.cst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
public class ClassName { | ||
|
||
} | ||
|
||
public class ClassName | ||
{ | ||
} |
3 changes: 3 additions & 0 deletions
3
Src/CSharpier.Tests/FormattingTests/TestFiles/ClassDeclarations_EdgeCase.expected.cst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
public class ClassName { } | ||
|
||
public class ClassName { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System.Diagnostics; | ||
|
||
namespace CSharpier; | ||
|
||
public class DebugLogger | ||
{ | ||
[Conditional("DEBUG")] | ||
public static void Log(string message) | ||
{ | ||
try | ||
{ | ||
File.AppendAllText(@"C:\projects\csharpier\debug.txt", message + "\n"); | ||
} | ||
catch (Exception) | ||
{ | ||
// we don't care if this fails | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters