Exemplo n.º 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())
Exemplo n.º 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())
Exemplo n.º 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())
Exemplo n.º 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())
Exemplo n.º 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())
Exemplo n.º 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())