<s> from robot . parsing . model import TestCaseFile , TestDataDirectory , TestCase , UserKeyword <EOL> from rules import TestSuiteRule , TestCaseRule <EOL> class LintController ( object ) : <EOL> '''<STR_LIT>''' <EOL> def check ( self , suite ) : <EOL> '''<STR_LIT>''' <EOL> for rule in TestSuiteRule . __subclasses__ ( ) : <EOL> suite . longname = self . _get_longname ( suite ) <EOL> r = rule ( ) <EOL> if not r . ignore : <EOL> r ( suite ) <EOL> for testcase in suite . testcase_table : <EOL> testcase . longname = self . _get_longname ( testcase ) <EOL> for rule in TestCaseRule . __subclasses__ ( ) : <EOL> r = rule ( ) <EOL> if not r . ignore : <EOL> r ( testcase ) <EOL> def _get_longname ( self , obj ) : <EOL> names = [ obj . name ] <EOL> parent = obj . parent <EOL> while parent is not None : <EOL> if ( isinstance ( parent , TestCaseFile ) or <EOL> isinstance ( parent , TestDataDirectory ) or <EOL> isinstance ( parent , TestCase ) or <EOL> isinstance ( parent , UserKeyword ) ) : <EOL> names . insert ( <NUM_LIT:0> , parent . name ) <EOL> parent = parent . parent <EOL> return "<STR_LIT:.>" . join ( names ) </s>
