diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000000..826c57353f --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,11 @@ +name: lint + +on: [push, pull_request] + +jobs: + typos: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Check typos + uses: crate-ci/typos@v1.15.5 diff --git a/Lib9c.Policy/Policy/IVariableSubPolicy.cs b/Lib9c.Policy/Policy/IVariableSubPolicy.cs index 7c3f013f57..d62936c200 100644 --- a/Lib9c.Policy/Policy/IVariableSubPolicy.cs +++ b/Lib9c.Policy/Policy/IVariableSubPolicy.cs @@ -81,7 +81,7 @@ public interface IVariableSubPolicy /// to check. /// true if is target for any /// in . Otherwise, - /// fase. + /// false. /// /// Call to this method must only be used sparingly and should be avoided /// if possible. Usage of this method indicates dependency coupling between two diff --git a/Lib9c/Action/EventMaterialItemCrafts.cs b/Lib9c/Action/EventMaterialItemCrafts.cs index 793ce61a80..1ae6a452ac 100644 --- a/Lib9c/Action/EventMaterialItemCrafts.cs +++ b/Lib9c/Action/EventMaterialItemCrafts.cs @@ -187,7 +187,7 @@ public override IAccountStateDelta Execute(IActionContext context) var materialItemSheet = states.GetSheet(); if (!materialItemSheet.TryGetValue( recipeRow.ResultMaterialItemId, - out var resulMaterialRow)) + out var resultMaterialRow)) { throw new SheetRowNotFoundException( addressesHex, @@ -228,7 +228,7 @@ public override IAccountStateDelta Execute(IActionContext context) // ~Remove Required Materials // Create Material - var materialResult = ItemFactory.CreateMaterial(resulMaterialRow); + var materialResult = ItemFactory.CreateMaterial(resultMaterialRow); avatarState.inventory.AddItem(materialResult, recipeRow.ResultMaterialItemCount); // ~Create Material diff --git a/Lib9c/Action/ValidatorSetOperate.cs b/Lib9c/Action/ValidatorSetOperate.cs index 56743881ce..71e329d040 100644 --- a/Lib9c/Action/ValidatorSetOperate.cs +++ b/Lib9c/Action/ValidatorSetOperate.cs @@ -152,7 +152,7 @@ public override void LoadPlainValue(IValue plainValue) Operator = op; // FIXME: This is a temporary code for backward compatibility. - Operand = BackwardCompability(operandDict); + Operand = BackwardCompatibility(operandDict); Error = null; } @@ -172,7 +172,7 @@ protected override void LoadPlainValueInternal(IImmutableDictionary