Java: Improve canonical data check script

Created on 30 Jan 2018  路  7Comments  路  Source: exercism/java

The canonical_data_check.sh script is sometimes reporting that exercises need to have their version files updated when they actually don't (e.g. it outputs "needs update (v1.0.0 -> v1.0.0)."). I'm guessing this is because one or the other of the files ends with a new line or has an extra whitespace or something.

This should hopefully be relatively easy to fix by adding some trimming of whitespace or similar to the script.

bug

All 7 comments

Ah, good spot!

If we do fix this up, it'll be worth offering the same changes to the Kotlin track, as I think they use a lot of the same scripts as us.

@FridaTveit Any example of this? I ran a check, and couldn't find anything like that.

Yes, when I ran it locally it reported that pretty much every exercise needed updating but for most of them the version hadn't actually changed.

@FridaTveit Does yours look like mine? Terminal screenshot attached below.
I don't see any instances of "needs update (v1.0.0 -> v1.0.0)." where the current and updated version are the same.

image

It could be possible that problem-specifications have updated, so there are no longer instances of this.

I've not run this script for about a month, but when I get a moment I can try myself too :+1:

@Haozhe321, no it did not look like that. Like @sjwarner-bp says, it's been a while since I ran it and changes have been made both to this repository and to problem-specifications since then. And it could be a problem that only occurs on windows. Either way, it did report exercises changed that hadn't been changed so it's worth looking into at some point. Though it's not very urgent since it's easy to tell from the output which exercises have actually changed 馃檪

@FridaTveit I see, thanks for the clarification :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stkent picture stkent  路  4Comments

rvictorino picture rvictorino  路  5Comments

sjwarner-bp picture sjwarner-bp  路  6Comments

Smarticles101 picture Smarticles101  路  4Comments

FridaTveit picture FridaTveit  路  3Comments