Fix namespace / folder mismatches
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 993
- Avg merge
- 9d 21h
- Merged PRs (30d)
- 1
Description
We currently have classes in the following namespaces where the namespace of the class does not correspond with its file location (folder):
- Renci.SshNet.Security
- Renci.SshNet.Sftp.Requests
- Renci.SshNet.Sftp.Responses
- Renci.SshNet.Messages.Connection
These inconsistencies result in IDE0130 being reported.
To resolve this, we have two options:
- Change the namespace of the class to correspond with its file location.
When the class is public, this is a breaking changes. - Move the file to the folder that corresponds with its namespace.
This is a non-breaking change.
Even though the first option is a breaking change in case of public class, I'd still at least consider this option for some classes.
Here's a breakdown by namespace:
Renci.SshNet.Security:
| Class | Accessibility | Folder | Proposal |
|---|---|---|---|
| DsaKey | public | Security/Cryptography/ | Change namespace |
| Key | public | Security/Cryptography/ | Change namespace |
| EcdsaKey | public | Security/Cryptography/ | Change namespace |
| ED25519Key | public | Security/Cryptography/ | Change namespace |
| RsaKey | public | Security/Cryptography/ | Change namespace |
Renci.SshNet.Sftp.Requests:
| Class | Accessibility | Folder | Proposal |
|---|---|---|---|
| FStatVfsRequest | internal | Sftp\Requests\ExtendedRequests | Move file |
| HardLinkRequest | internal | Sftp\Requests\ExtendedRequests | Move file |
| PosixRenameRequest | internal | Sftp\Requests\ExtendedRequests | Move file |
| StatVfsRequest | internal | Sftp\Requests\ExtendedRequests | Move file |
Renci.SshNet.Sftp.Responses:
| Class | Accessibility | Folder | Proposal |
|---|---|---|---|
| ExtendedReplyInfo | internal | Sftp\Responses\ExtendedReplies\ExtendedReplyInfo | Move file |
| StatVfsReplyInfo | internal | Sftp\Responses\ExtendedReplies\ExtendedReplyInfo | Move file |
| Class | Accessibility | Folder | Proposal |
|---|---|---|---|
| ExtendedReplyInfo | internal | Sftp\Requests\ExtendedRequests | Move file |
| HardLinkRequest | internal | Sftp\Requests\ExtendedRequests | Move file |
| PosixRenameRequest | internal | Sftp\Requests\ExtendedRequests | Move file |
| StatVfsRequest | internal | Sftp\Requests\ExtendedRequests | Move file |
Renci.SshNet.Messages.Connection:
| Class | Accessibility | Folder | Proposal |
|---|---|---|---|
| BreakRequestInfo | internal | Messages/Connection/ChannelRequest | Move file |
| ChannelRequestMessage | public | Messages/Connection/ChannelRequest | Move file |
| EndOfWriteRequestInfo | public | Messages/Connection/ChannelRequest | Move file |
| EnvironmentVariableRequestInfo | internal | Messages/Connection/ChannelRequest | Move file |
| ExecRequestInfo | internal | Messages/Connection/ChannelRequest | Move file |
| ExitSignalRequestInfo | internal | Messages/Connection/ChannelRequest | Move file |
| ExitStatusRequestInfo | internal | Messages/Connection/ChannelRequest | Move file |
| KeepAliveRequestInfo | public | Messages/Connection/ChannelRequest | Move file |
| PseudoTerminalRequestInfo | internal | Messages/Connection/ChannelRequest | Move file |
| RequestInfo | public | Messages/Connection/ChannelRequest | Move file |
| ShellRequestInfo | internal | Messages/Connection/ChannelRequest | Move file |
| SignalRequestInfo | internal | Messages/Connection/ChannelRequest | Move file |
| SubsystemRequestInfo | internal | Messages/Connection/ChannelRequest | Move file |
| WindowChangeRequestInfo | internal | Messages/Connection/ChannelRequest | Move file |
| X11ForwardingRequestInfo | internal | Messages/Connection/ChannelRequest | Move file |
| XonXoffRequestInfo | internal | Messages/Connection/ChannelRequest | Move file |
| ChannelOpenInfo | public | Messages/Connection/ChannelOpen | Move file |
| ChannelOpenMessage | public | Messages/Connection/ChannelOpen | Move file |
| DirectTcpipChannelInfo | internal | Messages/Connection/ChannelOpen | Move file |
| ForwardedTcpipChannelInfo | internal | Messages/Connection/ChannelOpen | Move file |
| SessionChannelOpenInfo | internal | Messages/Connection/ChannelOpen | Move file |
| X11ChannelOpenInfo | internal | Messages/Connection/ChannelOpen | Move file |
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the listed classes in Security/Cryptography, Sftp/Requests/ExtendedRequests, Sftp/Responses/ExtendedReplies/ExtendedReplyInfo, and Messages/Connection/ChannelRequest or ChannelOpen, comparing each namespace with its folder. Resolve the public-class cases with the stated breaking-change concern in mind, then verify IDE0130 is no longer reported and the project still builds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100