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

foundry vscode integration settings #1485

Merged
merged 5 commits into from
May 14, 2024

Conversation

Intizar-T
Copy link
Contributor

Description

  • add remappings.txt for vscode intellisense (wont see bunch of red squiggly lines during development)
  • add format on save with forge for .sol files and prettier for all other files

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.

Deployment

  • Should publish npm package
  • Should publish Docker image

@Intizar-T Intizar-T added the enhancement New feature or request label May 9, 2024
@Intizar-T Intizar-T self-assigned this May 9, 2024
@Intizar-T Intizar-T requested a review from a team as a code owner May 9, 2024 11:48
Copy link
Contributor

coderabbitai bot commented May 9, 2024

Walkthrough

Walkthrough

The updates bring enhancements to the Solidity development environment in the contracts/v0.2/.vscode directory, introducing essential extensions and settings for efficient coding. Moreover, remappings in remappings.txt redefine paths for various dependencies, improving integration and project referencing.

Changes

File Path Change Summary
.../.vscode/extensions.json Added recommendations for "JuanBlanco.solidity" and "esbenp.prettier-vscode" extensions.
.../.vscode/settings.json Configured default settings for Solidity development, including formatting and package paths.
.../remappings.txt Updated directory remappings for several dependencies like @openzeppelin/contracts and others.

🐇✨
In the garden of code, where the smart contracts bloom,
A rabbit hopped by, giving updates some room.
With a tweak and a twirl of its tiny soft paws,
Paths were remapped, without a single flaw.
Cheers to the devs, with tools sharp as a dart,
For crafting the art that's close to our heart! 🌟
🐇💻


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
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 5958720 and c9ff766.
Files selected for processing (3)
  • contracts/v0.2/.vscode/extensions.json (1 hunks)
  • contracts/v0.2/.vscode/settings.json (1 hunks)
  • contracts/v0.2/remappings.txt (1 hunks)
Files skipped from review due to trivial changes (3)
  • contracts/v0.2/.vscode/extensions.json
  • contracts/v0.2/.vscode/settings.json
  • contracts/v0.2/remappings.txt

@martinkersner
Copy link
Member

I see that some projects include these kind of editor specific settings to projects, but I am not sure whether it is something to follow 🤔

@nick-bisonai
Copy link
Collaborator

nick-bisonai commented May 9, 2024

I pulled this branch and tried in my local laptop but i don't think it's working, I'll try again tmr with office laptop

@Intizar-T
Copy link
Contributor Author

Intizar-T commented May 9, 2024

I pulled this branch and tried in my local laptop but i don't think it's working, I'll try again tmr with office laptop

vscode is a bit pain in the ass. So you need to open v0.2 in a new vscode window/instance to be able to apply project/workspace level vscode settings. The settings didn't work me either when I opened the whole orakl monorepo but they worked when I opened v0.2 separately.

And pls make sure you have prettier and solidity extensions installed on vscode (I'm pretty sure you already do haha)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between c9ff766 and 85df425.
Files ignored due to path filters (2)
  • package.json is excluded by !**/*.json
  • yarn.lock is excluded by !**/*.lock, !**/*.lock
Files selected for processing (2)
  • .husky/pre-commit (1 hunks)
  • lint-staged.config.js (1 hunks)
Files skipped from review due to trivial changes (2)
  • .husky/pre-commit
  • lint-staged.config.js

Copy link
Collaborator

@nick-bisonai nick-bisonai left a comment

Choose a reason for hiding this comment

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

lgtm!

@Intizar-T Intizar-T force-pushed the feat/foundry-vscode-integration-settings branch from 85df425 to a5168aa Compare May 13, 2024 06:49
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 85df425 and a5168aa.
Files ignored due to path filters (3)
  • core/package.json is excluded by !**/*.json
  • package.json is excluded by !**/*.json
  • yarn.lock is excluded by !**/*.lock, !**/*.lock
Files selected for processing (4)
  • .husky/pre-commit (1 hunks)
  • contracts/v0.2/remappings.txt (1 hunks)
  • core/.eslintrc (1 hunks)
  • lint-staged.config.js (1 hunks)
Files skipped from review due to trivial changes (1)
  • core/.eslintrc
Files skipped from review as they are similar to previous changes (3)
  • .husky/pre-commit
  • contracts/v0.2/remappings.txt
  • lint-staged.config.js

@Intizar-T Intizar-T merged commit ee7f616 into master May 14, 2024
2 checks passed
@Intizar-T Intizar-T deleted the feat/foundry-vscode-integration-settings branch May 14, 2024 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants