-
Notifications
You must be signed in to change notification settings - Fork 1.6k
chore: add GlobalUsings.cs with project-wide using directives in data structures tests #526
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
using System; | ||
using FluentAssertions; | ||
using NUnit.Framework; | ||
|
||
namespace DataStructures.Tests; | ||
|
||
/// <summary> | ||
|
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -0,0 +1,20 @@ | ||||
// ----------------------------------------------------------------------------- | ||||
// Global using directives for the C-Sharp solution. | ||||
// These namespaces are imported globally so they don’t need to be repeatedly declared | ||||
// in individual files, improving readability and reducing boilerplate. | ||||
// | ||||
// Guidelines: | ||||
// - Keep only the most commonly used namespaces here. | ||||
// - Add project-specific namespaces (e.g., Utilities.Extensions) only if they are | ||||
// required across the majority of files in the project. | ||||
// - Avoid placing rarely used namespaces here to maintain clarity. | ||||
// ----------------------------------------------------------------------------- | ||||
|
||||
global using System; // Core base classes and fundamental types | ||||
global using System.Collections.Generic; // Generic collection types (List, Dictionary, etc.) | ||||
global using System.Linq; // LINQ query operators for collections | ||||
global using System.Text; // Text encoding, StringBuilder, etc. | ||||
global using NUnit.Framework; // Testing framework providing attributes and assertions for test cases | ||||
global using NUnit.Framework.Internal; // Internal NUnit infrastructure (test context, utilities) — generally used for advanced or framework-level test control | ||||
global using FluentAssertions; // Assertion library for more readable and expressive unit tests | ||||
global using System.Collections; // Non-generic collection types (e.g., ArrayList, Hashtable, IDictionary, ICollection) | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. System.Collections contains legacy non-generic collection types that are generally discouraged in modern C# development. Consider removing this global using unless legacy collections are actively used throughout the test project.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The NUnit.Framework.Internal namespace contains internal APIs that are not intended for public use and may change between versions. Consider removing this global using unless there's a specific need for internal NUnit functionality.
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check the comments