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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support file types from CLI args #7

Closed
wants to merge 1 commit into from
Closed

Conversation

sweep-ai[bot]
Copy link
Contributor

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

PR Feedback (click)

  • 馃憤 Sweep Did Well
  • 馃憥 Sweep Needs Improvement

Description

This PR adds support for specifying file types from the command line interface (CLI) when running the cspell command. Currently, the code is hardcoded to run the cspell command on Markdown, TypeScript, and JSON files. With this change, users will be able to pass file types as command line arguments to customize the file types on which cspell is run.

Summary of Changes

  • Imported the 'process' module from Node.js to access command line arguments.
  • Created a new variable 'fileTypes' to hold an array of file types passed as command line arguments. If no file types are passed, it defaults to an array containing 'md', 'ts', and 'json'.
  • Modified the 'cmd' variable to use the 'fileTypes' array when constructing the cspell command. Replaced the hardcoded file types with a map function that iterates over the 'fileTypes' array and returns a string for each file type in the format '"//*."'. Joined these strings with a space to create the final part of the cspell command.

Please review and merge these changes at your earliest convenience.

Fixes #5.


馃帀 Latest improvements to Sweep:

  • Sweep can now passively improve your repository! Check out Rules to learn more.

馃挕 To get Sweep to edit this pull request, you can:

  • Comment below, and Sweep can edit the entire PR
  • Comment on a file, Sweep will only modify the commented file
  • Edit the original issue to get Sweep to recreate the PR from scratch

@sweep-ai
Copy link
Contributor Author

sweep-ai bot commented Oct 15, 2023

Rollback Files For Sweep

  • Rollback changes to index.ts

@sweep-ai
Copy link
Contributor Author

sweep-ai bot commented Oct 15, 2023

Apply Sweep Rules to your PR?

  • Apply: Leftover TODOs in the code should be handled.
  • Apply: All new business logic should have corresponding unit tests in the tests/ directory.
  • Apply: Any clearly inefficient or repeated code should be optimized or refactored.

@sweep-ai sweep-ai bot added the sweep label Oct 15, 2023
@changeset-bot
Copy link

changeset-bot bot commented Oct 15, 2023

鈿狅笍 No Changeset found

Latest commit: 6109dc8

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 mentioned this pull request Oct 15, 2023
2 tasks
@sweep-ai sweep-ai bot closed this Oct 15, 2023
@sweep-ai sweep-ai bot deleted the sweep/support-file-types branch October 15, 2023 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sweep: Support file types from CLI args
0 participants