Samsung / ONE-vscode

Visual Studio Code Extension of ONE compiler toolchain
Apache License 2.0
48 stars 50 forks source link

[CI] Use a spellchecker #415

Open dayo09 opened 2 years ago

dayo09 commented 2 years ago

What?

Let's use a spell checker on github action.

Why?

It helps improving human code review quality by preventing trivial spelling errors.

Expected side-effect : it may generate a lot of false positives only to bother us. Let's test with several spell checker cli tools and find if it may be useful.

dayo09 commented 2 years ago

Let's try spellchecker-cli

Summary

-> Too much false positives.

Log

/node_modules/.bin/spellchecker src/Circletracer.ts 
Spellchecking 1 file...

src/Circletracer.ts
    18:13-18:19  warning  `vscode` is misspelt; did you mean `decode`, `score`, `viscose`?                                                                                                                                                                 retext-spell           retext-spell
    20:14-20:26  warning  `Circletracer` is misspelt                                                                                                                                                                                                       retext-spell           retext-spell
    24:17-24:29  warning  `currentPanel` is misspelt                                                                                                                                                                                                       retext-spell           retext-spell
    24:31-24:43  warning  `Circletracer` is misspelt                                                                                                                                                                                                       retext-spell           retext-spell
    26:17-26:25  warning  `readonly` is misspelt; did you mean `readily`?                                                                                                                                                                                  retext-spell           retext-spell
    26:26-26:34  warning  `viewType` is misspelt                                                                                                                                                                                                           retext-spell           retext-spell
    28:11-28:19  warning  `readonly` is misspelt; did you mean `readily`?                                                                                                                                                                                  retext-spell           retext-spell
    29:11-29:19  warning  `readonly` is misspelt; did you mean `readily`?                                                                                                                                                                                  retext-spell           retext-spell
    29:21-29:33  warning  `extensionUri` is misspelt                                                                                                                                                                                                       retext-spell           retext-spell
    30:19-30:35  warning  `circleToJsonData` is misspelt                                                                                                                                                                                                   retext-spell           retext-spell
    33:17-33:29  warning  `createOrShow` is misspelt                                                                                                                                                                                                       retext-spell           retext-spell
    33:30-33:42  warning  `extensionUri` is misspelt                                                                                                                                                                                                       retext-spell           retext-spell
    33:56-33:68  warning  `circleToJson` is misspelt                                                                                                                                                                                                       retext-spell           retext-spell
    34:30-34:42  warning  `circleToJson` is misspelt                                                                                                                                                                                                       retext-spell           retext-spell
     36:5-36:10  warning  `const` is misspelt; did you mean `canst`, `coast`, `cons`, `cont`, `cost`?                                                                                                                                                      retext-spell           retext-spell
     46:5-46:10  warning  `const` is misspelt; did you mean `canst`, `coast`, `cons`, `cont`, `cost`?                                                                                                                                                      retext-spell           retext-spell
     50:9-50:26  warning  `getWebviewOptions` is misspelt                                                                                                                                                                                                  retext-spell           retext-spell
    53:37-53:49  warning  `Circletracer` is misspelt                                                                                                                                                                                                       retext-spell           retext-spell
    53:57-53:69  warning  `extensionUri` is misspelt                                                                                                                                                                                                       retext-spell           retext-spell
    56:52-56:64  warning  `extensionUri` is misspelt                                                                                                                                                                                                       retext-spell           retext-spell
    57:37-57:49  warning  `Circletracer` is misspelt                                                                                                                                                                                                       retext-spell           retext-spell
    57:57-57:69  warning  `extensionUri` is misspelt                                                                                                                                                                                                       retext-spell           retext-spell
    60:51-60:63  warning  `extensionUri` is misspelt                                                                                                                                                                                                       retext-spell           retext-spell
    62:26-62:38  warning  `extensionUri` is misspelt                                                                                                                                                                                                       retext-spell           retext-spell
    64:16-64:25  warning  `webview's` is misspelt; did you mean `review's`?                                                                                                                                                                                retext-spell           retext-spell
    64:34-64:38  warning  `html` is misspelt; did you mean `HTML`?                                                                                                                                                                                         retext-spell           retext-spell
    68:80-68:96  warning  `programmatically` is misspelt                                                                                                                                                                                                   retext-spell           retext-spell
    78:33-78:40  warning  `webview` is misspelt; did you mean `review`?                                                                                                                                                                                    retext-spell           retext-spell
    88:10-88:20  warning  `doRefactor` is misspelt                                                                                                                                                                                                         retext-spell           retext-spell
    89:30-89:45  warning  Expected `webview` once, not twice                                                                                                                                                                                               retext-repeated-words  retext-repeated-words
    89:30-89:37  warning  `webview` is misspelt; did you mean `review`?                                                                                                                                                                                    retext-spell           retext-spell
    89:38-89:45  warning  `webview` is misspelt; did you mean `review`?                                                                                                                                                                                    retext-spell           retext-spell
    90:25-90:29  warning  `JSON` is misspelt; did you mean `JASON`, `JON`, `SON`?                                                                                                                                                                          retext-spell           retext-spell
   101:7-101:12  warning  `const` is misspelt; did you mean `canst`, `coast`, `cons`, `cont`, `cost`?                                                                                                                                                      retext-spell           retext-spell
   109:5-109:10  warning  `const` is misspelt; did you mean `canst`, `coast`, `cons`, `cont`, `cost`?                                                                                                                                                      retext-spell           retext-spell
  109:11-109:18  warning  `webview` is misspelt; did you mean `review`?                                                                                                                                                                                    retext-spell           retext-spell
  115:11-115:23  warning  `getMediaPath` is misspelt                                                                                                                                                                                                       retext-spell           retext-spell
  116:59-116:71  warning  `Circletracer` is misspelt                                                                                                                                                                                                       retext-spell           retext-spell
  119:12-119:29  warning  `getHtmlForWebview` is misspelt                                                                                                                                                                                                  retext-spell           retext-spell
  119:30-119:37  warning  `webview` is misspelt; did you mean `review`?                                                                                                                                                                                    retext-spell           retext-spell
   121:5-121:10  warning  `const` is misspelt; did you mean `canst`, `coast`, `cons`, `cont`, `cost`?                                                                                                                                                      retext-spell           retext-spell
  121:19-121:27  warning  `getNonce` is misspelt                                                                                                                                                                                                           retext-spell           retext-spell
  123:27-123:29  warning  `js` is misspelt; did you mean `is`, `ks`, `ms`, `us`, `dis`, `s`, `J`, `Jg`, `Jo`, `Jr`, `as`, `cs`, `es`, `gs`, `ls`, `rs`, `ts`, `vs`, `BS`, `HS`, `J's`, `JCS`, `JD`, `JP`, `JV`, `NS`, `Os`, `PS`, `SJ`, `SS`, `XS`, `Zs`?  retext-spell           retext-spell
  123:48-123:55  warning  `webview` is misspelt; did you mean `review`?                                                                                                                                                                                    retext-spell           retext-spell
  124:16-124:19  warning  `uri` is misspelt; did you mean `uric`, `Uris`, `uni`, `urn`, `Fri`, `MRI`, `RI`, `UPI`, `Ur`, `URL`, `Uzi`, `YURI`?                                                                                                             retext-spell           retext-spell
  124:54-124:61  warning  `webview` is misspelt; did you mean `review`?                                                                                                                                                                                    retext-spell           retext-spell
   125:5-125:10  warning  `const` is misspelt; did you mean `canst`, `coast`, `cons`, `cont`, `cost`?                                                                                                                                                      retext-spell           retext-spell
  125:11-125:25  warning  `loadFileOnDisk` is misspelt                                                                                                                                                                                                     retext-spell           retext-spell
   126:5-126:10  warning  `const` is misspelt; did you mean `canst`, `coast`, `cons`, `cont`, `cost`?                                                                                                                                                      retext-spell           retext-spell
  126:11-126:22  warning  `loadFileUri` is misspelt                                                                                                                                                                                                        retext-spell           retext-spell
   128:5-128:10  warning  `const` is misspelt; did you mean `canst`, `coast`, `cons`, `cont`, `cost`?                                                                                                                                                      retext-spell           retext-spell
  128:11-128:24  warning  `treeMapOnDisk` is misspelt                                                                                                                                                                                                      retext-spell           retext-spell
   129:5-129:10  warning  `const` is misspelt; did you mean `canst`, `coast`, `cons`, `cont`, `cost`?                                                                                                                                                      retext-spell           retext-spell
  129:11-129:21  warning  `treeMapUri` is misspelt                                                                                                                                                                                                         retext-spell           retext-spell
   131:5-131:10  warning  `const` is misspelt; did you mean `canst`, `coast`, `cons`, `cont`, `cost`?                                                                                                                                                      retext-spell           retext-spell
  131:11-131:25  warning  `makeDataOnDisk` is misspelt                                                                                                                                                                                                     retext-spell           retext-spell
   132:5-132:10  warning  `const` is misspelt; did you mean `canst`, `coast`, `cons`, `cont`, `cost`?                                                                                                                                                      retext-spell           retext-spell
  132:11-132:22  warning  `makeDataUri` is misspelt                                                                                                                                                                                                        retext-spell           retext-spell
   134:5-134:10  warning  `const` is misspelt; did you mean `canst`, `coast`, `cons`, `cont`, `cost`?                                                                                                                                                      retext-spell           retext-spell
  134:11-134:22  warning  `utilsOnDisk` is misspelt                                                                                                                                                                                                        retext-spell           retext-spell
   135:5-135:10  warning  `const` is misspelt; did you mean `canst`, `coast`, `cons`, `cont`, `cost`?                                                                                                                                                      retext-spell           retext-spell
  135:11-135:19  warning  `utilsUri` is misspelt                                                                                                                                                                                                           retext-spell           retext-spell
   137:5-137:10  warning  `const` is misspelt; did you mean `canst`, `coast`, `cons`, `cont`, `cost`?                                                                                                                                                      retext-spell           retext-spell
  137:11-137:27  warning  `circleInfoOnDisk` is misspelt                                                                                                                                                                                                   retext-spell           retext-spell
   138:5-138:10  warning  `const` is misspelt; did you mean `canst`, `coast`, `cons`, `cont`, `cost`?                                                                                                                                                      retext-spell           retext-spell
  138:11-138:24  warning  `circleInfoUri` is misspelt                                                                                                                                                                                                      retext-spell           retext-spell
   140:5-140:10  warning  `const` is misspelt; did you mean `canst`, `coast`, `cons`, `cont`, `cost`?                                                                                                                                                      retext-spell           retext-spell
  140:11-140:22  warning  `dagreOnDisk` is misspelt                                                                                                                                                                                                        retext-spell           retext-spell
   141:5-141:10  warning  `const` is misspelt; did you mean `canst`, `coast`, `cons`, `cont`, `cost`?                                                                                                                                                      retext-spell           retext-spell
  141:11-141:19  warning  `dagreUri` is misspelt                                                                                                                                                                                                           retext-spell           retext-spell
  143:22-143:25  warning  `css` is misspelt; did you mean `cs`, `CSS`, `ass`, `cos`, `cps`, `cuss`, `C's`, `CBS`, `CNS`, `CST`, `CVS`, `ISS`, `SS`, `SSS`, `USS`?                                                                                          retext-spell           retext-spell
   144:8-144:11  warning  `Uri` is misspelt; did you mean `Uzi`, `Uric`, `Uris`, `Fri`, `Uni`, `Ur`, `Urn`, `MRI`, `RI`, `UPI`, `URL`, `YURI`?                                                                                                             retext-spell           retext-spell
  144:32-144:39  warning  `webview` is misspelt; did you mean `review`?                                                                                                                                                                                    retext-spell           retext-spell
   145:5-145:10  warning  `const` is misspelt; did you mean `canst`, `coast`, `cons`, `cont`, `cost`?                                                                                                                                                      retext-spell           retext-spell
  145:11-145:20  warning  `stylePath` is misspelt                                                                                                                                                                                                          retext-spell           retext-spell
   146:5-146:10  warning  `const` is misspelt; did you mean `canst`, `coast`, `cons`, `cont`, `cost`?                                                                                                                                                      retext-spell           retext-spell
  146:11-146:19  warning  `styleUri` is misspelt                                                                                                                                                                                                           retext-spell           retext-spell
  148:15-148:19  warning  `html` is misspelt; did you mean `HTML`?                                                                                                                                                                                         retext-spell           retext-spell
   149:5-149:10  warning  `const` is misspelt; did you mean `canst`, `coast`, `cons`, `cont`, `cost`?                                                                                                                                                      retext-spell           retext-spell
  149:11-149:19  warning  `htmlPath` is misspelt                                                                                                                                                                                                           retext-spell           retext-spell
   150:9-150:13  warning  `html` is misspelt; did you mean `HTML`?                                                                                                                                                                                         retext-spell           retext-spell
  152:14-152:16  warning  `js` is misspelt; did you mean `is`, `ks`, `ms`, `us`, `dis`, `s`, `J`, `Jg`, `Jo`, `Jr`, `as`, `cs`, `es`, `gs`, `ls`, `rs`, `ts`, `vs`, `BS`, `HS`, `J's`, `JCS`, `JD`, `JP`, `JV`, `NS`, `Os`, `PS`, `SJ`, `SS`, `XS`, `Zs`?  retext-spell           retext-spell
  152:21-152:24  warning  `css` is misspelt; did you mean `cs`, `CSS`, `ass`, `cos`, `cps`, `cuss`, `C's`, `CBS`, `CNS`, `CST`, `CVS`, `ISS`, `SS`, `SSS`, `USS`?                                                                                          retext-spell           retext-spell
   152:28-153:9  warning  Expected `html` once, not twice                                                                                                                                                                                                  retext-repeated-words  retext-repeated-words
  152:28-152:32  warning  `html` is misspelt; did you mean `HTML`?                                                                                                                                                                                         retext-spell           retext-spell
    153:5-153:9  warning  `html` is misspelt; did you mean `HTML`?                                                                                                                                                                                         retext-spell           retext-spell
    154:5-154:9  warning  `html` is misspelt; did you mean `HTML`?                                                                                                                                                                                         retext-spell           retext-spell
    155:5-155:9  warning  `html` is misspelt; did you mean `HTML`?                                                                                                                                                                                         retext-spell           retext-spell
    156:5-156:9  warning  `html` is misspelt; did you mean `HTML`?                                                                                                                                                                                         retext-spell           retext-spell
    157:5-157:9  warning  `html` is misspelt; did you mean `HTML`?                                                                                                                                                                                         retext-spell           retext-spell
    158:5-158:9  warning  `html` is misspelt; did you mean `HTML`?                                                                                                                                                                                         retext-spell           retext-spell
    159:5-159:9  warning  `html` is misspelt; did you mean `HTML`?                                                                                                                                                                                         retext-spell           retext-spell
    160:5-160:9  warning  `html` is misspelt; did you mean `HTML`?                                                                                                                                                                                         retext-spell           retext-spell
    161:5-161:9  warning  `html` is misspelt; did you mean `HTML`?                                                                                                                                                                                         retext-spell           retext-spell
  165:12-165:16  warning  `html` is misspelt; did you mean `HTML`?                                                                                                                                                                                         retext-spell           retext-spell
  169:10-169:18  warning  `getNonce` is misspelt                                                                                                                                                                                                           retext-spell           retext-spell
    171:3-171:8  warning  `const` is misspelt; did you mean `canst`, `coast`, `cons`, `cont`, `cost`?                                                                                                                                                      retext-spell           retext-spell
  178:10-178:27  warning  `getWebviewOptions` is misspelt                                                                                                                                                                                                  retext-spell           retext-spell
  178:28-178:40  warning  `extensionUri` is misspelt                                                                                                                                                                                                       retext-spell           retext-spell
  180:15-180:25  warning  `javascript` is misspelt                                                                                                                                                                                                         retext-spell           retext-spell
  180:33-180:40  warning  `webview` is misspelt; did you mean `review`?                                                                                                                                                                                    retext-spell           retext-spell
   181:5-181:18  warning  `enableScripts` is misspelt                                                                                                                                                                                                      retext-spell           retext-spell
  183:25-183:32  warning  `webview` is misspelt; did you mean `review`?                                                                                                                                                                                    retext-spell           retext-spell
  183:85-183:97  warning  `Circletracer` is misspelt                                                                                                                                                                                                       retext-spell           retext-spell
   185:5-185:23  warning  `localResourceRoots` is misspelt                                                                                                                                                                                                 retext-spell           retext-spell
  185:67-185:79  warning  `Circletracer` is misspelt                                                                                                                                                                                                       retext-spell           retext-spell
dayo09 commented 2 years ago

Let's try typos

Summary

It has detected 1 false positive and 2 actual typos within src directory.

Log

error: `Neares` should be `Nearest`
  --> ../git/ONE-vscode/src/Circlereader/util/optionsAttribute.ts:497:14
    |
497 |     let resizeNearesNeighborOpt = new ResizeNearestNeighborOptions();
    |               ^^^^^^
    |
error: `Neares` should be `Nearest`
  --> ../git/ONE-vscode/src/Circlereader/util/optionsAttribute.ts:498:10
    |
498 |     resizeNearesNeighborOpt = operator.builtinOptions<flatbuffers.Table>(resizeNearesNeighborOpt);
    |           ^^^^^^
    |
error: `Neares` should be `Nearest`
  --> ../git/ONE-vscode/src/Circlereader/util/optionsAttribute.ts:498:79
    |
498 |     resizeNearesNeighborOpt = operator.builtinOptions<flatbuffers.Table>(resizeNearesNeighborOpt);
    |                                                                                ^^^^^^
    |
error: `Neares` should be `Nearest`
  --> ../git/ONE-vscode/src/Circlereader/util/optionsAttribute.ts:500:61
    |
500 |     attributes.push({attribute: 'alignCorners', value: resizeNearesNeighborOpt.alignCorners()});
    |                                                              ^^^^^^
    |
error: `contructor` should be `constructor`
  --> ../git/ONE-vscode/src/Tests/Project/JobImportTFLite.test.ts:23:12
   |
23 |     suite('#contructor()', function() {
   |             ^^^^^^^^^^
   |
error: `contructed` should be `constructed`
  --> ../git/ONE-vscode/src/Tests/Project/JobImportTFLite.test.ts:24:15
   |
24 |       test('is contructed with jobtype', function() {
   |                ^^^^^^^^^^
   |
error: `contructor` should be `constructor`
  --> ../git/ONE-vscode/src/Tests/Project/JobQuantize.test.ts:23:12
   |
23 |     suite('#contructor()', function() {
   |             ^^^^^^^^^^
   |
error: `contructed` should be `constructed`
  --> ../git/ONE-vscode/src/Tests/Project/JobQuantize.test.ts:24:15
   |
24 |       test('is contructed with jobtype', function() {
   |                ^^^^^^^^^^
   |
error: `contructor` should be `constructor`
  --> ../git/ONE-vscode/src/Tests/Project/JobCodegen.test.ts:23:12
   |
23 |     suite('#contructor()', function() {
   |             ^^^^^^^^^^
   |
error: `contructed` should be `constructed`
  --> ../git/ONE-vscode/src/Tests/Project/JobCodegen.test.ts:24:15
   |
24 |       test('is contructed with jobtype', function() {
   |                ^^^^^^^^^^
   |
error: `contructor` should be `constructor`
  --> ../git/ONE-vscode/src/Tests/Project/Workflow.test.ts:30:12
   |
30 |     suite('#contructor()', function() {
   |             ^^^^^^^^^^
   |
error: `contructor` should be `constructor`
  --> ../git/ONE-vscode/src/Tests/Project/JobPack.test.ts:23:12
   |
23 |     suite('#contructor()', function() {
   |             ^^^^^^^^^^
   |
error: `contructed` should be `constructed`
  --> ../git/ONE-vscode/src/Tests/Project/JobPack.test.ts:24:15
   |
24 |       test('is contructed with jobtype', function() {
   |                ^^^^^^^^^^
   |
error: `contructor` should be `constructor`
  --> ../git/ONE-vscode/src/Tests/Project/JobOptimize.test.ts:23:12
   |
23 |     suite('#contructor()', function() {
   |             ^^^^^^^^^^
   |
error: `contructed` should be `constructed`
  --> ../git/ONE-vscode/src/Tests/Project/JobOptimize.test.ts:24:15
   |
24 |       test('is contructed with jobtype', function() {
   |                ^^^^^^^^^^
   |
error: `contructor` should be `constructor`
  --> ../git/ONE-vscode/src/Tests/Project/JobImportTF.test.ts:23:12
   |
23 |     suite('#contructor()', function() {
   |             ^^^^^^^^^^
   |
error: `contructed` should be `constructed`
  --> ../git/ONE-vscode/src/Tests/Project/JobImportTF.test.ts:24:15
   |
24 |       test('is contructed with jobtype', function() {
   |                ^^^^^^^^^^
   |
error: `contructor` should be `constructor`
  --> ../git/ONE-vscode/src/Tests/Project/Builder.test.ts:25:12
   |
25 |     suite('#contructor()', function() {
   |             ^^^^^^^^^^
   |
error: `contructed` should be `constructed`
  --> ../git/ONE-vscode/src/Tests/Project/Builder.test.ts:26:15
   |
26 |       test('is contructed with Logger', function() {
   |                ^^^^^^^^^^
   |
error: `contructor` should be `constructor`
  --> ../git/ONE-vscode/src/Tests/Project/JobImportBCQ.test.ts:23:12
   |
23 |     suite('#contructor()', function() {
   |             ^^^^^^^^^^
   |
error: `contructed` should be `constructed`
  --> ../git/ONE-vscode/src/Tests/Project/JobImportBCQ.test.ts:24:15
   |
24 |       test('is contructed with jobtype', function() {
   |                ^^^^^^^^^^
   |
error: `contructor` should be `constructor`
  --> ../git/ONE-vscode/src/Tests/Project/JobImportONNX.test.ts:23:12
   |
23 |     suite('#contructor()', function() {
   |             ^^^^^^^^^^
   |
error: `contructed` should be `constructed`
  --> ../git/ONE-vscode/src/Tests/Project/JobImportONNX.test.ts:24:15
   |
24 |       test('is contructed with jobtype', function() {
   |                ^^^^^^^^^^
   |
error: `structed` should be `structured`
  --> ../git/ONE-vscode/src/Tests/README.md:26:22
   |
26 | `src/Tests` should be structed following `src/` with each test file.
   |                       ^^^^^^^^
   |
dayo09 commented 2 years ago

Let's remove this from milestone, as it's priority is not high