private static boolean lintFile(
    final File inFile,
    final File outFile,
    final List<String> jslintOptions)
  {
    boolean success = true;
    try
    {
      if (!outFile.exists() || !FileUtils.isFileNewer(outFile, inFile))
      {
        success = false;
        final Reader reader = new FileReader(inFile);
        try
        {
          final JSLintBuilder builder = new JSLintBuilder();
          final JSLint jsLint = builder.fromDefault();
          for (final String opt : jslintOptions)
          {
            final String[] pair = StringUtils.split(opt, '=');
            final Option option = Option.valueOf(StringUtils.trimToEmpty(pair[0]).toUpperCase());
            if (option != null)
            {
              if (pair.length == 2)
              {
                jsLint.addOption(option, StringUtils.trimToEmpty(pair[1]));
              }
              else
              {
                jsLint.addOption(option);
              }
            }
          }

          final List<Issue> issues = jsLint.lint(inFile.getPath(), reader);
          if (issues.isEmpty())
          {
            success = true;
          }
          else
          {
            for (final Issue issue : issues)
            {
              System.err.println(issue.getSystemId() + ":" + issue.getLine() + " " + issue.getReason());
            }
            throw new RuntimeException("JSLint failed.");
          }
        }
        finally
        {
          IOUtils.closeQuietly(reader);
        }
      }
    }
    catch (IOException e)
    {
      throw new RuntimeException(e);
    }
    return success;
  }