Skip to content

Easy dotnet conventions to verify #122

Open

Description

@knocte
  • 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.

Activity

  1. Mersho commented on Aug 17, 2023

    @Mersho
    Contributor

    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");
                }
            }
        }
    }
    
  2. knocte commented on Aug 17, 2023

    @knocte
    MemberAuthor

    I'm afk now, pls discuss with @aarani

  3. aarani commented on Aug 17, 2023

    @aarani
    Contributor

    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?

  4. Mersho commented on Aug 17, 2023

    @Mersho
    Contributor

    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.

  5. aarani commented on Aug 17, 2023

    @aarani
    Contributor

    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.

  6. knocte commented on Aug 17, 2023

    @knocte
    MemberAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions