Skip to content

Commit b196ead

Browse files
committed
Change exercises
- All exercises share the same `sbt` build definition - Exercises 2 demonstrates a use case for `cmtc pull-template`
1 parent c4d271c commit b196ead

File tree

32 files changed

+488
-57
lines changed

32 files changed

+488
-57
lines changed

.gitignore

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
*.class
22
*.log
33
.bookmark
4-
5-
# Metals/BSP
4+
hypriot.img
5+
collectedLogs/
6+
collectedLogs.zip
7+
8+
# VSCode specific
9+
.vscode
10+
*.code-workspace
11+
12+
# Metals/Bloop/sbt BSP specific
13+
.bloop/
14+
.metals/
15+
.swp
616
.bsp
7-
metals.sbt
8-
9-
# scala-cli
10-
17+
**/project/metals.sbt
1118
**/.scala-build
1219

1320
# sbt specific
@@ -29,6 +36,8 @@ project/plugins/project/
2936
.classpath
3037
.project
3138
.settings/
39+
.cache-main
40+
.cache-tests
3241

3342
# Intellij specific
3443
*.iml
@@ -40,4 +49,8 @@ project/plugins/project/
4049
*.sublime-workspace
4150

4251
# OS specific
43-
.DS_Store
52+
**/.DS_Store
53+
**/__MACOSX
54+
55+
# Other
56+
Preci*.pdf

exercises/exercise_001_getting_started/README.md

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
version = 3.7.2
2+
runner.dialect = scala3
3+
4+
style = defaultWithAlign
5+
indentOperator.preset = akka
6+
maxColumn = 120
7+
rewrite.rules = [RedundantParens, AvoidInfix]
8+
align.tokens = [{code = "=>", owner = "Case"}]
9+
align.openParenDefnSite = false
10+
align.openParenCallSite = false
11+
optIn.breakChainOnFirstMethodDot = false
12+
optIn.configStyleArguments = false
13+
danglingParentheses.defnSite = false
14+
danglingParentheses.callSite = false
15+
rewrite.neverInfix.excludeFilters = [
16+
and
17+
min
18+
max
19+
until
20+
to
21+
by
22+
eq
23+
ne
24+
"should.*"
25+
"contain.*"
26+
"must.*"
27+
in
28+
ignore
29+
be
30+
taggedAs
31+
thrownBy
32+
synchronized
33+
have
34+
when
35+
size
36+
only
37+
noneOf
38+
oneElementOf
39+
noElementsOf
40+
atLeastOneElementOf
41+
atMostOneElementOf
42+
allElementsOf
43+
inOrderElementsOf
44+
theSameElementsAs
45+
message
46+
]
47+
rewriteTokens = {
48+
"⇒": "=>"
49+
"→": "->"
50+
"←": "<-"
51+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Getting started with Scala 3
2+
3+
# Running "Hello World" application
4+
5+
We start with the simplest of simplest program.
6+
7+
Your task is to verify that the program prints
8+
"Hello, world!" on standard out.
9+
10+
# Steps
11+
12+
- In a terminal, cd into the root folder of the
13+
exercise project
14+
- Start an `sbt` session
15+
- Execute the main method by issuing the `run`
16+
command at the `sbt` prompt
17+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
scalaVersion := "3.3.0"
2+
3+
libraryDependencies ++=
4+
Seq("org.scalatest" %% "scalatest" % "3.2.16")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sbt.version=1.9.4
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0")
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
21
@main def main(): Unit =
32
println(s"Hello, world!")

exercises/exercise_002_adding_a_build_definition/README.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

exercises/exercise_002_adding_a_build_definition/build.sbt

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)