File tree Expand file tree Collapse file tree 3 files changed +76
-0
lines changed Expand file tree Collapse file tree 3 files changed +76
-0
lines changed Original file line number Diff line number Diff line change 7
7
/linker-interface /** /scalajs-logging-src-jars /
8
8
/node_modules /
9
9
10
+ # scalafmt generated
11
+ scripts /.coursier
12
+ scripts /.scalafmt *
13
+
10
14
# IDE specific
11
15
.cache
12
16
.classpath
Original file line number Diff line number Diff line change
1
+ # Overall we are trying to use default settings to the
2
+ # maximum extent possible. Removing non-default
3
+ # settings is preferred over adding especially as
4
+ # the Scala language evolves and styles change.
5
+ # Test upgrades: $ scripts/scalafmt --test 2> diff.txt
6
+ version = 3.8 .0
7
+ docstrings.style = AsteriskSpace
8
+ project.git = true
9
+ project.excludePaths = [
10
+ "glob:**/scalalib/**" ,
11
+ "glob:**/project/**" ,
12
+ "glob:**/test-suite/js/src/test/resources/SourceMapTestTemplate.scala"
13
+ ]
14
+
15
+ # Default runner.dialect is deprecated, so set explicitly
16
+ runner.dialect = scala213source3
17
+
18
+ # new additions
19
+ fileOverride {
20
+ "glob:**/scala3/**" {
21
+ runner.dialect = scala3
22
+ }
23
+ }
24
+
25
+ optIn.breakChainOnFirstMethodDot = false
26
+
27
+ # Preserve some overflow
28
+ newlines.avoidForSimpleOverflow = [tooLong , punct , slc ]
29
+
30
+ indent.callSite = 4
31
+ indentOperator.exemptScope = aloneArgOrBody
32
+ indentOperator.include = ".*"
33
+ indentOperator.exclude = "^(?:&&|\\ |\\ ||\\ +)$"
34
+
35
+ newlines.source = keep
36
+
37
+ binPack.preset = true
38
+ binPack.parentConstructors = keep
39
+ binPack.unsafeCallSite = oneline
40
+ binPack.literalsExclude = []
41
+ binPack.literalsIncludeSimpleExpr = true
42
+
43
+ # Keep control sites more streamlined
44
+ indent.ctrlSite = 4
45
+ danglingParentheses.ctrlSite = false
46
+
47
+ rewriteTokens = {
48
+ "⇒" : "=>"
49
+ "→" : "->"
50
+ "←" : "<-"
51
+ }
52
+
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -e
4
+
5
+ HERE=" ` dirname $0 ` "
6
+ VERSION=$( sed -nre " s#\s*version[^0-9]+([0-9.]+)#\1#p" $HERE /../.scalafmt.conf)
7
+ COURSIER=" $HERE /.coursier"
8
+ SCALAFMT=" $HERE /.scalafmt-$VERSION "
9
+
10
+ if [ ! -f $COURSIER ]; then
11
+ curl -L -o $COURSIER https://git.io/coursier-cli
12
+ chmod +x $COURSIER
13
+ fi
14
+
15
+ if [ ! -f $SCALAFMT ]; then
16
+ $COURSIER bootstrap org.scalameta:scalafmt-cli_2.13:$VERSION -r sonatype:snapshots --main org.scalafmt.cli.Cli -o $SCALAFMT
17
+ chmod +x $SCALAFMT
18
+ fi
19
+
20
+ $SCALAFMT " $@ "
You can’t perform that action at this time.
0 commit comments