Skip to content

Commit

Permalink
Revert "Revert "Merge branch 'pr/rubocop' of https://github.com/Defma…
Browse files Browse the repository at this point in the history
…n21/KomodoEdit into Defman21-pr/rubocop""

This reverts commit b0156ec.
  • Loading branch information
Defman21 committed Aug 2, 2017
1 parent e9968ec commit 4953db3
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/chrome/komodo/content/pref/pref-syntax-checking.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
Expand Down
40 changes: 40 additions & 0 deletions src/chrome/komodo/content/pref/pref-syntax-checking.xul
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,46 @@
</menulist>
</hbox>
</groupbox>
<groupbox orient="vertical">
<caption label="&rubocopChecking.label;"/>
<description>
&rubocopChecking.description;
</description>
<hbox align="center">
<checkbox id="lint_rubocop_enabled"
pref="true"
preftype="boolean"
label="&rubocopChecking.checkbox;" />
</hbox>
<hbox>
<description>
&rubocopChecking.binary;
</description>
<textbox id="rubocop_binary"
flex="1"
value=''
pref="true"
placeholder="&rubocopChecking.binaryPlaceholder;"
preftype="string"/>
<button id='rubocop_linter_browse'
label="&browse.label;"
oncommand="languageInfo.Ruby.browseForRubocopBinary();"/>
</hbox>
<hbox>
<description>
&rubocopChecking.config;
</description>
<textbox id="rubocop_config"
flex="1"
value=''
pref="true"
placeholder="&rubocopChecking.configPlaceholder;"
preftype="string"/>
<button id='eslint_config_browse'
label="&browse.label;"
oncommand="languageInfo.Ruby.browseForRubocopConfig();"/>
</hbox>
</groupbox>
</vbox>

<vbox id="langSyntaxCheck-Sass">
Expand Down
7 changes: 7 additions & 0 deletions src/chrome/komodo/locale/en-US/pref/pref.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,13 @@ adding an additional caret at the clicked position.">
<!ENTITY rubyDebuggerNotWorking.description "The Ruby debugger extension does not work with the version of Ruby selected or that is on your path. You need to use Ruby version 1.8.2 or later. You can get Ruby from the Ruby home page at">
<!ENTITY filePrefRubyUseThisInterpreter.label "Use this interpreter">
<!ENTITY filePrefRubyLevelStricness.description "You can configure the level of strictness that is used when doing background syntax checks.">
<!ENTITY rubocopChecking.label "Rubocop Linter Checking">
<!ENTITY rubocopChecking.checkbox "Enable the Rubocop linter">
<!ENTITY rubocopChecking.description "Use the Rubocop linter when doing background syntax checking.">
<!ENTITY rubocopChecking.binary "Rubocop binary:">
<!ENTITY rubocopChecking.binaryPlaceholder "Find on path...">
<!ENTITY rubocopChecking.config "Rubocop config:">
<!ENTITY rubocopChecking.configPlaceholder "Find in current working directory...">
<!ENTITY filePrefRubyAdditionalDirectory.description "Specify any additional directories that you want Komodo to add to the Ruby path when debugging, syntax checking or in the interactive shell.">
<!ENTITY filePrefRubyExcludeDirectory.description "Specify any directories you want to exclude from code autocompletion scans.">

Expand Down
1 change: 1 addition & 0 deletions src/lint/Conscript
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ if ($havePy2to3) {
$cons->InstallXpcomComponent('koCSSExLinter.py');
$cons->InstallXpcomComponent('koHTMLLinter.py');
$cons->InstallXpcomComponent('koPHPLinter.py');
$cons->InstallXpcomComponent('koRubocopLinter.py');
$cons->InstallXpcomComponent('koJavaScriptLinter.py');
$cons->InstallXpcomComponent('koLintService.py');
$cons->InstallPythonUtility('koLintResults.py');
Expand Down

0 comments on commit 4953db3

Please sign in to comment.