Skip to content

Commit 8237135

Browse files
committed
Fix codespell action
Previously the action did not checkout the repository and as such actually didn't do what it was supposed to. This patch fixes all typos that accumulated over the time. Adds the checkout action and fixes the codespell version action to `v1`. Additionally codespell settings have been moved to a file so that the `codespell` command line can be executed locally using the same settings as in the CI. Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
1 parent b234176 commit 8237135

File tree

20 files changed

+45
-45
lines changed

20 files changed

+45
-45
lines changed

.codespellrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[codespell]
2+
skip = .git,target,Cargo.lock
3+
ignore-words-list = crate,keypair,daa

.github/workflows/ci.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,14 @@ on: [push, pull_request]
44

55
jobs:
66
# Use the following command to fix words locally:
7-
# codespell --ignore-words-list "crate,daa,keypair" --skip "*/target,*-sys" --write-changes
7+
# codespell --write-changes
88
check-spelling:
99
name: Check spelling
1010
runs-on: ubuntu-latest
1111
steps:
12+
- uses: actions/checkout@v2
1213
- name: Check spelling
13-
uses: codespell-project/actions-codespell@master
14-
with:
15-
ignore_words_list: "crate,daa,keypair"
16-
path: tss-esapi
17-
skip: "*/target,*-sys"
14+
uses: codespell-project/actions-codespell@v1
1815

1916
formatting:
2017
name: Check formatting

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109

110110
**Fixed bugs:**
111111

112-
- PcrSlot wont compile if TPM2\_PCR\_SELECT\_MAX != 4 [\#310](https://github.com/parallaxsecond/rust-tss-esapi/issues/310)
112+
- PcrSlot won't compile if TPM2\_PCR\_SELECT\_MAX != 4 [\#310](https://github.com/parallaxsecond/rust-tss-esapi/issues/310)
113113
- Build failure for tss-esapi 6.1.0 with zeroize\_derive 1.2.0 [\#260](https://github.com/parallaxsecond/rust-tss-esapi/issues/260)
114114
- Investigate if context methods are using incorrect types. [\#186](https://github.com/parallaxsecond/rust-tss-esapi/issues/186)
115115
- Change default RSA exponent to 0 [\#292](https://github.com/parallaxsecond/rust-tss-esapi/pull/292) ([ionut-arm](https://github.com/ionut-arm))
@@ -128,7 +128,7 @@
128128
**Merged pull requests:**
129129

130130
- Prepare 7.0.0-beta.1 release [\#320](https://github.com/parallaxsecond/rust-tss-esapi/pull/320) ([ionut-arm](https://github.com/ionut-arm))
131-
- Updates depedencies [\#318](https://github.com/parallaxsecond/rust-tss-esapi/pull/318) ([Superhepper](https://github.com/Superhepper))
131+
- Updates dependencies [\#318](https://github.com/parallaxsecond/rust-tss-esapi/pull/318) ([Superhepper](https://github.com/Superhepper))
132132
- Fixes some pcr issues. [\#317](https://github.com/parallaxsecond/rust-tss-esapi/pull/317) ([Superhepper](https://github.com/Superhepper))
133133
- Creates native type for TPML\_CCA [\#315](https://github.com/parallaxsecond/rust-tss-esapi/pull/315) ([Superhepper](https://github.com/Superhepper))
134134
- Make the crate compatible with 1.53 toolchain [\#314](https://github.com/parallaxsecond/rust-tss-esapi/pull/314) ([ionut-arm](https://github.com/ionut-arm))
@@ -145,7 +145,7 @@
145145
- Added SignatureScheme type. [\#286](https://github.com/parallaxsecond/rust-tss-esapi/pull/286) ([Superhepper](https://github.com/Superhepper))
146146
- Make Name wrap the raw type directly [\#280](https://github.com/parallaxsecond/rust-tss-esapi/pull/280) ([wiktor-k](https://github.com/wiktor-k))
147147
- Add `policy_duplication_select` to Context [\#278](https://github.com/parallaxsecond/rust-tss-esapi/pull/278) ([wiktor-k](https://github.com/wiktor-k))
148-
- Added auth\_policy method to ther Public structure. [\#274](https://github.com/parallaxsecond/rust-tss-esapi/pull/274) ([Superhepper](https://github.com/Superhepper))
148+
- Added auth\_policy method to the Public structure. [\#274](https://github.com/parallaxsecond/rust-tss-esapi/pull/274) ([Superhepper](https://github.com/Superhepper))
149149
- Improved tests and naming for CapabilityType [\#273](https://github.com/parallaxsecond/rust-tss-esapi/pull/273) ([Superhepper](https://github.com/Superhepper))
150150
- Fix a typo in "bitfield" [\#272](https://github.com/parallaxsecond/rust-tss-esapi/pull/272) ([wiktor-k](https://github.com/wiktor-k))
151151
- Fix builders when using Null symmetric \(and a couple of small fixes\) [\#271](https://github.com/parallaxsecond/rust-tss-esapi/pull/271) ([wiktor-k](https://github.com/wiktor-k))

tss-esapi-sys/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ case:
2828
$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
2929
```
3030

31-
The FFI bindings presented by this crate can be either those commited in the
31+
The FFI bindings presented by this crate can be either those committed in the
3232
crate under `src/bindings` or generated on the fly from the library headers
3333
found on the system, at build time. For generating the bindings at build time
3434
please enable the `generate-bindings` feature, as it is not enabled by default.

tss-esapi/src/attributes/command_code.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl TryFrom<TPMA_CC> for CommandCodeAttributes {
5050
let command_code_attributes = CommandCodeAttributes(tpma_cc);
5151
if command_code_attributes.reserved() != 0 || command_code_attributes.res() != 0 {
5252
error!(
53-
"Command code attributes from the TPM contained a non zero value in a resrved area"
53+
"Command code attributes from the TPM contained a non zero value in a reserved area"
5454
);
5555
return Err(Error::local_error(WrapperErrorKind::InvalidParam));
5656
}

tss-esapi/src/constants/tss.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ pub use crate::tss2_esys::TSS2_BASE_RC_BAD_SIZE; /* If size of a parameter is in
652652
pub use crate::tss2_esys::TSS2_BASE_RC_BAD_TCTI_STRUCTURE; /* TCTI context is bad. */
653653
pub use crate::tss2_esys::TSS2_BASE_RC_BAD_TR; /* Invalid ESYS_TR handle */
654654
pub use crate::tss2_esys::TSS2_BASE_RC_BAD_VALUE; /* A parameter has a bad value */
655-
pub use crate::tss2_esys::TSS2_BASE_RC_GENERAL_FAILURE; /* Catch all for all errors not otherwise specifed */
655+
pub use crate::tss2_esys::TSS2_BASE_RC_GENERAL_FAILURE; /* Catch all for all errors not otherwise specified */
656656
pub use crate::tss2_esys::TSS2_BASE_RC_INCOMPATIBLE_TCTI; /* Unknown or unusable TCTI version */
657657
pub use crate::tss2_esys::TSS2_BASE_RC_INSUFFICIENT_BUFFER; /* A buffer isn't large enough */
658658
pub use crate::tss2_esys::TSS2_BASE_RC_INSUFFICIENT_CONTEXT; /* Context not large enough */

tss-esapi/src/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ impl Drop for Context {
457457
}
458458
}
459459

460-
// Check if all handles have been cleaned up proeprly.
460+
// Check if all handles have been cleaned up properly.
461461
if self.handle_manager.has_open_handles() {
462462
error!("Not all handles have had their resources successfully released");
463463
}

tss-esapi/src/context/tpm_commands/context_management.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ impl Context {
217217
/// # handle,
218218
/// # tss_esapi::interface_types::dynamic_handles::Persistent::Persistent(persistent_tpm_handle),
219219
/// # )
220-
/// # .expect("Failed to evict persitent handle")
220+
/// # .expect("Failed to evict persistent handle")
221221
/// # });
222222
/// # break;
223223
/// # }
@@ -281,7 +281,7 @@ impl Context {
281281
/// # ctx.tr_from_tpm_public(TpmHandle::Persistent(persistent_tpm_handle))
282282
/// # .expect("Failed to load the persistent handle")
283283
/// # });
284-
/// # // Evict the persitent handle from the tpm
284+
/// # // Evict the persistent handle from the tpm
285285
/// # let _ = context.execute_with_session(Some(AuthSession::Password), |ctx| {
286286
/// # ctx
287287
/// # .evict_control(Provision::Owner, retireved_persistent_handle, persistent)
@@ -336,7 +336,7 @@ impl Context {
336336
/// # handle,
337337
/// # tss_esapi::interface_types::dynamic_handles::Persistent::Persistent(persistent_tpm_handle),
338338
/// # )
339-
/// # .expect("Failed to evict persitent handle")
339+
/// # .expect("Failed to evict persistent handle")
340340
/// # });
341341
/// # break;
342342
/// # }
@@ -400,7 +400,7 @@ impl Context {
400400
/// # ctx.tr_from_tpm_public(TpmHandle::Persistent(persistent_tpm_handle))
401401
/// # .expect("Failed to load the persistent handle")
402402
/// # });
403-
/// // Evict the persitent handle from the tpm
403+
/// // Evict the persistent handle from the tpm
404404
/// // An authorization session is required!
405405
/// let _ = context.execute_with_session(Some(AuthSession::Password), |ctx| {
406406
/// ctx

tss-esapi/src/error/return_code/tpm/format_one.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ impl std::fmt::Display for TpmFormatOneResponseCode {
9898

9999
bitfield! {
100100
/// A struct representing the format one
101-
/// TPM retrun code.
101+
/// TPM return code.
102102
#[derive(PartialEq, Copy, Clone)]
103103
struct TpmFormatOneResponseCodeStructure(u16);
104104
impl Debug;

tss-esapi/src/error/return_code/tpm/format_one/argument_number.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,24 @@ impl From<u8> for ArgumentNumber {
2626

2727
impl From<ArgumentNumber> for u8 {
2828
fn from(argument_number: ArgumentNumber) -> u8 {
29-
let mut strucuture = ArgumentNumberStructure(0);
29+
let mut structure = ArgumentNumberStructure(0);
3030
match argument_number {
3131
ArgumentNumber::Parameter(number) => {
32-
strucuture.set_is_parameter(true);
33-
strucuture.set_parameter_number(number);
32+
structure.set_is_parameter(true);
33+
structure.set_parameter_number(number);
3434
}
3535
ArgumentNumber::Session(number) => {
36-
strucuture.set_is_parameter(false);
37-
strucuture.set_is_session(true);
38-
strucuture.set_session_number(number);
36+
structure.set_is_parameter(false);
37+
structure.set_is_session(true);
38+
structure.set_session_number(number);
3939
}
4040
ArgumentNumber::Handle(number) => {
41-
strucuture.set_is_parameter(false);
42-
strucuture.set_is_session(false);
43-
strucuture.set_handle_number(number);
41+
structure.set_is_parameter(false);
42+
structure.set_is_session(false);
43+
structure.set_handle_number(number);
4444
}
4545
}
46-
strucuture.0
46+
structure.0
4747
}
4848
}
4949

@@ -65,7 +65,7 @@ impl std::fmt::Display for ArgumentNumber {
6565

6666
bitfield! {
6767
/// A struct representing the the argument in format one
68-
/// TPM retrun code.
68+
/// TPM return code.
6969
#[derive(PartialEq, Copy, Clone)]
7070
struct ArgumentNumberStructure(u8);
7171
impl Debug;

0 commit comments

Comments
 (0)