bjorndaniel / globalusingsanalyzer Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
@chan18 Maybe this would be pretty easy one?
If you have the following code:
Foo.cs
// SPDX-License-Identifier: MPL-2.0
#if DEBUG
using Foo;
#endif
namespace Foo { }
Applying the lint removes only the header and includes it in the GlobalUsings.cs
file like so:
GlobalUsings.cs
global // SPDX-License-Identifier: MPL-2.0
#if DEBUG
using Foo;
Foo.cs
#endif
namespace Foo { }
It preferably should be...
GlobalUsings.cs
global using Foo;
Foo.cs
// SPDX-License-Identifier: MPL-2.0
#if DEBUG
#endif
namespace Foo { }
Alternatively, it would be neat if preprocessors would be carried over, however I understand that it may arise other bugs or edgecases.
GlobalUsings.cs
#if DEBUG
global using Foo;
#endif
Foo.cs
// SPDX-License-Identifier: MPL-2.0
namespace Foo { }
1.in cs file header area of using namespaces, support Batch move to GlobalUsing.cs
2.in project Right Menu,support Batch move all of namespaces to GlobalUsing.cs
3.auto use Global Using(when Create new cs File),move all default namespances to GlobalUsing.cs,and add the class's self namespance to GlobalUsing.cs
If installed as an extension it should be possible to disable the warnings if you are using a project where you don't want global usings
When applying the lint in a solution in which projects aren't within the same directory, the file incorrectly gets placed on Solution/Project\GlobalUsings.cs
as oppose to Solution/Project/GlobalUsings.cs
. Please use Path.DirectorySeparatorChar
as oppose to \
when concatenating paths so that it works platform-independently.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.