diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b024a22..7aba7fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: matrix: os: [ubuntu-latest] scala: [2.13, 2.12] - java: [temurin@8] + java: [temurin@11] runs-on: ${{ matrix.os }} timeout-minutes: 60 steps: @@ -38,39 +38,39 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (temurin@8) - id: setup-java-temurin-8 - if: matrix.java == 'temurin@8' + - name: Setup Java (temurin@11) + id: setup-java-temurin-11 + if: matrix.java == 'temurin@11' uses: actions/setup-java@v3 with: distribution: temurin - java-version: 8 + java-version: 11 cache: sbt - name: sbt update - if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false' run: sbt +update - name: Check that workflows are up to date run: sbt githubWorkflowCheck - name: Check headers and formatting - if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest' run: sbt '++ ${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck - name: Check scalafix lints - if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest' run: sbt '++ ${{ matrix.scala }}' 'scalafixAll --check' - name: Test run: sbt '++ ${{ matrix.scala }}' test - name: Check binary compatibility - if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest' run: sbt '++ ${{ matrix.scala }}' mimaReportBinaryIssues - name: Generate API documentation - if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest' run: sbt '++ ${{ matrix.scala }}' doc - name: Make target directories @@ -95,7 +95,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - java: [temurin@8] + java: [temurin@11] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -103,17 +103,17 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (temurin@8) - id: setup-java-temurin-8 - if: matrix.java == 'temurin@8' + - name: Setup Java (temurin@11) + id: setup-java-temurin-11 + if: matrix.java == 'temurin@11' uses: actions/setup-java@v3 with: distribution: temurin - java-version: 8 + java-version: 11 cache: sbt - name: sbt update - if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false' run: sbt +update - name: Download target directories (2.13) @@ -166,7 +166,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - java: [temurin@8] + java: [temurin@11] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -174,17 +174,17 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (temurin@8) - id: setup-java-temurin-8 - if: matrix.java == 'temurin@8' + - name: Setup Java (temurin@11) + id: setup-java-temurin-11 + if: matrix.java == 'temurin@11' uses: actions/setup-java@v3 with: distribution: temurin - java-version: 8 + java-version: 11 cache: sbt - name: sbt update - if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false' run: sbt +update - name: Submit Dependencies @@ -198,7 +198,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - java: [temurin@8] + java: [temurin@11] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -206,17 +206,17 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (temurin@8) - id: setup-java-temurin-8 - if: matrix.java == 'temurin@8' + - name: Setup Java (temurin@11) + id: setup-java-temurin-11 + if: matrix.java == 'temurin@11' uses: actions/setup-java@v3 with: distribution: temurin - java-version: 8 + java-version: 11 cache: sbt - name: sbt update - if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false' run: sbt +update - name: Generate site diff --git a/README.md b/README.md new file mode 100644 index 0000000..66e69dc --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# semgrep-scalafix + +scalafix rules that mimic some semgrep ones diff --git a/build.sbt b/build.sbt index e6f297c..9da807d 100644 --- a/build.sbt +++ b/build.sbt @@ -21,6 +21,7 @@ val scalafixV = "0.11.1" ThisBuild / crossScalaVersions := Seq(Scala213, "2.12.18") ThisBuild / scalaVersion := Scala213 // the default Scala +ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("11")) // semantic db settings ThisBuild / semanticdbEnabled := true @@ -32,7 +33,17 @@ lazy val root = project .aggregate(scalafixRules, scalafixTests) .enablePlugins(NoPublishPlugin) -lazy val docs = project.in(file("site")).enablePlugins(TypelevelSitePlugin) +lazy val docs = project + .in(file("site")) + .enablePlugins(TypelevelSitePlugin) + .settings(tlSiteHelium ~= { + import laika.helium.config._ + import laika.ast.Path.Root + _.site + .topNavigationBar( + homeLink = IconLink.internal(Root / "index.md", HeliumIcon.home) + ) + }) lazy val scalafixRules = project .in(file("rules"))