Skip to content
This repository was archived by the owner on Jul 12, 2022. It is now read-only.

Conversation

@jaredpar
Copy link
Member

Moving a using from inside a namespace to outside it is a fundamentally dangerous
operation. In part because it changes the context of the lookup:

  • Outside the namespace only the other usings are considered
  • Inside the namespace the namespace + the usings are considered

This makes it trivial to create an error by moving a using directive around.

Instead of continuing to patch this rule I've decided to just disable it by
default for now. We can revisit and make it safer later on but for now it
takes too much work to fix this.

Moving a using from inside a namespace to outside it is a fundamentally dangerous
operation.  In part because it changes the context of the lookup:

- Outside the namespace only the other usings are considered
- Inside the namespace the namespace + the usings are considered

This makes it trivial to create an error by moving a using directive around.

Instead of continuing to patch this rule I've decided to just disable it by
default for now.  We can revisit and make it safer later on but for now it
takes too much work to fix this.
@Priya91
Copy link
Contributor

Priya91 commented Jul 8, 2015

LGTM

jaredpar added a commit that referenced this pull request Jul 8, 2015
Disable the using location rule by default
@jaredpar jaredpar merged commit 1d719e4 into dotnet:master Jul 8, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants