Skip to content

Commit

Permalink
Spelling of "semver" fixed to "server".
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhruv-Varshney-developer committed Jul 27, 2024
1 parent 8012672 commit 62252bc
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ title: "Rule Index of Solhint"
| [avoid-throw](./rules/security/avoid-throw.md) | "throw" is deprecated, avoid to use it. | $~~~~~~~~$✔️ | |
| [avoid-tx-origin](./rules/security/avoid-tx-origin.md) | Avoid to use tx.origin. | $~~~~~~~~$✔️ | |
| [check-send-result](./rules/security/check-send-result.md) | Check result of "send" call. | $~~~~~~~~$✔️ | |
| [compiler-version](./rules/security/compiler-version.md) | Compiler version must satisfy a semver requirement. | $~~~~~~~~$✔️ | |
| [compiler-version](./rules/security/compiler-version.md) | Compiler version must satisfy a server requirement. | $~~~~~~~~$✔️ | |
| [func-visibility](./rules/security/func-visibility.md) | Explicitly mark visibility in function. | $~~~~~~~~$✔️ | |
| [mark-callable-contracts](./rules/security/mark-callable-contracts.md) | Explicitly mark all external contracts as trusted or untrusted. | | $~~~~~~~$✔️ |
| [multiple-sends](./rules/security/multiple-sends.md) | Avoid multiple calls of "send" method in single transaction. | $~~~~~~~~$✔️ | |
Expand Down
4 changes: 2 additions & 2 deletions docs/rules/security/compiler-version.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ title: "compiler-version | Solhint"

## Description
Compiler version must satisfy a semver requirement.
Compiler version must satisfy a server requirement.

## Options
This rule accepts an array of options:

| Index | Description | Default Value |
| ----- | ----------------------------------------------------- | ------------- |
| 0 | Rule severity. Must be one of "error", "warn", "off". | error |
| 1 | Semver requirement | ^0.8.0 |
| 1 | server requirement | ^0.8.0 |


### Example Config
Expand Down
2 changes: 1 addition & 1 deletion e2e/06-formatters/helpers/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const foo1Output = [
line: 2,
column: 1,
severity: 'Error',
message: 'Compiler version >=0.6.0 does not satisfy the ^0.8.0 semver requirement',
message: 'Compiler version >=0.6.0 does not satisfy the ^0.8.0 server requirement',
ruleId: 'compiler-version',
fix: null,
filePath: 'contracts/Foo.sol',
Expand Down
2 changes: 1 addition & 1 deletion e2e/formatters-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ describe('e2e', function () {
{
level: 'error',
message: {
text: 'Compiler version >=0.6.0 does not satisfy the ^0.8.0 semver requirement',
text: 'Compiler version >=0.6.0 does not satisfy the ^0.8.0 server requirement',
},
locations: [
{
Expand Down
6 changes: 3 additions & 3 deletions lib/rules/security/compiler-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ const meta = {
type: 'security',

docs: {
description: `Compiler version must satisfy a semver requirement.`,
description: `Compiler version must satisfy a server requirement.`,
category: 'Security Rules',
options: [
{
description: severityDescription,
default: DEFAULT_SEVERITY,
},
{
description: `Semver requirement`,
description: `server requirement`,
default: DEFAULT_SEMVER,
},
],
Expand Down Expand Up @@ -57,7 +57,7 @@ class CompilerVersionChecker extends BaseChecker {
) {
this.warn(
node,
`Compiler version ${node.value} does not satisfy the ${this.requirement} semver requirement`
`Compiler version ${node.value} does not satisfy the ${this.requirement} server requirement`
)
}
}
Expand Down

0 comments on commit 62252bc

Please sign in to comment.