-
Notifications
You must be signed in to change notification settings - Fork 64
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
ci: slither ignore foundry compilation #221
Conversation
WalkthroughRecent updates focus on enhancing the build and testing workflows for the project. The main changes include substituting Changes
Poem
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this 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
Outside diff range, codebase verification and nitpick comments (1)
.github/workflows/slither.yaml (1)
36-36
: Add a comment to clarify why Foundry is being installed.Adding a comment explaining the purpose of installing Foundry would improve the maintainability and readability of the workflow.
- name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 # Foundry is installed to support contract compilation and testing
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (2)
- .github/workflows/slither.yaml (2 hunks)
- slither.config.json (1 hunks)
Files skipped from review due to trivial changes (1)
- slither.config.json
Additional comments not posted (1)
.github/workflows/slither.yaml (1)
48-48
: LGTM! Theignore-compile
setting aligns with the PR objective.The addition of
ignore-compile: true
in thewith
block instructs Slither to skip compilation, which is consistent with the PR's goal.
848b483
to
1dc1c9c
Compare
There was a problem hiding this 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.yaml
Review profile: CHILL
Files selected for processing (2)
- .github/workflows/slither.yaml (2 hunks)
- slither.config.json (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- .github/workflows/slither.yaml
- slither.config.json
Signed-off-by: Francisco de Borja Aranda Castillejo <borja@zetachain.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Tests are failing but it doesn't seem to be related to this change
There was a problem hiding this 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.yaml
Review profile: CHILL
Files selected for processing (3)
- .github/workflows/slither.yaml (1 hunks)
- hardhat.config.ts (1 hunks)
- slither.config.json (1 hunks)
Files skipped from review due to trivial changes (1)
- hardhat.config.ts
Files skipped from review as they are similar to previous changes (2)
- .github/workflows/slither.yaml
- slither.config.json
There was a problem hiding this 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.yaml
Review profile: CHILL
Files selected for processing (3)
- .github/workflows/test.yaml (2 hunks)
- package.json (1 hunks)
- slither.config.json (1 hunks)
Files skipped from review due to trivial changes (2)
- .github/workflows/test.yaml
- package.json
Files skipped from review as they are similar to previous changes (1)
- slither.config.json
Signed-off-by: Francisco de Borja Aranda Castillejo <borja@zetachain.com>
There was a problem hiding this 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
Outside diff range, codebase verification and nitpick comments (1)
package.json (1)
93-93
: Reintroduce theyarn compile
step in thetest:prototypes
script.The removal of
yarn compile
from thetest:prototypes
script might lead to issues as there are no other scripts or workflows ensuring the compilation step before running tests. It is essential to reintroduce theyarn compile
step to avoid potential problems.
- Location:
package.json
- Script:
test:prototypes
Analysis chain
Verify if the compilation is handled elsewhere.
The
yarn compile
step was removed from thetest:prototypes
script. Ensure that the compilation is handled elsewhere to avoid any issues.
Verify if the
generate
script or any other compilation step is executed before runningtest:prototypes
.The
compile
command is used in thegenerate
script. We need to ensure that thegenerate
script or any other compilation step is executed before runningtest:prototypes
.
Verify if there are pre-test or pre-build scripts that handle compilation before running
test:prototypes
.We need to ensure that the
compile
step is not skipped by checking if there are any pre-test or pre-build scripts that handle the compilation.
Verify if there are any test-related scripts that handle compilation before running
test:prototypes
.We need to ensure that the
compile
step is included in any test-related scripts to avoid issues.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify if the compilation is handled elsewhere in the project. # Test: Search for the compilation commands. Expect: Compilation handled by other scripts or steps. rg --type json -A 5 $'"compile"'Length of output: 611
Script:
#!/bin/bash # Search for references to the `generate` script to ensure it is executed before running tests. rg --type json '"generate"' # Search for references to the `test:prototypes` script to understand its usage in the project. rg --type json '"test:prototypes"'Length of output: 273
Script:
#!/bin/bash # Search for lifecycle scripts such as `pretest` or `prebuild` in the package.json to verify if compilation is handled. rg --type json -A 5 '"pretest"' rg --type json -A 5 '"prebuild"'Length of output: 68
Script:
#!/bin/bash # Search for all test-related scripts in the package.json to verify if any of them include the `compile` step. rg --type json -A 5 '"test"'Length of output: 630
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (3)
- .github/workflows/test.yaml (3 hunks)
- package.json (1 hunks)
- slither.config.json (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- slither.config.json
Additional comments not posted (1)
.github/workflows/test.yaml (1)
38-40
: LGTM! The new step for building the project is correctly added.The addition of the
Build project
step ensures that the project is built before running tests.
There was a problem hiding this 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.yaml
Review profile: CHILL
Files selected for processing (1)
- .github/workflows/test.yaml (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- .github/workflows/test.yaml
Ignore foundry compilation when running slither as a CLI and in CI.
Summary by CodeRabbit
yarn build
instead ofyarn compile
for consistency in build processes.package.json
scripts to streamline testing by removing redundant compile steps.