-
Notifications
You must be signed in to change notification settings - Fork 5
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
Improvements to TextUtil #125
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
honestly a little tired after reviewing the wrong pr for half an hour but this looks okay
import org.apache.tools.ant.filters.ReplaceTokens | ||
|
||
// Define the map containing the tokens we want to replace | ||
def tokensMap = [ | ||
BUILDINFO_VERSION: project.rootProject.version, | ||
BUILDINFO_VERSION : project.rootProject.version, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird formatting, but I will let it pass.
@@ -1,9 +1,26 @@ | |||
buildscript { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guessing you discussed this with @Prouser123 - gets the okay from me if he approves.
common/build.gradle
Outdated
import javax.lang.model.element.Modifier | ||
import java.text.SimpleDateFormat | ||
|
||
task DoBuildInfo { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems more suited to #101?
|
||
@Test | ||
void prettifyText() { | ||
Arrays.asList(TextUtil.prettifyText("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "al;ksjfuej;iajdf;luwpqo4q394utp98&(*&)(*")).forEach(System.out::println); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lmao this is hot
implementation "com.google.code.gson:gson:2.8.6" | ||
api "com.google.code.gson:gson:2.8.6" | ||
compileOnly "com.google.code.gson:gson:2.8.6" | ||
implementation("de.skuzzle:semantic-version:2.1.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for, aside from the blindingly obvious?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wouldn't compile until I did that and idk why until I funfuck gradle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment refers to line 40 btw - guessing it's just a semver package but worth consulting @Prouser123 about modifying the build file if you haven't already.
It's for koda |
Yes but what does it do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think more comments, in general, would be helpful to developers who are new to this codebase which will make it easier to maintain in the future.
return getStringWidth(text, false); | ||
|
||
@SuppressWarnings("UnusedReturnValue") | ||
private static final class ChatFormatStack { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Internal comment here would be nice, just so us dumb developers can work out what it does.
Need to split some of the gradle stuff out, and there are more things to add to text util. |
Codecov Report
@@ Coverage Diff @@
## master #125 +/- ##
==========================================
+ Coverage 34.51% 35.28% +0.77%
==========================================
Files 63 64 +1
Lines 2532 2590 +58
Branches 286 297 +11
==========================================
+ Hits 874 914 +40
- Misses 1595 1608 +13
- Partials 63 68 +5
Continue to review full report at Codecov.
|
@aakatz3