From c90c9934619b6329ab5d3df66aa21c936d94f90f Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Mon, 24 Oct 2022 08:38:59 +0200 Subject: [PATCH 1/2] Make transitive reporting false by default. --- CHANGELOG.md | 2 +- analysis/reanalyze/src/RunConfig.ml | 2 +- analysis/tests/src/expected/Dce.res.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e06c9d7f..611482ee5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ #### :rocket: New Feature -- Add configuration parameter `"transitive"` under `"reanalyze"` is `bsconfig.json`. If set to `false`, the analysis does not report transitively dead items. So removing the reported item individually can be done in isolation. This is a more fine-grained process for guiding the user to remove dead code one item at a time. https://github.com/rescript-lang/rescript-vscode/pull/601 +- Add configuration parameter `"transitive"` under `"reanalyze"` is `bsconfig.json` and make reportst non-transitive by default. If set to `false`, the analysis does not report transitively dead items. So removing the reported item individually can be done in isolation. This is a more fine-grained process for guiding the user to remove dead code one item at a time. https://github.com/rescript-lang/rescript-vscode/pull/601 This feature comes from a conversation with @jfmengels on how https://github.com/jfmengels/elm-review is designed. #### :bug: Bug Fix diff --git a/analysis/reanalyze/src/RunConfig.ml b/analysis/reanalyze/src/RunConfig.ml index 8e9e17319..64a9ed101 100644 --- a/analysis/reanalyze/src/RunConfig.ml +++ b/analysis/reanalyze/src/RunConfig.ml @@ -17,7 +17,7 @@ let runConfig = projectRoot = ""; suppress = []; termination = false; - transitive = true; + transitive = false; unsuppress = []; } diff --git a/analysis/tests/src/expected/Dce.res.txt b/analysis/tests/src/expected/Dce.res.txt index f50cced86..58c835d7a 100644 --- a/analysis/tests/src/expected/Dce.res.txt +++ b/analysis/tests/src/expected/Dce.res.txt @@ -1,3 +1,3 @@ DCE src/Dce.res -issues:2 +issues:1 From d88a16820bbd106257a05c8c18a771be800cc6cd Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Mon, 24 Oct 2022 08:39:41 +0200 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 611482ee5..7f3b22382 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,8 +14,8 @@ #### :rocket: New Feature -- Add configuration parameter `"transitive"` under `"reanalyze"` is `bsconfig.json` and make reportst non-transitive by default. If set to `false`, the analysis does not report transitively dead items. So removing the reported item individually can be done in isolation. This is a more fine-grained process for guiding the user to remove dead code one item at a time. https://github.com/rescript-lang/rescript-vscode/pull/601 -This feature comes from a conversation with @jfmengels on how https://github.com/jfmengels/elm-review is designed. +- Add configuration parameter `"transitive"` under `"reanalyze"` is `bsconfig.json` and make reportst non-transitive by default. If set to `false`, the analysis does not report transitively dead items. So removing the reported item individually can be done in isolation. This is a more fine-grained process for guiding the user to remove dead code one item at a time. https://github.com/rescript-lang/rescript-vscode/pull/601 https://github.com/rescript-lang/rescript-vscode/pull/610 + This feature comes from a conversation with @jfmengels on how https://github.com/jfmengels/elm-review is designed. #### :bug: Bug Fix