Skip to content

Commit

Permalink
resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
broccolirob committed Mar 15, 2023
2 parents 4faae24 + 75efe75 commit bfbfa7f
Show file tree
Hide file tree
Showing 18 changed files with 2,068 additions and 597 deletions.
92 changes: 41 additions & 51 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,55 +3,45 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"skipFiles": ["**/app/out/vs/**.js"],
"preLaunchTask": "npm: watch",
"env": {
"EXISTING_LANGUAGE_SERVER_PORT": null,
}
},
{
"name": "Extension (attach to existing over network)",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"skipFiles": ["**/app/out/vs/**.js"],
"preLaunchTask": "npm: watch",
"env": {
"EXISTING_LANGUAGE_SERVER_PORT": "777",
}
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test"
],
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "npm: watch"
}
]
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"skipFiles": ["**/app/out/vs/**.js"],
"preLaunchTask": "npm: watch",
"env": {
"EXISTING_LANGUAGE_SERVER_PORT": null
}
},
{
"name": "Extension (attach to existing over network)",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"skipFiles": ["**/app/out/vs/**.js"],
"preLaunchTask": "npm: watch",
"env": {
"EXISTING_LANGUAGE_SERVER_PORT": "777"
}
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test"
],
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
"preLaunchTask": "npm: watch"
}
]
}
18 changes: 9 additions & 9 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": true // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
"files.exclude": {
"out": true // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
34 changes: 17 additions & 17 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
2 changes: 1 addition & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ src/**
.gitignore
vsc-extension-quickstart.md
**/tsconfig.json
**/tslint.json
**/.eslintrc.json
**/*.map
**/*.ts
resources/screenshot.png
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Change Log

All notable changes to the "vscode-slither" extension will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Initial Release] - 2019-05-14
## [Initial Release] - 2019-05-14
35 changes: 19 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
# Slither (Visual Studio Code Extension)

Visual Studio Code integration for [Slither](https://github.com/crytic/slither), a Solidity static analysis framework.

This extension offers Visual Studio Code integration for Slither, a Solidity static analysis framework written in Python 3. With Slither for Visual Studio Code, users can run a suite of vulnerability detectors on their Solidity smart contracts to annotate potentially dangerous code and receive suggested fixes.

<img src="https://raw.githubusercontent.com/crytic/slither-vscode/master/resources/screenshot.png" alt="Logo" width="900"/>


## Features
* Analyze open workspaces
* Explore results in a custom tree, sorted by issue type or severity
* View results as native Visual Studio Code information/warnings/errors
* See annotations for relevant source code for each issue
* Print detailed issue description and recommendations
* Filter issues by type (per workspace configuration)
* Specify custom solc path (per workspace configuration)
* Solidity Syntax Highlighting

- Analyze open workspaces
- Explore results in a custom tree, sorted by issue type or severity
- View results as native Visual Studio Code information/warnings/errors
- See annotations for relevant source code for each issue
- Print detailed issue description and recommendations
- Filter issues by type (per workspace configuration)
- Specify custom solc path (per workspace configuration)
- Solidity Syntax Highlighting

## Requirements
* [Slither](https://github.com/crytic/slither) ( >= 0.6.4 )
* [Visual Studio Code](https://code.visualstudio.com/download)
* Optional: Any desired build/test frameworks supported by Slither, such as Truffle.

** Slither must be accessible via the `slither` command in order for this extension to invoke it.
- [Slither](https://github.com/crytic/slither) ( >= 0.6.4 )
- [Visual Studio Code](https://code.visualstudio.com/download)
- Optional: Any desired build/test frameworks supported by Slither, such as Truffle.

\*\* Slither must be accessible via the `slither` command in order for this extension to invoke it.

## Installation

Expand All @@ -38,18 +40,19 @@ npm i
npm install -g vsce
vsce package
```

`slither-vscode-X.X.X.vsix` will be created.

Install the VSIX file in Visual Studio through `Extensions`, under the `...` menu.

## Getting Started

After installing the extension, simply open a workspace containing any Solidity (*.sol) files. The extension will activate, revealing the Slither logo on the action bar. Click it to reveal a new container with a results explorer and detector filter tree. Hovering over the explorer tree will reveal buttons on the top title bar which can be used to run slither, refresh, change viewing mode, and delete results.
After installing the extension, simply open a workspace containing any Solidity (\*.sol) files. The extension will activate, revealing the Slither logo on the action bar. Click it to reveal a new container with a results explorer and detector filter tree. Hovering over the explorer tree will reveal buttons on the top title bar which can be used to run slither, refresh, change viewing mode, and delete results.

Clicking a detector filter will toggle its visibility. Hovering over the detector filter tree will reveal a button with a flag icon, which is used as a toggle all button.

Left clicking a result in the result explorer will navigate to the result's code. Right clicking it will reveal additional options such as displaying additional information. If source is changed since the previous slither run, and a source mapping mismatch occurs, the problem and its annotations will disappear and an "out-of-sync" icon will appear to the left of the result in the explorer tree, indicating slither analysis should be re-run.

Left clicking a result in the result explorer will navigate to the result's code. Right clicking it will reveal additional options such as displaying additional information. If source is changed since the previous slither run, and a source mapping mismatch occurs, the problem and its annotations will disappear and an "out-of-sync" icon will appear to the left of the result in the explorer tree, indicating slither analysis should be re-run.

## License

AGPL-3.0
14 changes: 7 additions & 7 deletions resources/log.configuration.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"brackets": [
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"],
["<", ">"]
],
"autoClosingPairs": [
],
"autoClosingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"]
],
"surroundingPairs": [
],
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"]
]
}
]
}
Loading

0 comments on commit bfbfa7f

Please sign in to comment.