Skip to content

Code Quality Issues Flagged by US DOD Navy (NIWC PAC) static code scanner (Coverity) #30453

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

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

jamesjen
Copy link

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • I have licensed the changes to Element by completing the Contributor License Agreement (CLA)

jamesjen added 4 commits July 31, 2025 14:19
… false. Intent of the code is to kick off warning if the 'recents' array is empty, whichh recents.length === 0 tests for
…neB is covered, the return 0 will never be reached
… to null. This condition will always be true.
@jamesjen jamesjen requested a review from a team as a code owner July 31, 2025 21:38
@jamesjen jamesjen requested review from dbkr and MidhunSureshR July 31, 2025 21:38
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions github-actions bot added the Z-Community-PR Issue is solved by a community member's PR label Jul 31, 2025
@@ -1164,7 +1164,6 @@ const SpotlightDialog: React.FC<IProps> = ({ initialText = "", initialFilter = n
// only handle these keys when we are in the recently viewed row of options
if (
!query &&
!filter !== null &&
Copy link
Member

Choose a reason for hiding this comment

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

The rest seem fine but I assume there was some intention here even if it got typo-ed. It seems to me like it's supposed to just not have the negation on filter, ie. just be filter !== null which is a pattern that crops up plenty of other times. It would probably be worth trying the tests & functionality with this rather than just blindly removing the line. Also, the same thing appears on line 1147, so let's be consistent.

@dbkr
Copy link
Member

dbkr commented Aug 1, 2025

Also, PRs need to come from a branch of your fork that's not develop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants