Skip to content

Commit 2f09f9a

Browse files
onbjerggrandizzy
andauthored
docs: clean up config docs (#12296)
* docs: clean up config docs * fix test, remove todo --------- Co-authored-by: grandizzy <[email protected]> Co-authored-by: grandizzy <[email protected]>
1 parent 3ba035f commit 2f09f9a

File tree

2 files changed

+29
-27
lines changed

2 files changed

+29
-27
lines changed

crates/config/src/lib.rs

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -192,50 +192,52 @@ pub struct Config {
192192
#[serde(default, skip_serializing)]
193193
pub extends: Option<Extends>,
194194

195-
/// path of the source contracts dir, like `src` or `contracts`
195+
/// Path of the sources directory.
196+
///
197+
/// Defaults to `src`.
196198
pub src: PathBuf,
197-
/// path of the test dir
199+
/// Path of the tests directory.
198200
pub test: PathBuf,
199-
/// path of the script dir
201+
/// Path of the scripts directory.
200202
pub script: PathBuf,
201-
/// path to where artifacts shut be written to
203+
/// Path to the artifacts directory.
202204
pub out: PathBuf,
203-
/// all library folders to include, `lib`, `node_modules`
205+
/// Paths to all library folders, such as `lib`, or `node_modules`.
204206
pub libs: Vec<PathBuf>,
205-
/// `Remappings` to use for this repo
207+
/// Remappings to use for this repo
206208
pub remappings: Vec<RelativeRemapping>,
207-
/// Whether to autodetect remappings by scanning the `libs` folders recursively
209+
/// Whether to autodetect remappings.
208210
pub auto_detect_remappings: bool,
209-
/// library addresses to link
211+
/// Library addresses to link.
210212
pub libraries: Vec<String>,
211-
/// whether to enable cache
213+
/// Whether to enable the build cache.
212214
pub cache: bool,
213-
/// whether to dynamically link tests
214-
pub dynamic_test_linking: bool,
215-
/// where the cache is stored if enabled
215+
/// The path to the cache store.
216216
pub cache_path: PathBuf,
217-
/// where the gas snapshots are stored
217+
/// Whether to dynamically link tests.
218+
pub dynamic_test_linking: bool,
219+
/// Where the gas snapshots are stored.
218220
pub snapshots: PathBuf,
219-
/// whether to check for differences against previously stored gas snapshots
221+
/// Whether to check for differences against previously stored gas snapshots.
220222
pub gas_snapshot_check: bool,
221-
/// whether to emit gas snapshots to disk
223+
/// Whether to emit gas snapshots to disk.
222224
pub gas_snapshot_emit: bool,
223-
/// where the broadcast logs are stored
225+
/// The path to store broadcast logs at.
224226
pub broadcast: PathBuf,
225-
/// additional solc allow paths for `--allow-paths`
227+
/// Additional paths passed to `solc --allow-paths`.
226228
pub allow_paths: Vec<PathBuf>,
227-
/// additional solc include paths for `--include-path`
229+
/// Additional paths passed to `solc --include-path`.
228230
pub include_paths: Vec<PathBuf>,
229-
/// glob patterns to skip
231+
/// Glob patterns for file paths to skip when building and executing contracts.
230232
pub skip: Vec<GlobMatcher>,
231-
/// whether to force a `project.clean()`
233+
/// Whether to forcefully clean all project artifacts before running commands.
232234
pub force: bool,
233-
/// evm version to use
235+
/// The EVM version to use when building contracts.
234236
#[serde(with = "from_str_lowercase")]
235237
pub evm_version: EvmVersion,
236-
/// list of contracts to report gas of
238+
/// List of contracts to generate gas reports for.
237239
pub gas_reports: Vec<String>,
238-
/// list of contracts to ignore for gas reports
240+
/// List of contracts to ignore for gas reports.
239241
pub gas_reports_ignore: Vec<String>,
240242
/// Whether to include gas reports for tests.
241243
pub gas_reports_include_tests: bool,
@@ -302,9 +304,9 @@ pub struct Config {
302304
/// Multiple etherscan api configs and their aliases
303305
#[serde(default, skip_serializing_if = "EtherscanConfigs::is_empty")]
304306
pub etherscan: EtherscanConfigs,
305-
/// list of solidity error codes to always silence in the compiler output
307+
/// List of solidity error codes to always silence in the compiler output.
306308
pub ignored_error_codes: Vec<SolidityErrorCode>,
307-
/// list of file paths to ignore
309+
/// List of file paths to ignore.
308310
#[serde(rename = "ignored_warnings_from")]
309311
pub ignored_file_paths: Vec<PathBuf>,
310312
/// Diagnostic level (minimum) at which the process should finish with a non-zero exit.

crates/forge/tests/cli/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ remappings = ["forge-std/=lib/forge-std/src/"]
3939
auto_detect_remappings = true
4040
libraries = []
4141
cache = true
42-
dynamic_test_linking = false
4342
cache_path = "cache"
43+
dynamic_test_linking = false
4444
snapshots = "snapshots"
4545
gas_snapshot_check = false
4646
gas_snapshot_emit = true
@@ -1181,8 +1181,8 @@ forgetest_init!(test_default_config, |prj, cmd| {
11811181
"auto_detect_remappings": true,
11821182
"libraries": [],
11831183
"cache": true,
1184-
"dynamic_test_linking": false,
11851184
"cache_path": "cache",
1185+
"dynamic_test_linking": false,
11861186
"snapshots": "snapshots",
11871187
"gas_snapshot_check": false,
11881188
"gas_snapshot_emit": true,

0 commit comments

Comments
 (0)