portable-scala / portable-scala-reflect

Platform independent reflection for Scala
BSD 3-Clause "New" or "Revised" License
42 stars 14 forks source link

Set up Scalafmt and Scalafix and other small improvements #39

Open sideeffffect opened 3 years ago

sideeffffect commented 3 years ago

Update versions and other small improvements.

sideeffffect commented 3 years ago

Hello, could somebody please have a look at this PR? :pray: /cc @sjrd @gzm0

sideeffffect commented 3 years ago

Terse reviews are the best -- quick to read and act upon :smile_cat: Thank you Tobias!

sideeffffect commented 3 years ago

I've merged in the newest master branch containing the fix for InstantiatableClass using getDeclaredConstructor. Could you please give this another round of review? @gzm0 @sjrd

sideeffffect commented 3 years ago

@gzm0 @sjrd could you please give this another look? :pray:

sideeffffect commented 3 years ago

Or would you @sjrd prefer to adopt the Scalafmt configuration from Scala Native (https://github.com/scala-native/scala-native/pull/2315), i.e.

# Overall we are trying to use default settings to the
# maximum extent possible. Removing non-default
# settings is preferred over adding especially as
# the Scala language evolves and styles change.
# Test upgrades: $ scripts/scalafmt --test 2> diff.txt
version = "3.0.0-RC5"
docstrings.style = AsteriskSpace
project.git = true
project.excludePaths = [
  "glob:**/scalalib/**"
]
# This creates less of a diff but is not default
# but is more aligned with Scala.js syntax.
newlines.beforeCurlyLambdaParams = multilineWithCaseOnly

# Keep control sites more streamlined
indent.ctrlSite = 4
danglingParentheses.ctrlSite = false

# default value is 10,000
# Message about NirGenExpr.scala goes away between 18k and 20k
runner.optimizer.maxVisitsPerToken = 20000
rewriteTokens = {
  "⇒": "=>"
  "→": "->"
  "←": "<-"
}