Skip to content

Improvements to TextUtil - #125

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

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

Conversation

@kaylendog

Copy link
Copy Markdown
Collaborator

@kaylendogkaylendog left a comment

Copy link
Copy Markdown
CollaboratorAuthor

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 threadcommon/build.gradle
// Define the map containing the tokens we want to replace
def tokensMap = [
BUILDINFO_VERSION: project.rootProject.version,
BUILDINFO_VERSION: project.rootProject.version,

Copy link
Copy Markdown
CollaboratorAuthor

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 threadcommon/build.gradle
@@ -1,9 +1,26 @@
buildscript {

Copy link
Copy Markdown
CollaboratorAuthor

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 threadcommon/build.gradle Outdated
import javax.lang.model.element.Modifier
import java.text.SimpleDateFormat

task DoBuildInfo {

Copy link
Copy Markdown
CollaboratorAuthor

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);

Copy link
Copy Markdown
CollaboratorAuthor

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 threadcommon/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")

Copy link
Copy Markdown
CollaboratorAuthor

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

Copy link
Copy Markdown
CollaboratorAuthor

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

Copy link
Copy Markdown
Collaborator

It's for koda

@kaylendog

Copy link
Copy Markdown
CollaboratorAuthor

Yes but what does it do

@kaylendog

Copy link
Copy Markdown
CollaboratorAuthor

Fixes kokumaji/warrior-plugin#7

@kaylendogkaylendog left a comment

Copy link
Copy Markdown
CollaboratorAuthor

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 {

Copy link
Copy Markdown
CollaboratorAuthor

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.

@kaylendogkaylendog changed the title What does this doImprovements to TextUtilApr 20, 2021
@aakatz3

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

codecovBot 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 FilesCoverage Δ
...mmon/src/main/java/com/dumbdogdiner/BuildInfo.java0.00% <0.00%> (ø)
...m/dumbdogdiner/stickyapi/common/util/TextUtil.java60.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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@kaylendog@aakatz3