예제 #1
0
 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())
예제 #2
0
 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())
예제 #3
0
 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())
예제 #4
0
 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())
예제 #5
0
 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())
예제 #6
0
 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())