Skip to content

Commit bd02829

Browse files
committed
update linting configurations
1 parent 7562c92 commit bd02829

File tree

7 files changed

+15
-6
lines changed

7 files changed

+15
-6
lines changed

program/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,11 @@ crate-type = ["cdylib", "lib"]
3535

3636
[build-dependencies]
3737
rustc_version = "0.4"
38+
39+
[lints.rust.unexpected_cfgs]
40+
level = "warn"
41+
check-cfg = [
42+
'cfg(target_os, values("solana"))',
43+
'cfg(feature, values("min_specialization"))',
44+
'cfg(RUSTC_WITH_SPECIALIZATION)',
45+
]

program/tests/create_lookup_table_ix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ fn test_create_lookup_table_idempotent() {
6464
lookup_table_account.lamports(),
6565
Rent::default().minimum_balance(LOOKUP_TABLE_META_SIZE)
6666
);
67-
let lookup_table = AddressLookupTable::deserialize(&lookup_table_account.data()).unwrap();
67+
let lookup_table = AddressLookupTable::deserialize(lookup_table_account.data()).unwrap();
6868
assert_eq!(lookup_table.meta.deactivation_slot, Slot::MAX);
6969
assert_eq!(lookup_table.meta.authority, Some(authority));
7070
assert_eq!(lookup_table.meta.last_extended_slot, 0);

program/tests/deactivate_lookup_table_ix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fn test_deactivate_lookup_table() {
3636

3737
let lookup_table_account = result.get_account(&lookup_table_address).unwrap();
3838

39-
let lookup_table = AddressLookupTable::deserialize(&lookup_table_account.data()).unwrap();
39+
let lookup_table = AddressLookupTable::deserialize(lookup_table_account.data()).unwrap();
4040
assert_eq!(lookup_table.meta.deactivation_slot, 0);
4141

4242
// Check that only the deactivation slot changed

program/tests/extend_lookup_table_ix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ fn run_test_case(mollusk: &Mollusk, test_case: TestCase) {
4444
assert!(matches!(result.program_result, ProgramResult::Success));
4545

4646
let table_account = result.get_account(&test_case.lookup_table_address).unwrap();
47-
let lookup_table = AddressLookupTable::deserialize(&table_account.data()).unwrap();
47+
let lookup_table = AddressLookupTable::deserialize(table_account.data()).unwrap();
4848
assert_eq!(lookup_table, expected_account.state);
4949
assert_eq!(table_account.lamports(), expected_account.lamports);
5050
assert_eq!(table_account.data().len(), expected_account.data_len);

program/tests/freeze_lookup_table_ix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fn test_freeze_lookup_table() {
3535
);
3636

3737
let lookup_table_account = result.get_account(&lookup_table_address).unwrap();
38-
let lookup_table = AddressLookupTable::deserialize(&lookup_table_account.data()).unwrap();
38+
let lookup_table = AddressLookupTable::deserialize(lookup_table_account.data()).unwrap();
3939

4040
assert_eq!(lookup_table.meta.authority, None);
4141

scripts/client/lint-rust.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
// Configure arguments here.
1111
const lintArgs = [
1212
'-Zunstable-options',
13+
'--all-targets',
1314
'--',
1415
'--deny=warnings',
1516
...cliArguments(),

scripts/program/lint.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import {
1111
// Configure arguments here.
1212
const lintArgs = [
1313
'-Zunstable-options',
14-
'--features',
15-
'bpf-entrypoint,test-sbf',
14+
'--all-targets',
15+
'--all-features',
1616
'--',
1717
'--deny=warnings',
1818
'--deny=clippy::arithmetic_side_effects',

0 commit comments

Comments
 (0)