From c04fd1f2136f028679486d0166ab50bc6adc3d1c Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Tue, 6 Oct 2026 04:46:55 +0200 Subject: [PATCH] Ignore local tests/elm_home MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously: ❯ npm test >/dev/null && npx elm-review -- ELM-REVIEW ERROR ----------------------------------------------- GLOBAL ERROR Incorrect project: Found several modules named `AsciiTable` I found several modules with the name `AsciiTable`. Depending on how I choose to resolve this, I might give you different reports. Since this is a compiler error anyway, I require this problem to be solved. Please fix this then try running `elm-review` again. Here are the paths to some of the files that share a module name: - src/AsciiTable.elm - tests/elm_home/0.19.2/packages/elm-explorations/test/2.2.1/src/AsciiTable.elm It is possible that you requested me to look at several projects, and that modules from each project share the same name. I don't recommend reviewing several projects at the same time, as I can only handle one `elm.json`. I instead suggest running `elm-review` twice, once for each project. I found 1 global error. For that reason, the "review" script in package.json removed `tests/elm_home` before running elm-review. We also had to list specific directories for the "format" script. That list of directories was missing the `review/` folder. This commit changes the local `ELM_HOME` directory we use in `run-tests.sh` to include "elm-stuff", so that elm-review and elm-format ignore it. It also results in intellij-elm ignoring it, insteading reporting that functions are used in duplicate places. This commit then simplifies the "review" and "format" scripts. --- package.json | 4 ++-- tests/run-tests.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 8a450fce..3c55ca27 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "scripts": { "test": "bash tests/run-tests.sh", "test:random": "RANDOMIZED=1 bash tests/run-tests.sh", - "format": "elm-format --validate src tests/src benchmarks", - "review": "rm -rf tests/elm_home && elm-review", + "format": "elm-format --validate .", + "review": "elm-review", "install-local": "rm -rf ~/.elm/0.19.2/packages/elm-explorations/test/2.2.1/ && mkdir -p ~/.elm/0.19.2/packages/elm-explorations/test/2.2.1/ && cp -r ./{src,elm.json,LICENSE,README.md} ~/.elm/0.19.2/packages/elm-explorations/test/2.2.1/" }, "author": "Richard Feldman", diff --git a/tests/run-tests.sh b/tests/run-tests.sh index 9417905e..a28bddfe 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -13,7 +13,7 @@ cd "${0%/*}" # Change current working directory to this one. PACKAGE_NAME=$(grep '"name"' ../elm.json | cut -d \" -f4) PACKAGE_VERSION=$(grep '"version"' ../elm.json | cut -d \" -f4) -ELM_HOME="elm_home" +ELM_HOME="elm_home/elm-stuff" # elm-stuff so that elm-review, elm-format and IDE:s ignore it. PACKAGE_PATH="${ELM_HOME}/0.19.2/packages/${PACKAGE_NAME}/${PACKAGE_VERSION}" if [ -z ${NOCLEANUP+x} ]; then