Skip to content

Commit 65ce6ab

Browse files
committed
feat: wire spell check marker api to code inspector
1 parent 2f607eb commit 65ce6ab

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/language/CodeInspection.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ define(function (require, exports, module) {
8484
/** Maintainability issue, probable error / bad smell, etc. */
8585
WARNING: "warning",
8686
/** Inspector unable to continue, code too complex for static analysis, etc. Not counted in err/warn tally. */
87-
META: "meta"
87+
META: "meta",
88+
/** For spelling or grammatical error */
89+
SPELL: "spell"
8890
};
8991

9092
function _getIconClassForType(type, isFixable) {
@@ -98,6 +100,9 @@ define(function (require, exports, module) {
98100
case Type.META: return isFixable ?
99101
"line-icon-problem_type_info fa-solid fa-wrench":
100102
"line-icon-problem_type_info fa-solid fa-info-circle";
103+
case Type.SPELL: return isFixable ?
104+
"line-icon-problem_type_spell fa-solid fa-wrench":
105+
"line-icon-problem_type_spell fa-solid fa-book";
101106
default: return isFixable ?
102107
"line-icon-problem_type_info fa-solid fa-wrench":
103108
"line-icon-problem_type_info fa-solid fa-info-circle";
@@ -430,6 +435,7 @@ define(function (require, exports, module) {
430435
case Type.ERROR: return Editor.getMarkOptionUnderlineError();
431436
case Type.WARNING: return Editor.getMarkOptionUnderlineWarn();
432437
case Type.META: return Editor.getMarkOptionUnderlineInfo();
438+
case Type.SPELL: return Editor.getMarkOptionUnderlineSpellcheck();
433439
}
434440
}
435441

@@ -438,6 +444,7 @@ define(function (require, exports, module) {
438444
case Type.ERROR: return 3;
439445
case Type.WARNING: return 2;
440446
case Type.META: return 1;
447+
case Type.SPELL: return 1;
441448
}
442449
}
443450

0 commit comments

Comments
 (0)