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

Adapt the check for hashes in versions #2522

Merged
merged 2 commits into from
Feb 11, 2022
Merged

Adapt the check for hashes in versions #2522

merged 2 commits into from
Feb 11, 2022

Conversation

mzuehlke
Copy link
Member

From checking if the complete version value is a hash to only checking if it contains a hash (at least 8 characters long).
The hash component detected by the parser only requires 6 byte, but in addition some leading separator.

Fixes #2502
Improves predecessor #2498
Original issue #2483

From checking if the complete version value is a hash to only checking if it contains a hash (at least 8 characters long).
The hash component detected by the parser only requires 6 byte, but in addition some leading separator.
@codecov
Copy link

codecov bot commented Feb 10, 2022

Codecov Report

Merging #2522 (50fa42a) into main (1990928) will increase coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2522      +/-   ##
==========================================
+ Coverage   81.01%   81.09%   +0.08%     
==========================================
  Files         143      143              
  Lines        2518     2534      +16     
  Branches       46       51       +5     
==========================================
+ Hits         2040     2055      +15     
- Misses        478      479       +1     
Impacted Files Coverage Δ
...ain/scala/org/scalasteward/core/data/Version.scala 100.00% <100.00%> (ø)
...rg/scalasteward/core/edit/hooks/HookExecutor.scala 90.78% <0.00%> (+1.13%) ⬆️

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 1990928...50fa42a. Read the comment docs.

Copy link
Contributor

@exoego exoego left a comment

Choose a reason for hiding this comment

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

LGTM

@fthomas fthomas added this to the 0.15.0 milestone Feb 11, 2022
@fthomas fthomas added the enhancement New feature or request label Feb 11, 2022
@mzuehlke mzuehlke merged commit 7a3c8f2 into main Feb 11, 2022
@mzuehlke mzuehlke deleted the contains_hash branch February 11, 2022 08:25
@fthomas
Copy link
Member

fthomas commented Feb 11, 2022

The fun isn't over yet: davegurnell/unindent#69 :-)

@mzuehlke
Copy link
Member Author

from 7d2bf0af+20171218-1522 to 7e30aec7

This is an update from a version with a hash to another version with a hash.
So versions that are only a hash are worse then versions that only contain a hash (in addition to other numbers) 🤔

@fthomas
Copy link
Member

fthomas commented Feb 11, 2022

Maybe we should just ignore versions that start with a hash. A bump like 7d2bf0af+20171218-1522 to 8d2bf0af+20171218-1522 would not make any sense either, although both versions contain other numbers besides the hash.

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.

Prevent updates to versions that start with hashes
3 participants