Skip to content

Navigation Menu

Sign in
Sign up

Improvements to TextUtil - #125

Open
kaylendog wants to merge 2 commits into
master from
feat/aakatz3/bettertext
Open

Improvements to TextUtil #125
kaylendog wants to merge 2 commits into
master from
feat/aakatz3/bettertext

Conversation

@kaylendog

@kaylendog kaylendog commented Apr 19, 2021

Copy link
Copy Markdown
Collaborator

@kaylendog kaylendog left a comment

Copy link
Copy Markdown
Collaborator Author

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

Comment thread common/build.gradle
// Define the map containing the tokens we want to replace
def tokensMap = [
BUILDINFO_VERSION: project.rootProject.version,
BUILDINFO_VERSION: project.rootProject.version,

@kaylendog kaylendog Apr 19, 2021

Copy link
Copy Markdown
Collaborator Author

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.

Comment thread common/build.gradle
@@ -1,9 +1,26 @@
buildscript {

@kaylendog kaylendog Apr 19, 2021

Copy link
Copy Markdown
Collaborator Author

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.

Comment thread common/build.gradle Outdated
import javax.lang.model.element.Modifier
import java.text.SimpleDateFormat

task DoBuildInfo {

@kaylendog kaylendog Apr 19, 2021

Copy link
Copy Markdown
Collaborator Author

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?

jcxldn reacted with thumbs up emoji

@Test
void prettifyText() {
Arrays.asList(TextUtil.prettifyText("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "al;ksjfuej;iajdf;luwpqo4q394utp98&(*&)(*")).forEach(System.out::println);

@kaylendog kaylendog Apr 19, 2021

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Lmao this is hot

Comment thread common/build.gradle
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")

@kaylendog kaylendog Apr 19, 2021

Copy link
Copy Markdown
Collaborator Author

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?

Copy link
Copy Markdown
Collaborator

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

@kaylendog kaylendog Apr 20, 2021

Copy link
Copy Markdown
Collaborator Author

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.

aakatz3 commented Apr 20, 2021

Copy link
Copy Markdown
Collaborator

It's for koda

Copy link
Copy Markdown
Collaborator Author

Yes but what does it do

Copy link
Copy Markdown
Collaborator Author

@kaylendog kaylendog left a comment

Copy link
Copy Markdown
Collaborator Author

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 {

@kaylendog kaylendog Apr 20, 2021

Copy link
Copy Markdown
Collaborator Author

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.

@kaylendog kaylendog changed the title (削除) What does this do (削除ここまで) (追記) Improvements to TextUtil (追記ここまで) Apr 20, 2021

aakatz3 commented Apr 20, 2021

Copy link
Copy Markdown
Collaborator

Need to split some of the gradle stuff out, and there are more things to add to text util.

codecov Bot commented Apr 21, 2021

Copy link
Copy Markdown

Codecov Report

Merging #125 (64fa9e8) into master (e8131f5) will increase coverage by 0.77%.
The diff coverage is 55.88%.

Impacted file tree graph

@@ 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 
Impacted Files Coverage Δ
...mmon/src/main/java/com/dumbdogdiner/BuildInfo.java 0.00% <0.00%> (ø)
...m/dumbdogdiner/stickyapi/common/util/TextUtil.java 60.97% <64.40%> (+30.67%) ⬆️

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 e8131f5...64fa9e8. Read the comment docs.

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

Reviewers

@aakatz3 aakatz3 aakatz3 left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /