Exemple #1
0
        static void Run(CommandLineOptions options)
        {
            options.Initialize();

            // Recurse through the directory tree.
            int badFileCount = CheckDirectory(options.RootDir, options);

            // Report errors if anything went wrong.
            if (options.Validate && badFileCount > 0)
            {
                throw new Exception(string.Format("Encountered files with wrong copyright banner ({0})", badFileCount));
            }

            if (options.UnknownExtensionCount > 0)
            {
                throw new Exception(string.Format("Encountered unknown file extensions ({0})", options.UnknownExtensionCount));
            }
        }
Exemple #2
0
        static void Run(CommandLineOptions options)
        {
            options.Initialize();

            // Recurse through the directory tree.
            int badFileCount = CheckDirectory(options.RootDir, options);

            // Report errors if anything went wrong.
            if (options.Validate && badFileCount > 0)
            {
                throw new Exception(string.Format("Encountered files with wrong copyright banner ({0})", badFileCount));
            }

            if (options.UnknownExtensionCount > 0)
            {
                throw new Exception(string.Format("Encountered unknown file extensions ({0})", options.UnknownExtensionCount));
            }
        }