-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from eed3si9n/wip/scalafix
Bazel + Scalafix
- Loading branch information
Showing
42 changed files
with
371 additions
and
69 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,3 +63,4 @@ jobs: | |
run: | | ||
./bazelenv scala_2.13 | ||
bazel test ... | ||
bin/scalafix ... --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
rules = [ | ||
DisableSyntax, | ||
OrganizeImports, | ||
RemoveUnused, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
load("@scala_multiverse//:cross_scala_config.bzl", "maven_dep") | ||
|
||
alias( | ||
name = "ch_epfl_scala__scalafix-cli", | ||
actual = maven_dep("ch.epfl.scala:::scalafix-cli"), | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
alias( | ||
name = "org_scalameta__semanticdb_scalac", | ||
actual = maven_dep("org.scalameta:::semanticdb.scalac"), | ||
visibility = ["//visibility:public"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit # abort on nonzero exitstatus | ||
set -o nounset # abort on unbound variable | ||
set -o pipefail # don't hide errors within pipes | ||
|
||
BUILD_TARGET_QUERY=${1:-} | ||
if [[ -z "$BUILD_TARGET_QUERY" ]]; then | ||
echo "usage: $0 <query> --rules <scalafix rules>" | ||
exit 1 | ||
fi | ||
shift | ||
|
||
SCALAFIX_TARGETS=$(bazel query "kind('scalafix', $BUILD_TARGET_QUERY)") | ||
for TARGET in $SCALAFIX_TARGETS; do | ||
echo "processing $TARGET" | ||
bazel run "$TARGET" -- $@ | ||
done |
File renamed without changes.
3 changes: 2 additions & 1 deletion
3
...n-test/src/main/scala/gigahorsetest/BUILD → .../src/main/scala/gigahorsetest/BUILD.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
3 changes: 2 additions & 1 deletion
3
...main/scala/gigahorse/support/okhttp/BUILD → ...cala/gigahorse/support/okhttp/BUILD.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
load( | ||
"@io_bazel_rules_scala//scala:scala.bzl", | ||
"setup_scala_toolchain", | ||
) | ||
|
||
setup_scala_toolchain( | ||
name = "scala_toolchain", | ||
scala_compile_classpath = [ | ||
"@maven//:org_scala_lang_scala_compiler", | ||
"@maven//:org_scala_lang_scala_library", | ||
"@maven//:org_scala_lang_scala_reflect", | ||
], | ||
scala_library_classpath = [ | ||
"@maven//:org_scala_lang_scala_library", | ||
"@maven//:org_scala_lang_scala_reflect", | ||
], | ||
scala_macro_classpath = [ | ||
"@maven//:org_scala_lang_scala_library", | ||
"@maven//:org_scala_lang_scala_reflect", | ||
], | ||
scalacopts = [ | ||
"-Yrangepos", | ||
"-deprecation", | ||
"-Xlint", | ||
"-feature", | ||
"-language:existentials", | ||
"-language:higherKinds", | ||
], | ||
visibility = ["//visibility:public"] | ||
) |
Oops, something went wrong.