From 0438f32ea372455ad5faf84be78bf8a053354b73 Mon Sep 17 00:00:00 2001 From: Defman21 Date: Wed, 2 Aug 2017 19:02:25 +0300 Subject: [PATCH] Ruby: Lint: added Rubocop linter Signed-off-by: Defman21 --- .../content/pref/pref-syntax-checking.js | 17 +++ .../content/pref/pref-syntax-checking.xul | 40 +++++++ src/chrome/komodo/locale/en-US/pref/pref.dtd | 7 ++ src/lint/Conscript | 1 + src/lint/koRubocopLinter.py | 110 ++++++++++++++++++ 5 files changed, 175 insertions(+) create mode 100644 src/lint/koRubocopLinter.py diff --git a/src/chrome/komodo/content/pref/pref-syntax-checking.js b/src/chrome/komodo/content/pref/pref-syntax-checking.js index 2a3f43b6e2..0780b19e1c 100644 --- a/src/chrome/komodo/content/pref/pref-syntax-checking.js +++ b/src/chrome/komodo/content/pref/pref-syntax-checking.js @@ -428,6 +428,23 @@ function javaScriptInfo(languageName) { }; } +languageInfo.Ruby = { + browseForRubocopBinary: () => { + let rubocop_binary = document.getElementById('rubocop_binary'); + let currentPath = rubocop_binary.value; + let path = ko.filepicker.browseForExeFile(null, currentPath || ""); + if (path) + rubocop_binary.value = path; + }, + browseForRubocopConfig: () => { + let rubocop_config = document.getElementById('rubocop_config'); + let currentPath = rubocop_config.value; + let path = ko.filepicker.browseForExeFile(null, currentPath || ""); + if (path) + rubocop_config.value = path; + } +}; + function typescript_setup() { if (!('TypeScript' in dialog)) { dialog.TypeScript = {}; diff --git a/src/chrome/komodo/content/pref/pref-syntax-checking.xul b/src/chrome/komodo/content/pref/pref-syntax-checking.xul index 5aeb2b875e..8e413688a5 100644 --- a/src/chrome/komodo/content/pref/pref-syntax-checking.xul +++ b/src/chrome/komodo/content/pref/pref-syntax-checking.xul @@ -571,6 +571,46 @@ + + + + &rubocopChecking.description; + + + + + + + &rubocopChecking.binary; + + +