-
-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue Formatting Region #1197
Comments
Found a solutionApparently the issue was the changing the code to this: internal class TMessages : TEntity<int>
{
#region Properties
[System.Diagnostics.CodeAnalysis.SuppressMessage(
"Style",
"IDE1006:Naming Styles",
Justification = "Naming necessario per l'interpolazione delle colonne a partire dalla proprietà"
)]
// csharpier-ignore
public string sender { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage(
"Style",
"IDE1006:Naming Styles",
Justification = "Naming necessario per l'interpolazione delle colonne a partire dalla proprietà"
)]
// csharpier-ignore
public List<string> receivers { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage(
"Style",
"IDE1006:Naming Styles",
Justification = "Naming necessario per l'interpolazione delle colonne a partire dalla proprietà"
)]
// csharpier-ignore
public List<string>? copy_receivers { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage(
"Style",
"IDE1006:Naming Styles",
Justification = "Naming necessario per l'interpolazione delle colonne a partire dalla proprietà"
)]
// csharpier-ignore
public string date_reception { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage(
"Style",
"IDE1006:Naming Styles",
Justification = "Naming necessario per l'interpolazione delle colonne a partire dalla proprietà"
)]
// csharpier-ignore
public string subject { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage(
"Style",
"IDE1006:Naming Styles",
Justification = "Naming necessario per l'interpolazione delle colonne a partire dalla proprietà"
)]
// csharpier-ignore
public List<string>? attachment_s3_key { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage(
"Style",
"IDE1006:Naming Styles",
Justification = "Naming necessario per l'interpolazione delle colonne a partire dalla proprietà"
)]
// csharpier-ignore
public string? content { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage(
"Style",
"IDE1006:Naming Styles",
Justification = "Naming necessario per l'interpolazione delle colonne a partire dalla proprietà"
)]
// csharpier-ignore
public bool disabled { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage(
"Style",
"IDE1006:Naming Styles",
Justification = "Naming necessario per l'interpolazione delle colonne a partire dalla proprietà"
)]
// csharpier-ignore
public int message_type_id { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage(
"Style",
"IDE1006:Naming Styles",
Justification = "Naming necessario per l'interpolazione delle colonne a partire dalla proprietà"
)]
// csharpier-ignore
public int connection_id { get; set; }
#endregion
protected override string TableName => "public.messages";
public override string GetTableName()
{
return TableName;
}
} allows it to format. I think that the start and end of ignore in combo with regions make it tink the file is among the .csharpierignore but I'm not sure |
This was a bug with assuming an ending region always had a starting region to use to determine how much it needed to be indented. In this case the starting region was included in the unformatted code, which is treated as just a string by the printer. Thanks for reporting the bug! |
No problem. |
I got my team at work using it with a very early version, I can't image life without it at this point. So much time saved not thinking about formatting when reviewing PRs.
I do have a sponser link set up - https://github.com/sponsors/belav |
Input:
I'm experiencing a strange issue where formatting a code with regions makes CSharpier throw an exception for stack empty.
How to Replicate:
Output:
I get this output running the command line tool:
and I get this output by running the tool from VisualStudio 2022
Expected behavior:
Format the file as usual
Obviously removing the regions fixes this problem but in my team we use a lot the regions to navigate faster the code.
Hope the info I supplied is enough.
In case of need ask some more
The text was updated successfully, but these errors were encountered: