Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Commit 5d18643

Browse files
committed
docs: improved readme
1 parent 0e49071 commit 5d18643

File tree

2 files changed

+39
-16
lines changed

2 files changed

+39
-16
lines changed

README.md

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,49 @@ Just like code, documentation can smell, too. `natspec-smells` aims to help auto
77

88
## Usage
99

10-
As simple as it gets, run:
10+
1. Install the package:
1111

12-
```bash
13-
npx @defi-wonderland/natspec-smells --contracts ./solidity
14-
```
12+
```bash
13+
yarn add --dev @defi-wonderland/natspec-smells
14+
```
15+
16+
2. Create a config file named `natspec-smells.config.js`, you can use the following as an example:
17+
18+
```javascript
19+
/**
20+
* For full explanation of each supported config, make sure to check the Config type below
21+
*/
22+
23+
/** @type {import('@defi-wonderland/natspec-smells').Config} */
24+
module.exports = {
25+
include: "src",
26+
exclude: ["tests", "scripts"],
27+
};
28+
```
29+
30+
3. Run
31+
```bash
32+
yarn @defi-wonderland/natspec-smells
33+
```
34+
35+
## Verify your natspec in CI
36+
37+
_Soon to come._
1538

1639
## Options
1740

18-
| Option | Description | Required | Default |
19-
| -------------------- | ------------------------------------------------------------------------- | -------- | ------- |
20-
| `contracts` | Relative path to your solidity files. | Yes | |
21-
| `root` | Root directory to be used. | No | `./` |
22-
| `enforceInheritdoc` | Whether `@inheritdoc` is used or not. | No | `true` |
23-
| `constructorNatspec` | Whether to enforce natspec for constructors. | No | `false` |
24-
| `ignore` | List of glob pattern of files and directories to exclude from processing. | No | `[]` |
41+
| Option | Description | Required | Default |
42+
| -------------------- | ------------------------------------------------------------------ | -------- | ------- |
43+
| `include` | Glob pattern of files to process. | Yes | |
44+
| `exclude` | Glob patterns of files to exclude. | No | `[]` |
45+
| `root` | Project root directory. | No | `./` |
46+
| `enforceInheritdoc` | True if all external and public functions should have @inheritdoc. | No | `true` |
47+
| `constructorNatspec` | True if the constructor should have natspec. | No | `false` |
2548

2649
## Contributors
2750

28-
Natspec Smells was built with ❤️ by [Wonderland](https://defi.sucks).
51+
Keep3r Framework was built with ❤️ by [Wonderland](https://defi.sucks).
2952

30-
Wonderland is a team of top Web3 researchers, developers, and operators who believe that the future needs to be open-source, permissionless, and decentralized.
53+
Wonderland the largest core development group in web3. Our commitment is to a financial future that's open, decentralized, and accessible to all.
3154

3255
[DeFi sucks](https://defi.sucks), but Wonderland is here to make it better.

src/types/config.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export interface Config {
22
include: string; // Required: Glob pattern of files to process.
33
exclude: string[]; // Optional: Glob patterns of files to exclude.
4-
root: string; // Optional: The target root directory.
5-
enforceInheritdoc: boolean; // Optional: If set to true, all external and public functions must have @inheritdoc.
6-
constructorNatspec: boolean; // Optional: True if constructor natspec is mandatory.
4+
root: string; // Optional: Project root directory.
5+
enforceInheritdoc: boolean; // Optional: True if all external and public functions should have @inheritdoc.
6+
constructorNatspec: boolean; // Optional: True if the constructor should have natspec.
77
}

0 commit comments

Comments
 (0)