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

Easy dotnet conventions to verify #122

Open
knocte opened this issue Jul 11, 2023 · 6 comments
Open

Easy dotnet conventions to verify #122

knocte opened this issue Jul 11, 2023 · 6 comments

Comments

@knocte
Copy link
Member

knocte commented Jul 11, 2023

  • Find "" instead of String.Empty/string.Empty
  • Find a .?proj file Foo, find the folder it's in is not named Foo.
  • Find a src/ folder, find folder Foo under it, find .fs/.cs file that doesn't contain word Foo (for namespace).
  • Find a src/ folder, find folder Foo under it, find folder Bar under Foo, find .fs/.cs file in Bar that doesn't contain word Foo.Bar (for namespace).
  • Find <OutputType>Exe</OutputType> in a .?proj file, then find Console. in some .cs/.fs file, then find project file (and folder for it) is not suffixed as Console.
  • Don't find <OutputType>Exe</OutputType> in a .?proj file, then find Console. in some .cs/.fs file.
  • Don't find <OutputType>Exe</OutputType> in a .fsproj file, then find Async.RunSynchronously in some .fs file.
@Mersho
Copy link
Contributor

Mersho commented Aug 17, 2023

Does nasted namespaces matters in C#?
for example:

// a nested namespace
namespace SomeNameSpace
{
    public class MyClass
    {
        static void Main()
        {
            Nested.NestedNameSpaceClass.SayHello();
        }
    }

    // a nested namespace
    namespace Nested
    {
        public class NestedNameSpaceClass
        {
            public static void SayHello()
            {
                Console.WriteLine("Hello");
            }
        }
    }
}

@knocte
Copy link
Member Author

knocte commented Aug 17, 2023

I'm afk now, pls discuss with @aarani

@aarani
Copy link
Contributor

aarani commented Aug 17, 2023

Does nasted namespaces matters in C#? for example:

// a nested namespace
namespace Nested
{
	public class NestedNameSpaceClass
	{
		public static void SayHello()
		{
			Console.WriteLine("Hello");
		}
	}
}

What do you mean by nested namespace?

@Mersho
Copy link
Contributor

Mersho commented Aug 17, 2023

Does nasted namespaces matters in C#? for example:

// a nested namespace
namespace Nested
{
	public class NestedNameSpaceClass
	{
		public static void SayHello()
		{
			Console.WriteLine("Hello");
		}
	}
}

What do you mean by nested namespace?

I edited my comment to provide the example.

@aarani
Copy link
Contributor

aarani commented Aug 17, 2023

Does nasted namespaces matters in C#? for example:

// a nested namespace
namespace Nested
{
	public class NestedNameSpaceClass
	{
		public static void SayHello()
		{
			Console.WriteLine("Hello");
		}
	}
}

What do you mean by nested namespace?

I edited my comment to provide the example.

In almost 6 years of writing C# code, I've never seen this but if it compiles you can't nuke it.

@knocte
Copy link
Member Author

knocte commented Aug 17, 2023 via email

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

No branches or pull requests

3 participants