Skip to content

fix: default severity to WARN instead of OFF #556

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/rules/naming/foundry-test-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: "foundry-test-functions | Solhint"

# foundry-test-functions
![Category Badge](https://img.shields.io/badge/-Style%20Guide%20Rules-informational)
![Default Severity Badge off](https://img.shields.io/badge/Default%20Severity-off-undefined)
![Default Severity Badge warn](https://img.shields.io/badge/Default%20Severity-warn-yellow)

## Description
Enforce naming convention on functions for Foundry test cases
Expand All @@ -16,14 +16,14 @@ This rule accepts an array of options:

| Index | Description | Default Value |
| ----- | ----------------------------------------------------- | ------------- |
| 0 | Rule severity. Must be one of "error", "warn", "off". | off |
| 0 | Rule severity. Must be one of "error", "warn", "off". | warn |


### Example Config
```json
{
"rules": {
"foundry-test-functions": ["off",["setUp"]]
"foundry-test-functions": ["warn",["setUp"]]
}
}
```
Expand Down
6 changes: 3 additions & 3 deletions docs/rules/naming/named-parameters-mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ title: "named-parameters-mapping | Solhint"

# named-parameters-mapping
![Category Badge](https://img.shields.io/badge/-Style%20Guide%20Rules-informational)
![Default Severity Badge off](https://img.shields.io/badge/Default%20Severity-off-undefined)
![Default Severity Badge warn](https://img.shields.io/badge/Default%20Severity-warn-yellow)

## Description
Solidity v0.8.18 introduced named parameters on the mappings definition.

## Options
This rule accepts a string option of rule severity. Must be one of "error", "warn", "off". Default to off.
This rule accepts a string option of rule severity. Must be one of "error", "warn", "off". Default to warn.

### Example Config
```json
{
"rules": {
"named-parameters-mapping": "off"
"named-parameters-mapping": "warn"
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/naming/foundry-test-functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const BaseChecker = require('../base-checker')
const naming = require('../../common/identifier-naming')
const { severityDescription } = require('../../doc/utils')

const DEFAULT_SEVERITY = 'off'
const DEFAULT_SEVERITY = 'warn'
const DEFAULT_SKIP_FUNCTIONS = ['setUp']

const ruleId = 'foundry-test-functions'
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/naming/named-parameters-mapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const meta = {
},
isDefault: false,
recommended: false,
defaultSetup: 'off',
defaultSetup: 'warn',
schema: null,
}

Expand Down