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

Commit f23917a

Browse files
committed
Add workspace lints, start fixing doc comments
1 parent 79572ba commit f23917a

File tree

24 files changed

+76
-25
lines changed

24 files changed

+76
-25
lines changed

Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ exclude = [
8787

8888
resolver = "2"
8989

90+
[workspace.lints.rust.unexpected_cfgs]
91+
level = "warn"
92+
check-cfg = [
93+
'cfg(target_os, values("solana"))',
94+
'cfg(feature, values("frozen-abi", "no-entrypoint"))',
95+
]
96+
9097
[workspace.metadata.release]
9198
pre-release-commit-message = "Publish {{crate_name}} v{{version}}"
9299
tag-message = "Publish {{crate_name}} v{{version}}"

binary-option/program/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ uint = "0.10"
2020

2121
[lib]
2222
crate-type = ["cdylib", "lib"]
23+
24+
[lints]
25+
workspace = true

binary-oracle-pair/program/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ solana-sdk = "2.1.0"
2727

2828
[lib]
2929
crate-type = ["cdylib", "lib"]
30+
31+
[lints]
32+
workspace = true

examples/rust/custom-heap/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ crate-type = ["cdylib", "lib"]
2626

2727
[package.metadata.docs.rs]
2828
targets = ["x86_64-unknown-linux-gnu"]
29+
30+
[lints]
31+
workspace = true

feature-proposal/program/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ crate-type = ["cdylib", "lib"]
2727

2828
[package.metadata.docs.rs]
2929
targets = ["x86_64-unknown-linux-gnu"]
30+
31+
[lints]
32+
workspace = true

governance/addin-mock/program/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@ spl-governance-test-sdk = { version = "0.1.4", path = "../../test-sdk" }
3838

3939
[lib]
4040
crate-type = ["cdylib", "lib"]
41+
42+
[lints]
43+
workspace = true

governance/chat/program/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ spl-governance-addin-mock = { version = "0.1.4", path = "../../addin-mock/progra
4242

4343
[lib]
4444
crate-type = ["cdylib", "lib"]
45+
46+
[lints]
47+
workspace = true

governance/program/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,6 @@ spl-governance-addin-mock = { version = "0.1.4", path = "../addin-mock/program"
3939

4040
[lib]
4141
crate-type = ["cdylib", "lib"]
42+
43+
[lints]
44+
workspace = true

libraries/program-error/derive/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ pub fn print_program_error(input: TokenStream) -> TokenStream {
6868
/// a unique `u32` _starting_ error codes from the names of the enum variants.
6969
/// Notes:
7070
/// - The _error_ variant will start at this value, and the rest will be
71-
/// incremented by one
71+
/// incremented by one
7272
/// - The value provided is only for code readability, the actual error code
73-
/// will be a hash of the input string and is checked against your input
73+
/// will be a hash of the input string and is checked against your input
7474
///
7575
/// Syntax: `#[spl_program_error(hash_error_code_start = 1275525928)]`
7676
/// Hash Input: `spl_program_error:<enum name>:<variant name>`

memo/program/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ solana_program::declare_id!("MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr");
2727
/// Accounts expected by this instruction:
2828
///
2929
/// 0. ..0+N. `[signer]` Expected signers; if zero provided, instruction will
30-
/// be processed as a normal, unsigned spl-memo
30+
/// be processed as a normal, unsigned spl-memo
3131
pub fn build_memo(memo: &[u8], signer_pubkeys: &[&Pubkey]) -> Instruction {
3232
Instruction {
3333
program_id: id(),

0 commit comments

Comments
 (0)