rubocop:disable Lint/RescueException
328848
def run_listener(listener)
      retry_count = 0

      begin
        listener.start
      rescue Exception => e
        handle_crashed_listener(listener, e, retry_count)
        retry_count += 1
        retry unless @signal_to_stop
      end
    rescue Exception => e
      log_error("Failed to run listener (#{e.message})", error_metadata(e))
      raise e
    end
8022
def scan_for_lints(options)
      reporter = reporter_from_options(options)
      report = Runner.new.run(options.merge(reporter: reporter))
      report.display
      report.failed? ? Sysexits::EX_DATAERR : Sysexits::EX_OK
    end
409725
function lintFiles(pattern, strict, configs) {
  const linter = new eslint.CLIEngine(configs);
  const report = linter.executeOnFiles([pattern]);
  const formatter = linter.getFormatter();
  console.log(formatter(report.results));
  if (0 < report.errorCount || (strict && 0 < report.warningCount)) {
    throw new Error('eslint reports some problems.');
  }
}
372765
def add_lint(node_or_line_or_location, message)
      @lints << Lint.new(self,
                         engine.filename,
                         extract_location(node_or_line_or_location),
                         message,
                         @config.fetch('severity', :warning).to_sym)
    end
1237651
def record_lint(node, message)
      @lints << HamlLint::Lint.new(self, @document.file, node.line, message,
                                   config.fetch('severity', :warning).to_sym)
    end
357536
def run(document)
      @document = document
      @lints = []
      visit(document.tree)
      @lints
    rescue Parser::SyntaxError => e
      location = e.diagnostic.location
      @lints <<
        HamlLint::Lint.new(
          HamlLint::Linter::Syntax.new(config),
          document.file,
          location.line,
          e.to_s,
          :error
        )
    end
582548
def lint(use_inline_comments=false)
      ensure_flake8_is_installed

      errors = run_flake
      return if errors.empty? || errors.count <= threshold

      if use_inline_comments
        comment_inline(errors)
      else
        print_markdown_table(errors)
      end
    end
867742
def lint():
    
    from pylint import lint as linter

    # report according to file extension
    reporters = {
        ".html": linter.HTMLReporter,
        ".log": linter.ParseableTextReporter,
        ".txt": linter.TextReporter,
    }

    lint_build_dir = path("build/lint")
    lint_build_dir.exists() or lint_build_dir.makedirs()

    argv = []
    rcfile = options.lint.get("rcfile")
    if not rcfile and path("pylint.cfg").exists():
        rcfile = "pylint.cfg"
    if rcfile:
        argv += ["--rcfile", os.path.abspath(rcfile)]
    if options.lint.get("msg_only", False):
        argv += ["-rn"]
    argv += [
        "--import-graph", (lint_build_dir / "imports.dot").abspath(),
    ]
    argv += toplevel_packages()

    sys.stderr.write("Running %s::pylint '%s'\n" % (sys.argv[0], "' '".join(argv)))
    outfile = options.lint.get("output", None)
    if outfile:
        outfile = os.path.abspath(outfile)

    try:
        with pushd("src" if path("src").exists() else "."):
            if outfile:
                reporterClass = reporters.get(path(outfile).ext, linter.TextReporter)
                sys.stderr.write("Writing output to %r\n" % (str(outfile),))
                linter.Run(argv, reporter=reporterClass(open(outfile, "w")))
            else:
                linter.Run(argv)
    except SystemExit, exc:
        if not exc.code:
            sys.stderr.write("paver::lint - No problems found.\n")
        elif exc.code & 32:
            # usage error (internal error in this code)
            sys.stderr.write("paver::lint - Usage error, bad arguments %r?!\n" % (argv,))
            raise
        else:
            bits = {
                1: "fatal",
                2: "error",
                4: "warning",
                8: "refactor",
                16: "convention",
            }
            sys.stderr.write("paver::lint - Some %s message(s) issued.\n" % (
                ", ".join([text for bit, text in bits.items() if exc.code & bit])
            ))
            if exc.code & 3:
                sys.stderr.write("paver::lint - Exiting due to fatal / error message.\n")
                raise
200525
def lint
      lint_results
        .reject { |r| r.nil? || r['messages'].length.zero? }
        .reject { |r| r['messages'].first['message'].include? 'matching ignore pattern' }
        .map { |r| send_comment r }
    end
442845
def generate_config_for_linter(linter, files)
      [].tap do |output|
        output << "  # Offense count: #{linters_lint_count[linter]}"
        output << "  #{linter}:"
        # disable the linter when there are many files with offenses.
        # exclude the affected files otherwise.
        if files.count > exclude_limit
          output << '    enabled: false'
        else
          output << '    exclude:'
          files.each do |filename|
            output << %{      - "#{filename}"}
          end
        end
      end.join("\n")
    end
104963
function lintFiles (src)
{
    gulp.src(src)
        .pipe(scssLint({
            config: __dirname + "/../config/scss-lint.yml",
            customReport: issueCountReporter
        }))
        .on('error', function (error)
        {
            gulpUtil.log(gulpUtil.colors.red('An error has occurred while executing scss-lint: ' + error.message));
        })
        .on('end', reportTotalIssueCount);
}
1300345
def lint(self, commit):
        
        LOG.debug("Linting commit %s", commit.sha or "[SHA UNKNOWN]")
        LOG.debug("Commit Object\n" + ustr(commit))

        # Apply config rules
        for rule in self.configuration_rules:
            rule.apply(self.config, commit)

        # Skip linting if this is a special commit type that is configured to be ignored
        ignore_commit_types = ["merge", "squash", "fixup"]
        for commit_type in ignore_commit_types:
            if getattr(commit, "is_{0}_commit".format(commit_type)) and \
               getattr(self.config, "ignore_{0}_commits".format(commit_type)):
                return []

        violations = []
        # determine violations by applying all rules
        violations.extend(self._apply_line_rules([commit.message.title], commit, self.title_line_rules, 1))
        violations.extend(self._apply_line_rules(commit.message.body, commit, self.body_line_rules, 2))
        violations.extend(self._apply_commit_rules(self.commit_rules, commit))

        # Sort violations by line number and rule_id. If there's no line nr specified (=common certain commit rules),
        # we replace None with -1 so that it always get's placed first. Note that we need this to do this to support
        # python 3, as None is not allowed in a list that is being sorted.
        violations.sort(key=lambda v: (-1 if v.line_nr is None else v.line_nr, v.rule_id))
        return violations
276009
def lint(to_lint):
    
    exit_code = 0
    for linter, options in (('pyflakes', []), ('pep8', [])):
        try:
            output = local[linter](*(options + to_lint))
        except commands.ProcessExecutionError as e:
            output = e.stdout

        if output:
            exit_code = 1
            print "{0} Errors:".format(linter)
            print output

    output = hacked_pep257(to_lint)
    if output:
        exit_code = 1
        print "Docstring Errors:".format(linter.upper())
        print output

    sys.exit(exit_code)
1356569
def _report_lint_error(error, file_path):
    """"""
    line = error[1].line
    code = error[0]
    description = error[1].description
    sys.stdout.write("{0}:{1} [{2}] {3}\n".format(file_path,
                                                  line,
                                                  code,
                                                  description))
551510
def lint(args):
    """"""
    application = get_current_application()
    if not args:
        args = [application.name, 'tests']
    args = ['flake8'] + list(args)
    run.main(args, standalone_mode=False)
1052875
def lints_and_stats_nuclear(lint_opts)
        {
          lints: {
            scsslint: Maximus::Scsslint.new(lint_opts).result,
            jshint: Maximus::Jshint.new(lint_opts).result,
            rubocop: Maximus::Rubocop.new(lint_opts).result,
            railsbp: Maximus::Railsbp.new(lint_opts).result,
            brakeman: Maximus::Brakeman.new(lint_opts).result
          },
          statistics: {
            stylestat: Maximus::Stylestats.new({config: @config}).result,
            phantomas: Maximus::Phantomas.new({config: @config}).result,
            wraith: Maximus::Wraith.new({config: @config}).result
          }
        }
      end
1243095
def parse_config
      defaults = load_default_config
      overrides = load_config "#{@dir}/cucumber_lint.yml"

      overrides.each_pair do |style, style_overrides|
        style_overrides.each_pair do |key, value|
          if key == 'enforced_style'
            supported = defaults[style]['supported_styles']
            fail UnsupportedStyle.new style, supported, value unless supported.include?(value)
          end

          defaults[style][key] = value
        end
      end

      defaults.to_open_struct
    end