public function validatePluginFiles(OutputInterface $output)
    {
        $code = 0;

        // Look for modified files or files that should be deleted.
        $files = Finder::create()->files()->in($this->backupDir)->name('*.js')->name('*.css')->getIterator();
        foreach ($files as $file) {
            $compareFile = $this->plugin->directory.'/'.$file->getRelativePathname();
            if (!file_exists($compareFile)) {
                $output->writeln(sprintf('<error>File no longer generated and likely should be deleted: %s</error>', $file->getRelativePathname()));
                $code = 1;
                continue;
            }

            if (sha1_file($file->getPathname()) !== sha1_file($compareFile)) {
                $output->writeln(sprintf('<error>File is stale and needs to be rebuilt: %s</error>', $file->getRelativePathname()));
                $code = 1;
            }
        }

        // Look for newly generated files.
        $files = Finder::create()->files()->in($this->plugin->directory)->name('*.js')->name('*.css')->getIterator();
        foreach ($files as $file) {
            if (!file_exists($this->backupDir.'/'.$file->getRelativePathname())) {
                $output->writeln(sprintf('<error>File is newly generated and needs to be added: %s</error>', $file->getRelativePathname()));
                $code = 1;
            }
        }

        return $code;
    }