-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added inheritdoc support, workflows, and fixes
Co-authored-by: Gas <[email protected]>
- Loading branch information
Showing
12 changed files
with
236 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Node.js CI | ||
|
||
on: push | ||
|
||
permissions: write-all | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.x, 18.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- run: yarn install | ||
|
||
- run: yarn test | ||
env: | ||
SOL_AST_COMPILER_CACHE: /home/runner/work/_temp/.compiler_cache | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,6 @@ yarn-error.log* | |
|
||
# Solidity | ||
src/artifacts | ||
|
||
# Build | ||
lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[![image](https://img.shields.io/npm/v/@defi-wonderland/natspec-smells.svg?style=flat-square)](https://www.npmjs.org/package/@defi-wonderland/natspec-smells) | ||
|
||
# Natspec Smells | ||
|
||
Some description will be written here. | ||
|
||
## Usage | ||
|
||
As simple as it gets, run: | ||
```bash | ||
npx @defi-wonderland/natspec-smells --contracts ./solidity | ||
``` | ||
|
||
|
||
## Options | ||
|
||
### `--contracts` (Required) | ||
Relative path to your solidity files. | ||
|
||
### `--base` | ||
Base directory to be used. | ||
|
||
Default: `./` | ||
|
||
|
||
## Contributors | ||
|
||
Natspec Smells was built with ❤️ by [Wonderland](https://defi.sucks). | ||
|
||
Wonderland is a team of top Web3 researchers, developers, and operators who believe that the future needs to be open-source, permissionless, and decentralized. | ||
|
||
[DeFi sucks](https://defi.sucks), but Wonderland is here to make it better. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity =0.8.19; | ||
|
||
interface IInterfacedSample { | ||
/** | ||
* @notice Greets the caller | ||
* | ||
* @return _greeting The greeting | ||
* @return _balance Current token balance of the caller | ||
*/ | ||
function greet() external view returns (string memory _greeting, uint256 _balance); | ||
} | ||
|
||
contract InterfacedSample is IInterfacedSample { | ||
/// @inheritdoc IInterfacedSample | ||
/// @dev some dev thingy | ||
function greet() external view returns (string memory _greeting, uint256 _balance) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,12 @@ | ||
export interface NatspecTag { | ||
name: string; | ||
description: string; | ||
} | ||
|
||
export interface NatspecParam { | ||
name: string; | ||
description: string; | ||
} | ||
|
||
export interface NatspecReturn { | ||
name: string | undefined; | ||
description: string; | ||
export interface NatspecDefinition { | ||
name?: string; | ||
content: string; | ||
} | ||
|
||
export interface Natspec { | ||
tags: NatspecTag[]; | ||
params: NatspecParam[]; | ||
returns: NatspecReturn[]; | ||
inheritdoc?: NatspecDefinition; | ||
tags: NatspecDefinition[]; | ||
params: NatspecDefinition[]; | ||
returns: NatspecDefinition[]; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.