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

Format each sample project #118

Open
ignasi35 opened this issue Nov 5, 2020 · 2 comments
Open

Format each sample project #118

ignasi35 opened this issue Nov 5, 2020 · 2 comments

Comments

@ignasi35
Copy link
Member

ignasi35 commented Nov 5, 2020

We could add something like https://github.com/akka/akka-guide/blob/54a81ce729ef07e1f9b97f0f15a4ff7d60e4d0ed/scripts/format-all.sh and even remove the separate Travis jobs.
WDYT?

Code, click to exapnd
#!/usr/bin/env bash

declare -r tutorial_root="docs-source/docs/modules/microservices-tutorial/examples"

find ${tutorial_root} -name .scalafmt.conf |
while read result
do
	pushd $(dirname $result)
	sbt scalafmtAll
	popd
done

find ${tutorial_root} -name pom.xml |
while read result
do
	pushd $(dirname $result)
	mvn spotless:apply
	popd
done

Originally posted by @ennru in #116 (comment)

@ignasi35 ignasi35 mentioned this issue Nov 5, 2020
@ignasi35
Copy link
Member Author

ignasi35 commented Nov 5, 2020

I think running the most stable samples in a single travis job could be benefinicial.

If memory serves, here's the usual suspect with more recent flakiness or failures:

  • play-xxx-grpc
  • play-xxx-websocket
  • play-scala-tls

At least.

@mkurz
Copy link
Member

mkurz commented Mar 4, 2023

I like the idea of running scalafmt / javafmt for all examples. We currently have that commented out:

jobs:
# check-code-style:
# name: Code Style
# uses: playframework/.github/.github/workflows/cmd.yml@v3
# with:
# cmd: sbt validateCode
tests:
name: Tests
# needs:
# - "check-code-style"

We could place a global scalafmt config in the root folder and have format script that copies that scalamt config into each project and then goes through the projects and runs validateCode. Very similiar to the test script (even combine those two).
Also maybe same approach is needed with the commons.sbt files which contains the validate commands.

@mkurz mkurz changed the title Refactor Ci jobs Format each sample project Mar 4, 2023
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

No branches or pull requests

2 participants