Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: more github actions & project cleanup #6

Merged
merged 2 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Scala CI

on:
Expand All @@ -26,8 +25,8 @@ jobs:
java-version: '11'
distribution: 'temurin'
cache: 'sbt'
- name: Run tests
run: sbt test
- name: Check formatting & Run Tests
run: sbt fmtCheck test
# Optional: This step uploads information to the GitHub dependency graph and unblocking Dependabot alerts for the repository
- name: Upload dependency graph
uses: scalacenter/sbt-dependency-submission@ab086b50c947c9774b70f39fc7f6e20ca2706c91
uses: scalacenter/sbt-dependency-submission@ab086b50c947c9774b70f39fc7f6e20ca2706c91
2 changes: 1 addition & 1 deletion .github/workflows/semantic-commit-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
scopes: RE-\d+
requireScope: false
requireScope: false
15 changes: 15 additions & 0 deletions .github/workflows/semantic-tagging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Semantic Tagging
on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Bump version and push tag
uses: hennejg/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
7 changes: 4 additions & 3 deletions .scalafix.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ rules = [ OrganizeImports ]

OrganizeImports {
blankLines = Auto
coalesceToWildcardImportThreshold = 2
coalesceToWildcardImportThreshold = 3
expandRelative = false
groupExplicitlyImportedImplicitsSeparately = false
groupedImports = AggressiveMerge
groups = [
"*"
"re:(javax?|scala|dotty)\\."
"re:(dotty)\\."
"re:(scala)\\."
"re:(io\\.github\\.polentino\\.)"
"*"
]
importSelectorsOrder = Ascii
importsOrder = Ascii
Expand Down
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ThisBuild / version := "0.3.0-SNAPSHOT"
ThisBuild / version := "0.3.0"
ThisBuild / scalaVersion := "3.1.3"

ThisBuild / publishMavenStyle := true
Expand Down Expand Up @@ -79,5 +79,5 @@ lazy val redactedTests = (project in file("tests"))
}
)

addCommandAlias("fmt", "; scalafmtAll ; scalafmtSbt") // todo scalafix ?
addCommandAlias("fmt", "; scalafix; scalafmtAll; scalafmtSbt")
addCommandAlias("fmtCheck", "; scalafmtCheckAll ; scalafmtSbtCheck")
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
package io.github.polentino.redacted.helpers

import dotty.tools.dotc.*
import dotty.tools.dotc.ast.{tpd, *}
import dotty.tools.dotc.ast.tpd.*
import dotty.tools.dotc.ast.untpd.Modifiers
import dotty.tools.dotc.core.*
import dotty.tools.dotc.ast.{tpd, *}
import dotty.tools.dotc.core.Constants.Constant
import dotty.tools.dotc.core.Contexts.*
import dotty.tools.dotc.core.Names.TermName
import dotty.tools.dotc.core.Symbols.*
import dotty.tools.dotc.core.*
import dotty.tools.dotc.util.Spans.Span
import io.github.polentino.redacted.helpers.AstOps.*

import scala.util.{Failure, Success, Try}

import io.github.polentino.redacted.helpers.AstOps.*

object PluginOps {
private val TO_STRING_NAME = "toString"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ package io.github.polentino.redacted.phases

import dotty.tools.dotc.ast.tpd
import dotty.tools.dotc.core.Contexts.*
import dotty.tools.dotc.core.Symbols
import dotty.tools.dotc.core.Names
import dotty.tools.dotc.core.{Names, Symbols}
import dotty.tools.dotc.plugins.PluginPhase
import dotty.tools.dotc.report
import dotty.tools.dotc.transform.Pickler
import io.github.polentino.redacted.helpers.PluginOps.*
import io.github.polentino.redacted.helpers.AstOps.*

import scala.util.Try

import io.github.polentino.redacted.helpers.AstOps.*
import io.github.polentino.redacted.helpers.PluginOps.*

final case class PatchToString() extends PluginPhase {

override val runsAfter: Set[String] = Set(Pickler.name)
Expand Down
Loading