<s> """<STR_LIT>""" <EOL> __author__ = ( '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> import gflags as flags <EOL> from closure_linter import aliaspass <EOL> from closure_linter import checkerbase <EOL> from closure_linter import closurizednamespacesinfo <EOL> from closure_linter import javascriptlintrules <EOL> flags . DEFINE_list ( '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> flags . DEFINE_list ( '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> class JavaScriptStyleChecker ( checkerbase . CheckerBase ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , state_tracker , error_handler ) : <EOL> """<STR_LIT>""" <EOL> self . _namespaces_info = None <EOL> self . _alias_pass = None <EOL> if flags . FLAGS . closurized_namespaces : <EOL> self . _namespaces_info = ( <EOL> closurizednamespacesinfo . ClosurizedNamespacesInfo ( <EOL> flags . FLAGS . closurized_namespaces , <EOL> flags . FLAGS . ignored_extra_namespaces ) ) <EOL> self . _alias_pass = aliaspass . AliasPass ( <EOL> flags . FLAGS . closurized_namespaces , error_handler ) <EOL> checkerbase . CheckerBase . __init__ ( <EOL> self , <EOL> error_handler = error_handler , <EOL> lint_rules = javascriptlintrules . JavaScriptLintRules ( <EOL> self . _namespaces_info ) , <EOL> state_tracker = state_tracker ) <EOL> def Check ( self , start_token , limited_doc_checks = False , is_html = False , <EOL> stop_token = None ) : <EOL> """<STR_LIT>""" <EOL> self . _lint_rules . Initialize ( self , limited_doc_checks , is_html ) <EOL> self . _state_tracker . DocFlagPass ( start_token , self . _error_handler ) <EOL> if self . _alias_pass : <EOL> self . _alias_pass . Process ( start_token ) <EOL> if self . _namespaces_info : <EOL> self . _namespaces_info . Reset ( ) <EOL> self . _ExecutePass ( start_token , self . _DependencyPass , stop_token ) <EOL> self . _ExecutePass ( start_token , self . _LintPass , stop_token ) <EOL> if not stop_token : <EOL> self . _lint_rules . Finalize ( self . _state_tracker ) <EOL> def _DependencyPass ( self , token ) : <EOL> """<STR_LIT>""" <EOL> self . _namespaces_info . ProcessToken ( token , self . _state_tracker ) </s>
