Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Fixed some formatting errors from detekt. #2842

Merged
merged 4 commits into from
Dec 13, 2023

Conversation

venumanas87
Copy link
Contributor

@venumanas87 venumanas87 commented Dec 13, 2023

Pull Request (PR) Checklist

Please check if your pull request fulfills the following requirements:

  • The PR is submitted to the main branch.
  • I've read the Contribution Guidelines and my PR doesn't break the "Contributing Rules".
  • I've read the Architecture Guidelines.
  • I confirm that I've run the code locally and everything works as expected.
  • 🎬 I've attached a screen recoding of the changes.

Tip: drag & drop the video to the PR description.

What's changed?

Describe with a few bullets what's new:

  • a ) Now the users can hide income in homescreen (similar to hide balance functionality) by changing it from settings screeen.

💡 Tip: Please, attach screenshots and screen recordings. It helps a lot!

ivy.wallet.video.mp4

Risk Factors

What may go wrong if we merge your PR?

  • a) All tests are passed and no major changes so not a possibility of going wrong.

In what cases your code won't work?

  • a) The code will work in all edge cases.

Does this PR closes any GitHub Issues?

Check Ivy Wallet Issues.

Replace ISSUE_NUMBER with your issue number (for example Closes #1234). If you've done that correctly, you'll see the issue title linked when previewing your PR description.

Troubleshooting CI failures

If you see any of the PR checks failing (❌) go to Actions and find it there. Or simply click "Details" next to the failed check and explore the logs to see why it has failed.

Detekt

Detekt is a static code analyzer for Kotlin that we use to enforce code readibility and good practices.

To run Detekt locally:

./gradlew detekt

If the Detekt errors are caused by a legacy code, you can suppress them using a basline.

Detekt baseline (not recommended)

./scripts/detektBaseline.sh

Lint

We use the standard Android Lint plus Slack's compose-lints as an addition to enforce proper Compose usage.

To run Lint locally:

./scripts/lint.sh

If the Lint errors are caused by a legacy code, you can suppress them using a basline.

Lint baseline (not recommended)

./scripts/lintBaseline.sh

Unit tests

If this job is failing this means that your changes break an existing unit test. You must identify the failing tests and fix your code.

To run the Unit tests locally:

./gradlew testDebugUnitTest

Copy link
Collaborator

@ILIYANGERMANOV ILIYANGERMANOV left a comment

Choose a reason for hiding this comment

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

LGTM! Fix the CI errors and we can merge ✅

@ILIYANGERMANOV
Copy link
Collaborator

Detekt Errors to fix:

  • unused imports
  • then add a Detekt baseline for the LongParametersList

@venumanas87
Copy link
Contributor Author

LGTM! Fix the CI errors and we can merge ✅

Sure on it

@venumanas87
Copy link
Contributor Author

@ILIYANGERMANOV Can you please help me out in this issue when script tries to run
./gradlew detektBaseline it throwing an error which looks like this -:

Cannot access input property 'source' of task ':detektBaseline'. Accessing unreadable inputs or outputs is not supported. Declare the task as untracked by using Task.doNotTrackState(). For more information, please refer to https://docs.gradle.org/8.4/userguide/incremental_build.html#disable-state-tracking in the Gradle documentation.

@ILIYANGERMANOV
Copy link
Collaborator

@ILIYANGERMANOV Can you please help me out in this issue when script tries to run
./gradlew detektBaseline it throwing an error which looks like this -:

Cannot access input property 'source' of task ':detektBaseline'. Accessing unreadable inputs or outputs is not supported. Declare the task as untracked by using Task.doNotTrackState(). For more information, please refer to https://docs.gradle.org/8.4/userguide/incremental_build.html#disable-state-tracking in the Gradle documentation.

No idea, works on my machine 😀 Jk, what OS are you using?

@venumanas87
Copy link
Contributor Author

windows

@venumanas87
Copy link
Contributor Author

Should I go for the manual process of updating the baseline.yml file?🥲

@ILIYANGERMANOV
Copy link
Collaborator

Should I go for the manual process of updating the baseline.yml file?🥲

Please do so, no idea how to fix it. You can ChatGPT to fix the script on Windows

@venumanas87
Copy link
Contributor Author

Okay

@venumanas87
Copy link
Contributor Author

Somehow fixed the detekt baseline🥲

@ILIYANGERMANOV
Copy link
Collaborator

Nice 🎉 400+ files changed, I see that Detekt made some auto-format. Updated the branch and merging after the CI pass of up-to-date main. Great job!

@venumanas87
Copy link
Contributor Author

Nice 🎉 400+ files changed, I see that Detekt made some auto-format. Updated the branch and merging after the CI pass of up-to-date main. Great job!

Thanks 🤞

@ILIYANGERMANOV ILIYANGERMANOV merged commit 5160d09 into Ivy-Apps:main Dec 13, 2023
6 checks passed
@venumanas87 venumanas87 deleted the fix-issue-2782 branch December 14, 2023 11:19
nvllz pushed a commit to nvllz/ivy-wallet that referenced this pull request Dec 23, 2023
* Fixed some formatting errors from detekt.

* Add Detekt baseline

* Final changes push

---------

Co-authored-by: Iliyan Germanov <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I'd like to find a way to conceal, blur, or encrypt my income information from the home page. Example issue
2 participants