Skip to content

Make dce command less noisy w.r.t. unrelated test changes. #523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions analysis/src/Commands.ml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ let test ~path =
Sys.remove currentFile
| "dce" ->
print_endline ("DCE " ^ path);
Reanalyze.RunConfig.runConfig.suppress <- ["src"];
Reanalyze.RunConfig.runConfig.unsuppress <-
[Filename.concat "src" "dce"];
DceCommand.command ()
| "doc" ->
print_endline ("DocumentSymbol " ^ path);
Expand Down Expand Up @@ -390,11 +393,14 @@ let test ~path =
(Protocol.stringifyRange range)
indent indent newText)))
| "dia" -> diagnosticSyntax ~path
| "hin" -> (
| "hin" ->
let line_start = 0 in
let line_end = 6 in
print_endline ("Inlay Hint " ^ path ^ " " ^ string_of_int line_start ^ ":" ^ string_of_int line_end);
inlayhint ~path ~pos:(line_start, line_end) ~maxLength:"25" ~debug:false)
print_endline
("Inlay Hint " ^ path ^ " " ^ string_of_int line_start ^ ":"
^ string_of_int line_end);
inlayhint ~path ~pos:(line_start, line_end) ~maxLength:"25"
~debug:false
| "cle" ->
print_endline ("Code Lens " ^ path);
codeLens ~path ~debug:false
Expand Down
2 changes: 2 additions & 0 deletions analysis/tests/src/Dce.res
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
// Note: in test mode this only reports on src/dce

// ^dce

1 change: 1 addition & 0 deletions analysis/tests/src/dce/DceTest.res
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
let x = 12
2 changes: 1 addition & 1 deletion analysis/tests/src/expected/Dce.res.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
DCE src/Dce.res
issues:249
issues:2

5 changes: 3 additions & 2 deletions analysis/tests/src/expected/Debug.res.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Definition src/Debug.res 1:20
Dependencies: @rescript/react
Source directories: ./node_modules/@rescript/react/src ./node_modules/@rescript/react/src/legacy
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
Source directories: ./src ./src/expected
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
Source directories: ./src ./src/dce ./src/expected
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
Impl cmt:./lib/bs/src/Auto.cmt res:./src/Auto.res
Impl cmt:./lib/bs/src/CodeLens.cmt res:./src/CodeLens.res
Impl cmt:./lib/bs/src/CompletePrioritize1.cmt res:./src/CompletePrioritize1.res
Expand Down Expand Up @@ -37,6 +37,7 @@ IntfAndImpl cmti:./lib/bs/src/RenameWithInterface.cmti resi:./src/RenameWithInte
IntfAndImpl cmti:./lib/bs/src/TableclothMap.cmti resi:./src/TableclothMap.mli cmt:./lib/bs/src/TableclothMap.cmt res:./src/TableclothMap.ml
Impl cmt:./lib/bs/src/TypeDefinition.cmt res:./src/TypeDefinition.res
Impl cmt:./lib/bs/src/Xform.cmt res:./src/Xform.res
Impl cmt:./lib/bs/src/dce/DceTest.cmt res:./src/dce/DceTest.res
Dependency dirs: ./node_modules/@rescript/react/lib/bs/src ./node_modules/@rescript/react/lib/bs/src/legacy
Opens from bsconfig:
locItems:
Expand Down