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

[Sweep Rules] Remove unnecessary separators or extra characters in code #2377

Closed
wants to merge 1 commit into from

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Oct 29, 2023

PR Feedback (click)

  • 👍 Sweep Did Well
  • 👎 Sweep Needs Improvement

I created this PR to address this rule:

"Avoid using unnecessary separators or extra characters in code."

Description

This PR removes unnecessary separators or extra characters in the code to conform to the rule of avoiding them. The changes include removing the unnecessary , separator after the last test case for Number.sum([]) in the packages/squiggle-lang/__tests__/library/number_test.ts file and removing the unnecessary , separator after the last argument of the makeNumberArrayToNumberDefinition function and the makeNumberArrayToNumberArrayDefinition function in the packages/squiggle-lang/src/fr/number.ts file.

Summary of Changes

  • Removed the unnecessary , separator after the last test case for Number.sum([]) in packages/squiggle-lang/__tests__/library/number_test.ts.
  • Removed the unnecessary , separator after the last argument of the makeNumberArrayToNumberDefinition function and the makeNumberArrayToNumberArrayDefinition function in packages/squiggle-lang/src/fr/number.ts.

@sweep-ai sweep-ai bot requested review from OAGr and berekuk as code owners October 29, 2023 05:58
@sweep-ai
Copy link
Contributor Author

sweep-ai bot commented Oct 29, 2023

Rollback Files For Sweep

  • Rollback changes to packages/squiggle-lang/src/fr/number.ts
  • Rollback changes to packages/squiggle-lang/src/fr/number.ts

@sweep-ai sweep-ai bot added the sweep label Oct 29, 2023
@sweep-ai
Copy link
Contributor Author

sweep-ai bot commented Oct 29, 2023

Sandbox Executions

  • Check packages/squiggle-lang/__tests__/library/number_test.ts
Run packages/squiggle-lang/__tests__/library/number_test.ts through the sandbox.
  • Check packages/squiggle-lang/src/fr/number.ts
Sandbox logs for
pnpm i 1/2 ✓
Scope: all 12 workspace projects
Lockfile is up to date, resolution step is skipped
Progress: resolved 1, reused 0, downloaded 0, added 0
Packages: +2161
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   ╭──────────────────────────────────────────────────────────────────╮
   │                                                                  │
   │                Update available! 8.9.2 → 8.10.0.                 │
   │   Changelog: https://github.com/pnpm/pnpm/releases/tag/v8.10.0   │
   │                Run "pnpm add -g pnpm" to update.                 │
   │                                                                  │
   │      Follow @pnpmjs for updates: https://twitter.com/pnpmjs      │
   │                                                                  │
   ╰──────────────────────────────────────────────────────────────────╯
Progress: resolved 2161, reused 0, downloaded 40, added 27
Progress: resolved 2161, reused 0, downloaded 278, added 273
Progress: resolved 2161, reused 0, downloaded 527, added 521
Progress: resolved 2161, reused 0, downloaded 756, added 756
Progress: resolved 2161, reused 0, downloaded 1050, added 1048
Progress: resolved 2161, reused 0, downloaded 1451, added 1445
Progress: resolved 2161, reused 0, downloaded 1486, added 1480
Progress: resolved 2161, reused 0, downloaded 1534, added 1524
Progress: resolved 2161, reused 0, downloaded 1722, added 1716
Progress: resolved 2161, reused 0, downloaded 1879, added 1867
Progress: resolved 2161, reused 0, downloaded 1921, added 1918
Progress: resolved 2161, reused 0, downloaded 1972, added 1958
Progress: resolved 2161, reused 0, downloaded 2158, added 2160
Progress: resolved 2161, reused 0, downloaded 2159, added 2160
Progress: resolved 2161, reused 0, downloaded 2159, added 2161, done
.../node_modules/@prisma/engines postinstall$ node scripts/postinstall.js
.../node_modules/@prisma/engines postinstall: Done
.../[email protected]/node_modules/esbuild postinstall$ node install.js
.../[email protected]/node_modules/prisma preinstall$ node scripts/preinstall-entry.js
.../[email protected]/node_modules/esbuild postinstall: Done
.../[email protected]/node_modules/prisma preinstall: Done
.../node_modules/@prisma/client postinstall$ node scripts/postinstall.js
.../node_modules/@prisma/client postinstall: prisma:warn We could not find your Prisma schema at `prisma/schema.prisma`.
.../node_modules/@prisma/client postinstall: If you have a Prisma schema file in a custom path, you will need to run
.../node_modules/@prisma/client postinstall: `prisma generate --schema=./path/to/your/schema.prisma` to generate Prisma Client.
.../node_modules/@prisma/client postinstall: If you do not have a Prisma schema file yet, you can ignore this message.
.../node_modules/@prisma/client postinstall: Done
.../[email protected]/node_modules/canvas install$ node-pre-gyp install --fallback-to-build --update-binary
.../[email protected]/node_modules/canvas install: node-pre-gyp info it worked if it ends with ok
.../[email protected]/node_modules/canvas install: node-pre-gyp info using [email protected]
.../[email protected]/node_modules/canvas install: node-pre-gyp info using [email protected] | linux | x64
.../[email protected]/node_modules/canvas install: node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v108-linux-glibc-x64.tar.gz
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libcairo.so.2
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libjpeg.so.62
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libxml2.so.2
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libgmodule-2.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libpcre.so.1
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libpixman-1.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/canvas.node
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libgdk_pixbuf-2.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libpango-1.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libstdc++.so.6
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libfontconfig.so.1
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/canvas.node.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas.node.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/init.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/ImageData.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/register_font.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/Backends.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/CanvasRenderingContext2d.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/Image.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/backend/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/backend/PdfBackend.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/backend/Backend.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/backend/ImageBackend.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/backend/SvgBackend.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/CanvasPattern.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/bmp/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/bmp/BMPParser.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/closure.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/CanvasGradient.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/Canvas.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/color.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libpangoft2-1.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libgio-2.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas.node
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/CanvasPattern.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/register_font.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/closure.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/ImageData.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/CanvasGradient.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/Backends.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/backend/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/backend/SvgBackend.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/backend/PdfBackend.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/backend/Backend.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/backend/ImageBackend.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/CanvasRenderingContext2d.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/init.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/bmp/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/bmp/BMPParser.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/color.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/Image.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/Canvas.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libgif.so.7
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libglib-2.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/librsvg-2.so.2
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libfribidi.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libpng16.so.16
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libz.so.1
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libpangocairo-1.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libffi.so.7
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libcairo-gobject.so.2
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libgobject-2.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libexpat.so.1
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libfreetype.so.6
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libharfbuzz.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info extracted file count: 74 
.../[email protected]/node_modules/canvas install: [canvas] Success: "/repo/node_modules/.pnpm/[email protected]/node_modules/canvas/build/Release/canvas.node" is installed via remote
.../[email protected]/node_modules/canvas install: node-pre-gyp info ok 
.../[email protected]/node_modules/canvas install: Done
.../[email protected]/node_modules/keytar install$ prebuild-install || npm run build
.../[email protected]/node_modules/keytar install: Done
 WARN  Failed to create bin at /repo/packages/components/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/squiggle-lang/dist/cli/index.js'
 WARN  Failed to create bin at /repo/packages/prettier-plugin/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/squiggle-lang/dist/cli/index.js'
 WARN  Failed to create bin at /repo/packages/hub/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/squiggle-lang/dist/cli/index.js'
 WARN  Failed to create bin at /repo/packages/vscode-ext/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/squiggle-lang/dist/cli/index.js'
devDependencies:
+ @changesets/cli 2.26.2
+ prettier 3.0.3
+ turbo 1.10.14
+ turbo-ignore 1.10.14
 WARN  Failed to create bin at /repo/packages/prettier-plugin/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/prettier-plugin/node_modules/@quri/squiggle-lang/dist/cli/index.js'
 WARN  Failed to create bin at /repo/packages/components/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/components/node_modules/@quri/squiggle-lang/dist/cli/index.js'
 WARN  Failed to create bin at /repo/packages/vscode-ext/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/vscode-ext/node_modules/@quri/squiggle-lang/dist/cli/index.js'
 WARN  Failed to create bin at /repo/packages/hub/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/hub/node_modules/@quri/squiggle-lang/dist/cli/index.js'
Done in 22.4s
trunk init 2/2 ✓
⡿ Downloading Trunk 1.17.1...
⡿ Downloading Trunk 1.17.1...
⢿ Downloading Trunk 1.17.1...
⣻ Downloading Trunk 1.17.1...
⣽ Downloading Trunk 1.17.1...
⣾ Downloading Trunk 1.17.1...
⣷ Downloading Trunk 1.17.1...
✔ Downloading Trunk 1.17.1... done
⡿ Verifying Trunk sha256...
✔ Verifying Trunk sha256... done
⡿ Unpacking Trunk...
✔ Unpacking Trunk... done


✔ 13 linters were enabled (.trunk/trunk.yaml)
  actionlint 1.6.26 (7 github-workflow files)
  checkov 3.0.12 (54 json, 18 yaml files)
  git-diff-check (939 files)
  markdownlint 0.37.0 (79 markdown files) (created .markdownlint.yaml)
  osv-scanner 1.4.2 (1 lockfile file)
  oxipng 9.0.0 (7 png files)
  prettier 3.0.3 (5 css, 1 graphql, 23 javascript, 54 json, 79 markdown, 680 typescript, 17 yaml files)
  shellcheck 0.9.0 (4 shell files) (created .shellcheckrc)
  shfmt 3.6.0 (4 shell files)
  taplo 0.8.1 (1 toml file)
  trivy 0.46.0 (18 yaml files)
  trufflehog 3.60.4 (940 files)
  yamllint 1.32.0 (17 yaml files) (created .yamllint.yaml)
Next Steps
 1. Read documentation
    Our documentation can be found at https://docs.trunk.io
 2. Get help and give feedback
    Join the Trunk community at https://slack.trunk.io

@changeset-bot
Copy link

changeset-bot bot commented Oct 29, 2023

⚠️ No Changeset found

Latest commit: 33703e2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@sweep-ai sweep-ai bot temporarily deployed to Preview October 29, 2023 05:58 Inactive
@vercel
Copy link

vercel bot commented Oct 29, 2023

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

Name Status Preview Comments Updated (UTC)
quri-hub ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 29, 2023 6:05am
quri-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 29, 2023 6:05am
squiggle-components ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 29, 2023 6:05am
squiggle-website ✅ Ready (Inspect) Visit Preview Oct 29, 2023 6:05am

@codecov
Copy link

codecov bot commented Oct 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (214c4f0) 72.09% compared to head (7e232f0) 72.10%.

❗ Current head 7e232f0 differs from pull request most recent head 33703e2. Consider uploading reports for the commit 33703e2 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2377      +/-   ##
==========================================
+ Coverage   72.09%   72.10%   +0.01%     
==========================================
  Files         111      111              
  Lines        5733     5733              
  Branches     1097     1097              
==========================================
+ Hits         4133     4134       +1     
+ Misses       1593     1592       -1     
  Partials        7        7              

see 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants