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

fix: goose reprocess pref does not contain spaces #747

Merged
merged 1 commit into from
May 7, 2022

Conversation

midgleyc
Copy link
Member

@midgleyc midgleyc commented May 7, 2022

As reported in https://kolmafia.us/threads/grey-you-challenge-path.27308/page-2

I don't have a debug log with a third monster being reprocessed, so the test isn't as good as it could be, but still shows the error.

As we never add spaces to the pref, it could split on just , instead of \s*,\s*, but I left it similar to how it was.

@midgleyc midgleyc requested a review from a team as a code owner May 7, 2022 10:02
@codecov
Copy link

codecov bot commented May 7, 2022

Codecov Report

Merging #747 (ba2025c) into main (697bcb6) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##               main     #747   +/-   ##
=========================================
  Coverage     23.59%   23.59%           
- Complexity    10524    10525    +1     
=========================================
  Files          1010     1010           
  Lines        158108   158108           
  Branches      34965    34965           
=========================================
+ Hits          37311    37313    +2     
+ Misses       113999   113998    -1     
+ Partials       6798     6797    -1     
Impacted Files Coverage Δ
...t/sourceforge/kolmafia/session/GreyYouManager.java 64.83% <100.00%> (ø)
...net/sourceforge/kolmafia/request/FightRequest.java 26.10% <0.00%> (+0.03%) ⬆️

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 697bcb6...ba2025c. Read the comment docs.

@Veracity0
Copy link
Contributor

As we never add spaces to the pref, it could split on just , instead of \s*,\s*, but I left it similar to how it was.

True. But since properties are user editable, we can't guarantee that the user did not put in some spaces, unlikely as that may be, so it is defensive.

Thanks for fixing this.

@midgleyc midgleyc merged commit 36dec30 into kolmafia:main May 7, 2022
@midgleyc midgleyc deleted the fix-reprocess branch May 7, 2022 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants