Skip to content

Commit f29aa44

Browse files
committed
Add priority override to README
1 parent e73dbb7 commit f29aa44

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,19 @@ public class LibraryArchRulesTest {
9393
public void aMethod() {
9494
LibraryClass.newApi();
9595
}
96-
}
96+
}
9797
static class FailingCode {
9898
public void aMethod() {
9999
LibraryClass.deprecatedApi();
100100
}
101101
}
102-
102+
103103
@Test
104104
public void test_pass() {
105105
EvaluationResult result = Runner.check(LibraryArchRules.noDeprecated, PassingCode.class);
106106
Assertions.assertFalse(result.hasViolation());
107107
}
108-
108+
109109
@Test
110110
public void test_fail() {
111111
EvaluationResult result = Runner.check(LibraryArchRules.noDeprecated, FailingCode.class);
@@ -140,7 +140,7 @@ dependencies {
140140
}
141141
```
142142

143-
#### Report Configuration
143+
#### Report Configuration
144144

145145
The plugin can generate JSON and console reports. Both are enabled by default. The console report can be disabled:
146146
```kotlin
@@ -164,6 +164,17 @@ archRules {
164164
```
165165
The default threshold is MEDIUM.
166166

167+
#### Overriding rule priority
168+
169+
You can override the default priority of a rule with the `ruleName`:
170+
```kotlin
171+
archRules {
172+
rule("deprecated") {
173+
priority("HIGH")
174+
}
175+
}
176+
```
177+
167178
#### Configuring which code is tested
168179

169180
You can skip running rules on a specific source set:
@@ -200,4 +211,4 @@ http://www.apache.org/licenses/LICENSE-2.0
200211

201212
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "
202213
AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
203-
language governing permissions and limitations under the License.
214+
language governing permissions and limitations under the License.

0 commit comments

Comments
 (0)