Repository: protofire/solhint
Pull request #586 (2024-06-13 04:01:19)

chore: fix some comments


Patch:
diff --git a/docs/rules/naming/named-parameters-mapping.md b/docs/rules/naming/named-parameters-mapping.md
index 1f3d1a8..fe793ea 100644
--- a/docs/rules/naming/named-parameters-mapping.md
+++ b/docs/rules/naming/named-parameters-mapping.md
@@ -39,7 +39,7 @@ mapping(string name => uint256 balance) public users;
 mapping(address owner => mapping(address token => uint256 balance)) public tokenBalances;
 ```
 
-#### Main key of mapping is enforced. On nested mappings other naming are not neccesary
+#### Main key of mapping is enforced. On nested mappings other naming are not necessary
 
 ```solidity
 mapping(address owner => mapping(address => uint256)) public tokenBalances;
diff --git a/lib/rules/naming/func-named-parameters.js b/lib/rules/naming/func-named-parameters.js
index 170ea4b..8d57f75 100644
--- a/lib/rules/naming/func-named-parameters.js
+++ b/lib/rules/naming/func-named-parameters.js
@@ -71,7 +71,7 @@ class FunctionNamedParametersChecker extends BaseChecker {
       if (qtyNamed === 0 && qtyArgs > this.maxUnnamedArguments) {
         this.error(
           node,
-          `Named parameters missing. MIN unnamed argumenst is ${this.maxUnnamedArguments}`
+          `Named parameters missing. MIN unnamed arguments is ${this.maxUnnamedArguments}`
         )
       }
     }
diff --git a/lib/rules/naming/named-parameters-mapping.js b/lib/rules/naming/named-parameters-mapping.js
index c170fa6..a798abc 100644
--- a/lib/rules/naming/named-parameters-mapping.js
+++ b/lib/rules/naming/named-parameters-mapping.js
@@ -20,7 +20,7 @@ const meta = {
         },
         {
           description:
-            'Main key of mapping is enforced. On nested mappings other naming are not neccesary',
+            'Main key of mapping is enforced. On nested mappings other naming are not necessary',
           code: 'mapping(address owner => mapping(address => uint256)) public tokenBalances;',
         },
         {


Test patch:
diff --git a/e2e/test.js b/e2e/test.js
index 2d77e75..59c2bfd 100644
--- a/e2e/test.js
+++ b/e2e/test.js
@@ -96,7 +96,7 @@ describe('e2e', function () {
     const PATH = '03-no-empty-blocks'
     const { PREFIX, SUFFIX } = prepareContext(PATH)
 
-    it('No contracts to lint should fail with appropiate message', function () {
+    it('No contracts to lint should fail with appropriate message', function () {
       const { code, stderr } = shell.exec(`${NODE}solhint Foo1.sol ${SUFFIX}`)
 
       expect(code).to.equal(EXIT_CODES.BAD_OPTIONS)
diff --git a/test/rules/naming/func-named-parameters.js b/test/rules/naming/func-named-parameters.js
index c1102d2..97389e6 100644
--- a/test/rules/naming/func-named-parameters.js
+++ b/test/rules/naming/func-named-parameters.js
@@ -27,7 +27,7 @@ describe('Linter - func-named-parameters', () => {
       assertErrorCount(report, 1)
       assertErrorMessage(
         report,
-        `Named parameters missing. MIN unnamed argumenst is ${
+        `Named parameters missing. MIN unnamed arguments is ${
           minUnnamed < DEFAULT_MIN_UNNAMED_ARGUMENTS ? DEFAULT_MIN_UNNAMED_ARGUMENTS : minUnnamed
         }`
       )
@@ -90,7 +90,7 @@ describe('Linter - func-named-parameters', () => {
 
     assertErrorMessage(
       report,
-      `Named parameters missing. MIN unnamed argumenst is ${DEFAULT_MIN_UNNAMED_ARGUMENTS}`
+      `Named parameters missing. MIN unnamed arguments is ${DEFAULT_MIN_UNNAMED_ARGUMENTS}`
     )
   })
 
@@ -106,7 +106,7 @@ describe('Linter - func-named-parameters', () => {
 
     assertErrorMessage(
       report,
-      `Named parameters missing. MIN unnamed argumenst is ${DEFAULT_MIN_UNNAMED_ARGUMENTS}`
+      `Named parameters missing. MIN unnamed arguments is ${DEFAULT_MIN_UNNAMED_ARGUMENTS}`
     )
   })
 })