From 4953db355ebdd5e78f7bde6488554e6e3bf76dca Mon Sep 17 00:00:00 2001 From: Defman21 Date: Wed, 2 Aug 2017 23:46:49 +0300 Subject: [PATCH] Revert "Revert "Merge branch 'pr/rubocop' of https://github.com/Defman21/KomodoEdit into Defman21-pr/rubocop"" This reverts commit b0156ec8556d99585af076b94cadfa4d40ead6f4. --- .../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 + 4 files changed, 65 insertions(+) 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; + + +