Skip to content
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

update the directory to run the tests/test command from #1859

Merged
merged 1 commit into from
Sep 2, 2023

Conversation

msolomon-ck
Copy link
Contributor

@msolomon-ck msolomon-ck commented Sep 2, 2023

Problem

Given the existing tutorial instructions when I run the tests/test command form inside the scalafix-named-literal-arguments directory I get the following sbt error

sbt:scalafix-named-literal-arguments> tests/test
[error] Expected ID character
[error] Not a valid command: tests (similar: tasks, set, last)
[error] Expected project ID
[error] Expected configuration
[error] Expected ':'
[error] Expected key
[error] Not a valid key: tests (similar: test, testOnly, testOptions)
[error] tests/test
[error]

Solution

Updating the instructions to run the command from the scalafix-named-literal-arguments/scalafix directory fixes the issue.

~/sandbox/scalafix-named-literal-arguments-test/scalafix on main ?1                                                                                                                                                                        at 14:15:41
> sbt
[info] welcome to sbt 1.9.0 (Amazon.com Inc. Java 1.8.0_382)
[info] loading global plugins from /Users/mack.solomon/.sbt/1.0/plugins
[info] loading settings for project scalafix-build from plugins.sbt ...
[info] loading project definition from /Users/mack.solomon/sandbox/scalafix-named-literal-arguments-test/scalafix/project
[info] loading settings for project scalafix from build.sbt ...
[info] set current project to scalafix (in build file:/Users/mack.solomon/sandbox/scalafix-named-literal-arguments-test/scalafix/)
[info]
[info] Here are some highlights of sbt 1.9.0:
[info]   - POM consistency of sbt plugin publishing
[info]   - sbt new, a text-based adventure
[info]   - Deprecation of IntegrationTest configuration
[info] See https://eed3si9n.com/sbt-1.9.0 for full release notes.
[info] Hide the banner for this release by running `skipBanner`.
[info] sbt server started at local:///Users/mack.solomon/.sbt/1.0/server/6d3503f5ad29fae7fdad/sock
[info] started sbt server
sbt:scalafix> tests/test
[info] compiling 3 Scala sources to /Users/mack.solomon/sandbox/scalafix-named-literal-arguments-test/scalafix/input/target/scala-2.13/classes ...
[info] compiling 2 Scala sources to /Users/mack.solomon/sandbox/scalafix-named-literal-arguments-test/scalafix/rules/target/scala-2.13/classes ...
[warn] /Users/mack.solomon/sandbox/scalafix-named-literal-arguments-test/scalafix/rules/src/main/scala/fix/NoLiteralArguments.scala:24:16: Implicit definition should have explicit type (inferred metaconfig.generic.Surface[fix.NoLiteralArgumentsConfig])
[warn]   implicit val surface =
[warn]                ^
[warn] /Users/mack.solomon/sandbox/scalafix-named-literal-arguments-test/scalafix/rules/src/main/scala/fix/NoLiteralArguments.scala:26:16: Implicit definition should have explicit type (inferred metaconfig.ConfDecoder[fix.NoLiteralArgumentsConfig])
[warn]   implicit val decoder =
[warn]                ^
[warn] 4 deprecations; re-run with -deprecation for details
[warn] three warnings found
[info] compiling 1 Scala source to /Users/mack.solomon/sandbox/scalafix-named-literal-arguments-test/scalafix/tests/target/scala-2.13/test-classes ...
[info] RuleSuite:
[info] - test/NamedLiteralArguments.scala
[info] - test/NoLiteralArgumentsConfig.scala
[info] - test/NoLiteralArguments.scala
[info] Run completed in 1 second, 33 milliseconds.
[info] Total number of tests run: 3
[info] Suites: completed 1, aborted 0
[info] Tests: succeeded 3, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.
[success] Total time: 7 s, completed Sep 2, 2023 2:16:00 PM

Copy link
Collaborator

@bjaglin bjaglin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@bjaglin bjaglin merged commit 740b36e into scalacenter:main Sep 2, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants