def open_ruby_files(self):
     files = []
     views = self.view.window().views()
     for vw in views:
         if FileTools.is_ruby_file(vw):
             files.append(vw.file_name())
     return files
Пример #2
0
 def open_ruby_files(self):
   files = []
   views = self.view.window().views()
   for vw in views:
     if FileTools.is_ruby_file(vw):
       files.append(vw.file_name())
   return files
 def do_post_save_check(self, view):
   self.clear_marks(view)
   if not sublime.load_settings(SETTINGS_FILE).get('check_on_save'):
     return
   if not FileTools.is_ruby_file(view.file_name()):
     return
   results = self.run_rubocop(view.file_name())
   self.set_marks_by_results(view, results)
Пример #4
0
 def open_ruby_files(self):
   files = []
   views = self.view.window().views()
   for vw in views:
     file_path = vw.file_name()
     if FileTools.is_ruby_file(file_path):
       files.append(file_path)
   return files
Пример #5
0
 def open_ruby_files(self):
     files = []
     views = self.view.window().views()
     for vw in views:
         file_path = vw.file_name()
         if FileTools.is_ruby_file(file_path):
             files.append(file_path)
     return files
Пример #6
0
 def do_in_file_check(self, view):
     if not FileTools.is_ruby_file(view):
         return
     settings = sublime.load_settings(SETTINGS_FILE)
     mark_issues_in_view = settings.get('mark_issues_in_view')
     auto_correct_on_save = settings.get('auto_correct_on_save')
     cmd_args = ['--format', 'emacs']
     if auto_correct_on_save:
         cmd_args.append('-a')
     if mark_issues_in_view:
         self.clear_marks(view)
     if mark_issues_in_view or auto_correct_on_save:
         results = self.run_rubocop(view, cmd_args)
         if mark_issues_in_view:
             self.set_marks_by_results(view, results)
Пример #7
0
 def do_in_file_check(self, view):
   if not FileTools.is_ruby_file(view.file_name()):
     return
   mark = sublime.load_settings(SETTINGS_FILE).get('mark_issues_in_view')
   self.mark_issues(view, mark)