Skip to content

Commit

Permalink
Remove scalastyle configs from repository
Browse files Browse the repository at this point in the history
* Drop plugin
* Drop scalastyle tests from make recipes
* Remove checkstyle from CI
  • Loading branch information
albert-magyar committed Jul 20, 2020
1 parent cf32172 commit 362fc8b
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 250 deletions.
21 changes: 1 addition & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ executors:
TREADLE_REPO: [email protected]:freechipsproject/treadle.git
TREADLE_BRANCH: master
TREADLE_REV: master
CHECKSTYLE_LIMIT: 40
SBT_ARGS: ""

commands:
Expand Down Expand Up @@ -152,17 +151,6 @@ jobs:
- test-chisel:
scalaVersion: "++2.12.11"

checkstyle-chisel:
executor: chisel-executor
steps:
- attach_workspace:
at: /home/chisel

- run:
command: |
# We expect the "[info]" field from sbt so the warning count will be in column 4
(cd chisel3 && cat /dev/null | sbt $SBT_ARGS scalastyle | gawk -v WARN_FAIL=2 -e '/scalastyle Found [0-9]+ warnings/ { print $0; if ($4 > ENVIRON["CHECKSTYLE_LIMIT"]) WARN_FAIL=1; else if (WARN_FAIL == 2) WARN_FAIL=0 }' -e 'END { exit WARN_FAIL}')
workflows:

build_and_test:
Expand All @@ -180,11 +168,4 @@ workflows:
- test-chisel-2_12:
requires:
- build-treadle
- checkstyle-chisel:
# Strictly speaking, this is only dependent on build-firrtl,
# but it is faster than the test jobs so if it fails,
# it fails the entire build before we get a chance to complete the tests.
# If we make it dependent on at least one of the tests,
# there's a better chance to see if the tests fail before we flag a style failure
requires:
- test-chisel-2_12

3 changes: 0 additions & 3 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ pull_request_rules:
conditions:
- "status-success=ci/circleci: build-firrtl"
- "status-success=ci/circleci: build-prep"
- "status-success=ci/circleci: checkstyle-chisel"
- "status-success=ci/circleci: test-chisel-2_11"
- "status-success=ci/circleci: test-chisel-2_12"
- status-success=license/cla
Expand Down Expand Up @@ -66,7 +65,6 @@ pull_request_rules:
conditions:
- "status-success=ci/circleci: build-firrtl"
- "status-success=ci/circleci: build-prep"
- "status-success=ci/circleci: checkstyle-chisel"
- "status-success=ci/circleci: test-chisel-2_11"
- "status-success=ci/circleci: test-chisel-2_12"
- "status-success=ci/circleci: check-binary-compatibility"
Expand All @@ -86,7 +84,6 @@ pull_request_rules:
conditions:
- "status-success=ci/circleci: build-firrtl"
- "status-success=ci/circleci: build-prep"
- "status-success=ci/circleci: checkstyle-chisel"
- "status-success=ci/circleci: test-chisel-2_11"
- "status-success=ci/circleci: test-chisel-2_12"
- "status-success=ci/circleci: check-binary-compatibility"
Expand Down
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ CHISEL_VERSION = $(shell "$(SBT)" $(SBT_FLAGS) "show version" | tail -n 1 | cut
TEST_OUTPUT_DIR ?= ./test_run_dur
RM_DIRS := $(TEST_OUTPUT_DIR)

.PHONY: smoke publish-local pubishLocal check clean jenkins-build coverage scaladoc test checkstyle compile \
.PHONY: smoke publish-local pubishLocal check clean jenkins-build coverage scaladoc test compile \
mill.build mill.test mill.publishLocal mill.build.all mill.test.all mill.publishLocal.all mill-tools

default: publishLocal
Expand All @@ -42,9 +42,6 @@ publish-local publishLocal:
test:
$(SBT) $(SBT_FLAGS) test

checkstyle:
$(SBT) $(SBT_FLAGS) scalastyle test:scalastyle

coverage:
$(SBT) $(SBT_FLAGS) coverage test
$(SBT) $(SBT_FLAGS) coverageReport coverageAggregate
Expand Down Expand Up @@ -72,7 +69,7 @@ site:
jenkins-build: clean
$(SBT) $(SBT_FLAGS) test
$(SBT) $(SBT_FLAGS) clean publishLocal
$(SBT) $(SBT_FLAGS) scalastyle coverage test
$(SBT) $(SBT_FLAGS) coverage test
$(SBT) $(SBT_FLAGS) coverageReport

# Compile and package jar
Expand Down
1 change: 0 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ lazy val commonSettings = Seq (
scalacOptions := Seq("-deprecation", "-feature") ++ scalacOptionsVersion(scalaVersion.value),
libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value,
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.full),
(scalastyleConfig in Test) := (baseDirectory in root).value / "scalastyle-test-config.xml",
// Use the root project's unmanaged base for all sub-projects.
unmanagedBase := (unmanagedBase in root).value,
// Since we want to examine the classpath to determine if a dependency on firrtl is required,
Expand Down
2 changes: 0 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ resolvers += Classpaths.sbtPluginReleases

resolvers += "jgit-repo" at "https://download.eclipse.org/jgit/maven"

addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")

addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.0")
Expand Down
110 changes: 0 additions & 110 deletions scalastyle-config.xml

This file was deleted.

109 changes: 0 additions & 109 deletions scalastyle-test-config.xml

This file was deleted.

0 comments on commit 362fc8b

Please sign in to comment.