def test_process_files__with_ruleset(self): tool = Ktlint(self.problems, {'ruleset': '/path/to/custom/rulseset.jar'}, root_dir) self.assertEqual([ 'ktlint', '--color', '--reporter=checkstyle', '-R', '/path/to/custom/rulseset.jar' ], tool._create_command())
def test_process_files__valid_config(self): editor_config = 'tests/fixtures/ktlint/.editorconfig' tool = Ktlint(self.problems, {'config': editor_config}, root_dir) self.assertEqual([ 'ktlint', '--color', '--reporter=checkstyle', '--editorconfig=', editor_config ], tool._create_command())
def test_process_files__with_experimental(self): tool = Ktlint(self.problems, {'experimental': True}, root_dir) self.assertEqual(['ktlint', '--color', '--reporter=checkstyle', '--experimental'], tool._create_command())
def test_process_files__with_ruleset(self): tool = Ktlint(self.problems, {'ruleset': '/path/to/custom/rulseset.jar'}, root_dir) self.assertEqual(['ktlint', '--color', '--reporter=checkstyle', '-R', '/path/to/custom/rulseset.jar'], tool._create_command())
def test_process_files__valid_config(self): editor_config = 'tests/fixtures/ktlint/.editorconfig' tool = Ktlint(self.problems, {'config': editor_config}, root_dir) self.assertEqual(['ktlint', '--color', '--reporter=checkstyle', '--editorconfig=', editor_config], tool._create_command())
def test_process_files__with_experimental(self): tool = Ktlint(self.problems, {'experimental': True}, root_dir) self.assertEqual( ['ktlint', '--color', '--reporter=checkstyle', '--experimental'], tool._create_command())