Skip to content
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

Code cleanup #325

Merged
merged 9 commits into from
Feb 26, 2024
Merged

Code cleanup #325

merged 9 commits into from
Feb 26, 2024

Conversation

sungam3r
Copy link
Contributor

@sungam3r sungam3r commented Jan 14, 2024

изображение

@benmwatson
Copy link
Member

Some of these policies I'm going to disagree with because they match the internal coding styles we use. For example, we require use of this. for member fields/properties/methods, so that should be enforced rather than disabled. I will try to give more detailed feedback later.

Examples/Readme.cs Fixed Show fixed Hide fixed
Examples/Readme.cs Fixed Show fixed Hide fixed
Examples/Readme.cs Fixed Show fixed Hide fixed
Examples/Readme.cs Fixed Show fixed Hide fixed
Examples/Readme.cs Fixed Show fixed Hide fixed
Examples/Readme.cs Fixed Show fixed Hide fixed
src/RecyclableMemoryStreamManager.cs Fixed Show fixed Hide fixed
# Conflicts:
#	UnitTests/UnitTests.csproj
Copy link
Member

@benmwatson benmwatson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll review again once some of these questions and issues are resolved.

.editorconfig Outdated Show resolved Hide resolved
.editorconfig Outdated
dotnet_style_qualification_for_property = false:warning
dotnet_style_qualification_for_method = false:warning
dotnet_style_qualification_for_event = false:warning
csharp_style_namespace_declarations = file_scoped:suggestion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our internal policy is block_scoped, so I would prefer that still.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -10,20 +10,20 @@ var resultsPath = Path.Combine(resultsDir, resultsFile + ".json");

if (!Directory.Exists(resultsDir))
{
throw new DirectoryNotFoundException($"Directory not found '{resultsDir}'");
throw new DirectoryNotFoundException($"Directory not found '{resultsDir}'");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are lots of spacing changes. What operation are you doing here, exactly?

Copy link
Contributor Author

@sungam3r sungam3r Feb 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed indentation from tabs to spaces.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah....I'm actually surprised I didn't notice that. My IDE is set to spaces. Reasonable, thanks!

Comment on lines +38 to +39
using (var stream = this.manager.GetStream("Program.Main", this.sourceBuffer,
0, this.sourceBuffer.Length))

Check warning

Code scanning / CodeQL

Useless assignment to local variable Warning

This assignment to
stream
is useless, since its value is never read.
.editorconfig Outdated
dotnet_style_qualification_for_field = true:warning
dotnet_style_qualification_for_property = false:warning
dotnet_style_qualification_for_method = false:warning
dotnet_style_qualification_for_event = false:warning
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry if I wasn't clear earlier. These should all be true.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@benmwatson benmwatson added this to the 3.0 milestone Feb 26, 2024
@benmwatson benmwatson merged commit 9362885 into microsoft:master Feb 26, 2024
4 checks passed
@sungam3r sungam3r deleted the cleanup branch February 27, 2024 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants