Skip to content

Support multi-line artifact and version#2232

Merged
exoego merged 1 commit into
scala-steward-org:masterfrom
exoego:multiline
Oct 5, 2021
Merged

Support multi-line artifact and version#2232
exoego merged 1 commit into
scala-steward-org:masterfrom
exoego:multiline

Conversation

@exoego

@exoego exoego commented Sep 15, 2021

Copy link
Copy Markdown
Contributor

Closes #2099

Multi-line artifact and its version now will be updated.
This could be helpful specially for Maven users, because dependencies in Maven are often declared like below:

<dependency>
    <groupId>commons-io</groupId>
    <artifactId>commons-io</artifactId>
    <version>2.6</version>
</dependency>

@exoego exoego added the enhancement New feature or request label Sep 15, 2021

private def isCommonWord(s: String): Boolean =
s === "scala"
s === "scala" || s === "sbt"

@exoego exoego Sep 15, 2021

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note) This is added to keep the below test as-is.
sbt-scalafmt vs sbt-pgp.

    val original = """val scalafmt = "2.0.1"
                     |addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1")
                     |""".stripMargin
    val expected = """val scalafmt = "2.0.7"
                     |addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1")
                     |""".stripMargin

I think ignoring sbt is reasonable to avoid wrong match.

@codecov

codecov Bot commented Sep 15, 2021

Copy link
Copy Markdown

Codecov Report

Merging #2232 (3fbe150) into master (8d14763) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2232   +/-   ##
=======================================
  Coverage   78.18%   78.18%           
=======================================
  Files         131      131           
  Lines        2251     2251           
  Branches       60       44   -16     
=======================================
  Hits         1760     1760           
  Misses        491      491           
Impacted Files Coverage Δ
...a/org/scalasteward/core/edit/UpdateHeuristic.scala 98.80% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d14763...3fbe150. Read the comment docs.

@exoego exoego requested a review from fthomas September 23, 2021 11:20
@exoego

exoego commented Oct 5, 2021

Copy link
Copy Markdown
Contributor Author

I am going to merge this since the changes is good for maven users.
If any issues found later, I am happy to fix/revert.

@exoego exoego merged commit 34ed5ab into scala-steward-org:master Oct 5, 2021
@exoego exoego added this to the 0.12.0 milestone Oct 5, 2021
@exoego

exoego commented Oct 5, 2021

Copy link
Copy Markdown
Contributor Author

😮 Oh no...
I will check those results and consider improvements or simply revert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Maven pom.xml update does not happen

2 participants