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: sonarlint issues - api #1245

Merged
merged 10 commits into from
Apr 24, 2024
Merged

fix: sonarlint issues - api #1245

merged 10 commits into from
Apr 24, 2024

Conversation

JoeKarow
Copy link
Member

Pull Request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build-related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this introduce a breaking change?

  • Yes
  • No

Other information

Copy link

vercel bot commented Apr 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
inreach-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 24, 2024 9:39pm

@github-actions github-actions bot added automerge Enable Kodiak auto-merge kodiak: merge.method = 'squash' Kodiak will squash merge this PR. 📦 api 📦 util labels Apr 24, 2024
Copy link
Contributor

coderabbitai bot commented Apr 24, 2024

Important

Auto Review Skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

149 files out of 204 files are above the max files limit of 50. Please upgrade to Pro plan to get higher limits.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

sonarcloud bot commented Apr 24, 2024

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@JoeKarow JoeKarow added bugfix Inconsistencies or issues which will cause a problem for users or implementors. refactor Updating the code with simpler, more efficient syntax or methods, but not introducing new features. labels Apr 24, 2024
@JoeKarow
Copy link
Member Author

@coderabbitai review

Copy link

relativeci bot commented Apr 24, 2024

#217 Bundle Size — 3.32MiB (-2.23%).

ca93bb1(current) vs 4933fd1 dev#203(baseline)

Note

Bundle removed 3 duplicate packages – View changed duplicate packages

Bundle metrics  Change 8 changes Regression 1 regression Improvement 3 improvements
                 Current
#217
     Baseline
#203
Improvement  Initial JS 2.95MiB(-2.05%) 3.01MiB
No change  Initial CSS 9.54KiB 9.54KiB
Change  Cache Invalidation 45.7% 37.65%
Change  Chunks 65(+1.56%) 64
No change  Assets 78 78
Change  Modules 1959(-0.41%) 1967
Regression  Duplicate Modules 280(+2.19%) 274
Change  Duplicate Code 8.1%(+4.25%) 7.77%
Improvement  Packages 205(-1.91%) 209
Improvement  Duplicate Packages 0(-100%) 3
Bundle size by type  Change 2 changes Improvement 2 improvements
                 Current
#217
     Baseline
#203
Improvement  JS 3.2MiB (-1.89%) 3.26MiB
No change  Fonts 94.54KiB 94.54KiB
No change  CSS 9.54KiB 9.54KiB
No change  IMG 8.57KiB 8.57KiB
Improvement  Other 8.04KiB (-64.07%) 22.39KiB

Bundle analysis reportBranch JoeKarow/sonarlint-api-issuesProject dashboard

Copy link
Contributor

github-actions bot commented Apr 24, 2024

📦 Next.js Bundle Analysis for @weareinreach/app

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 401.39 KB (🟢 -2.71 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Three Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (575 KB)
/admin 121.09 KB 522.48 KB 90.87% (🟡 +0.20%)
/admin/quicklink/phone 80.77 KB 482.16 KB 83.85% (🟡 +0.20%)
/admin/quicklink/services 51.83 KB 453.22 KB 78.82% (🟡 +0.13%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

Copy link

alwaysmeticulous bot commented Apr 24, 2024

🤖 No test run has been triggered as your Meticulous project has been deactivated (since you haven't viewed any test results in a while). Click here to reactivate.

Last updated for commit ca93bb1. This comment will update as new commits are pushed.

Copy link

socket-security bot commented Apr 24, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@types/[email protected] None 0 1.8 MB types
npm/[email protected] environment, filesystem 0 79.1 kB motdotla
npm/[email protected] None 0 7.18 kB angus-c
npm/[email protected] environment, filesystem, unsafe 0 8.39 MB prettier-bot
npm/[email protected] None 0 15 kB hirokiosame
npm/[email protected] None 0 32.4 MB typescript-bot
npm/[email protected] None 0 674 kB colinmcd94

🚮 Removed packages: npm/[email protected], npm/[email protected]

View full report↗︎

Copy link

socket-security bot commented Apr 24, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: npm/[email protected]

View full report↗︎

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

@JoeKarow
Copy link
Member Author

@SocketSecurity ignore npm/[email protected]

@JoeKarow JoeKarow force-pushed the JoeKarow/sonarlint-api-issues branch from 8b20d7f to 9b75b0e Compare April 24, 2024 21:01
Copy link

sonarcloud bot commented Apr 24, 2024

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@kodiakhq kodiakhq bot merged commit 29b4663 into dev Apr 24, 2024
29 of 30 checks passed
@kodiakhq kodiakhq bot deleted the JoeKarow/sonarlint-api-issues branch April 24, 2024 21:39
JoeKarow added a commit that referenced this pull request Apr 24, 2024
<!--- Please provide a general summary of your changes in the title
above -->

# Pull Request type

<!-- Please try to limit your pull request to one type; submit multiple
pull requests if needed. -->

Please check the type of change your PR introduces:

- [x] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, renaming)
- [x] Refactoring (no functional changes, no API changes)
- [ ] Build-related changes
- [ ] Documentation content changes
- [ ] Other (please describe):

## What is the current behavior?

<!-- Please describe the current behavior that you are modifying, or
link to a relevant issue. -->

Issue Number: N/A

## What is the new behavior?

<!-- Please describe the behavior or changes that are being added by
this PR. -->

-
-
-

## Does this introduce a breaking change?

- [ ] Yes
- [ ] No

<!-- If this does introduce a breaking change, please describe the
impact and migration path for existing applications below. -->

## Other information

<!-- Any other information that is important to this PR, such as
screenshots of how the component looks before and after the change. -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 api 📦 app automerge Enable Kodiak auto-merge bugfix Inconsistencies or issues which will cause a problem for users or implementors. kodiak: merge.method = 'squash' Kodiak will squash merge this PR. refactor Updating the code with simpler, more efficient syntax or methods, but not introducing new features. 📦 ui 📦 util
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants