-
Notifications
You must be signed in to change notification settings - Fork 671
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New: Use path to load resources in
.sonarwhalrc
Enable loading a resource using a path instead of the ID of the package. This is useful when you have multiple configuration files with some common parts or when you have a locally developed rule that you don't want to publish on a package. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Fix #1123
- Loading branch information
Showing
5 changed files
with
197 additions
and
34 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...ges/sonarwhal/docs/user-guide/further-configuration/using-relative-resources.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Using relative resources | ||
|
||
You can use relative resources in your `.sonarwhalrc` file: | ||
|
||
```json | ||
{ | ||
"connector": { | ||
"name": "../my-connector/connector.js" | ||
}, | ||
"formatters": ["../../formatters/my-formatter.js"], | ||
"rules": { | ||
"../my-rule/rule.js": "error" | ||
}, | ||
"rulesTimeout": 120000 | ||
} | ||
``` | ||
|
||
Some things to keep in mind: | ||
|
||
* Only relative paths to the config file are supported. | ||
* Regardless of your OS you have to use `/` as the separator. | ||
* The resource will be resolved relatively to where the config file that | ||
needs the resource is. This is important if you are extending configurations. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters