Skip to content

Commit be6858d

Browse files
committed
Make dce command less noisy w.r.t. unrelated test changes.
Fixes #515
1 parent b157d31 commit be6858d

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

analysis/src/Commands.ml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,9 @@ let test ~path =
324324
Sys.remove currentFile
325325
| "dce" ->
326326
print_endline ("DCE " ^ path);
327+
Reanalyze.RunConfig.runConfig.suppress <- ["src"];
328+
Reanalyze.RunConfig.runConfig.unsuppress <-
329+
[Filename.concat "src" "dce"];
327330
DceCommand.command ()
328331
| "doc" ->
329332
print_endline ("DocumentSymbol " ^ path);
@@ -390,11 +393,14 @@ let test ~path =
390393
(Protocol.stringifyRange range)
391394
indent indent newText)))
392395
| "dia" -> diagnosticSyntax ~path
393-
| "hin" -> (
396+
| "hin" ->
394397
let line_start = 0 in
395398
let line_end = 6 in
396-
print_endline ("Inlay Hint " ^ path ^ " " ^ string_of_int line_start ^ ":" ^ string_of_int line_end);
397-
inlayhint ~path ~pos:(line_start, line_end) ~maxLength:"25" ~debug:false)
399+
print_endline
400+
("Inlay Hint " ^ path ^ " " ^ string_of_int line_start ^ ":"
401+
^ string_of_int line_end);
402+
inlayhint ~path ~pos:(line_start, line_end) ~maxLength:"25"
403+
~debug:false
398404
| "cle" ->
399405
print_endline ("Code Lens " ^ path);
400406
codeLens ~path ~debug:false

analysis/tests/src/Dce.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
// ^dce
22

3+
let x = 10

analysis/tests/src/dce/DceTest.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
let x = 12
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
DCE src/Dce.res
2-
issues:249
2+
issues:2
33

analysis/tests/src/expected/Debug.res.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Definition src/Debug.res 1:20
33
Dependencies: @rescript/react
44
Source directories: ./node_modules/@rescript/react/src ./node_modules/@rescript/react/src/legacy
55
Source files: ./node_modules/@rescript/react/src/React.res ./node_modules/@rescript/react/src/ReactDOM.res ./node_modules/@rescript/react/src/ReactDOMServer.res ./node_modules/@rescript/react/src/ReactDOMStyle.res ./node_modules/@rescript/react/src/ReactEvent.res ./node_modules/@rescript/react/src/ReactEvent.resi ./node_modules/@rescript/react/src/ReactTestUtils.res ./node_modules/@rescript/react/src/ReactTestUtils.resi ./node_modules/@rescript/react/src/RescriptReactErrorBoundary.res ./node_modules/@rescript/react/src/RescriptReactErrorBoundary.resi ./node_modules/@rescript/react/src/RescriptReactRouter.res ./node_modules/@rescript/react/src/RescriptReactRouter.resi ./node_modules/@rescript/react/src/legacy/ReactDOMRe.res ./node_modules/@rescript/react/src/legacy/ReasonReact.res
6-
Source directories: ./src ./src/expected
7-
Source files: ./src/Auto.res ./src/CodeLens.res ./src/CompletePrioritize1.res ./src/CompletePrioritize2.res ./src/Completion.res ./src/Component.res ./src/Component.resi ./src/CreateInterface.res ./src/Cross.res ./src/Dce.res ./src/Debug.res ./src/Definition.res ./src/DefinitionWithInterface.res ./src/DefinitionWithInterface.resi ./src/Div.res ./src/DocumentSymbol.res ./src/Fragment.res ./src/Highlight.res ./src/Hover.res ./src/InlayHint.res ./src/Jsx.res ./src/Jsx.resi ./src/LongIdentTest.res ./src/Object.res ./src/Patterns.res ./src/RecModules.res ./src/RecordCompletion.res ./src/RecoveryOnProp.res ./src/References.res ./src/ReferencesWithInterface.res ./src/ReferencesWithInterface.resi ./src/Rename.res ./src/RenameWithInterface.res ./src/RenameWithInterface.resi ./src/TableclothMap.ml ./src/TableclothMap.mli ./src/TypeDefinition.res ./src/Xform.res
6+
Source directories: ./src ./src/dce ./src/expected
7+
Source files: ./src/Auto.res ./src/CodeLens.res ./src/CompletePrioritize1.res ./src/CompletePrioritize2.res ./src/Completion.res ./src/Component.res ./src/Component.resi ./src/CreateInterface.res ./src/Cross.res ./src/Dce.res ./src/Debug.res ./src/Definition.res ./src/DefinitionWithInterface.res ./src/DefinitionWithInterface.resi ./src/Div.res ./src/DocumentSymbol.res ./src/Fragment.res ./src/Highlight.res ./src/Hover.res ./src/InlayHint.res ./src/Jsx.res ./src/Jsx.resi ./src/LongIdentTest.res ./src/Object.res ./src/Patterns.res ./src/RecModules.res ./src/RecordCompletion.res ./src/RecoveryOnProp.res ./src/References.res ./src/ReferencesWithInterface.res ./src/ReferencesWithInterface.resi ./src/Rename.res ./src/RenameWithInterface.res ./src/RenameWithInterface.resi ./src/TableclothMap.ml ./src/TableclothMap.mli ./src/TypeDefinition.res ./src/Xform.res ./src/dce/DceTest.res
88
Impl cmt:./lib/bs/src/Auto.cmt res:./src/Auto.res
99
Impl cmt:./lib/bs/src/CodeLens.cmt res:./src/CodeLens.res
1010
Impl cmt:./lib/bs/src/CompletePrioritize1.cmt res:./src/CompletePrioritize1.res
@@ -37,6 +37,7 @@ IntfAndImpl cmti:./lib/bs/src/RenameWithInterface.cmti resi:./src/RenameWithInte
3737
IntfAndImpl cmti:./lib/bs/src/TableclothMap.cmti resi:./src/TableclothMap.mli cmt:./lib/bs/src/TableclothMap.cmt res:./src/TableclothMap.ml
3838
Impl cmt:./lib/bs/src/TypeDefinition.cmt res:./src/TypeDefinition.res
3939
Impl cmt:./lib/bs/src/Xform.cmt res:./src/Xform.res
40+
Impl cmt:./lib/bs/src/dce/DceTest.cmt res:./src/dce/DceTest.res
4041
Dependency dirs: ./node_modules/@rescript/react/lib/bs/src ./node_modules/@rescript/react/lib/bs/src/legacy
4142
Opens from bsconfig:
4243
locItems:

0 commit comments

Comments
 (0)