Skip to content

Commit

Permalink
Allow LintChecker to be used standalone and with SublimeLinter
Browse files Browse the repository at this point in the history
  • Loading branch information
aparajita committed May 13, 2012
1 parent ccc4d8a commit feb129e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sublimelinter/modules/libs/capp_lint.py
Expand Up @@ -280,7 +280,7 @@ def run_line_checks(self):
if option:
default = check.get('optionDefault', False)

if not self.view.settings().get(option, default):
if self.view and not self.view.settings().get(option, default):
continue

line = self.line
Expand Down Expand Up @@ -982,7 +982,7 @@ def print_textmate_html_errors(self):
print usage.replace('%prog', os.path.basename(sys.argv[0]))
sys.exit(0)

checker = LintChecker(basedir=basedir, var_declarations=LintChecker.VAR_DECLARATIONS.index(options.var_declarations), verbose=options.verbose)
checker = LintChecker(basedir=basedir, view=None, var_declarations=LintChecker.VAR_DECLARATIONS.index(options.var_declarations), verbose=options.verbose)
pathsToCheck = []

for filename in filenames:
Expand Down

0 comments on commit feb129e

Please sign in to comment.