Skip to content

Commit

Permalink
Merge pull request #409 from mrfyda/master
Browse files Browse the repository at this point in the history
fix: Remove deprecation message from Pattern title CY-7084
  • Loading branch information
mrfyda authored Aug 21, 2023
2 parents 7111b39 + f0658df commit ac4b893
Show file tree
Hide file tree
Showing 189 changed files with 3,748 additions and 3,737 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ target
/.bsp
.idea
.metals
project/metals.sbt
.bloop
.DS_Store
*.iml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,24 @@ import com.vladsch.flexmark.parser.Parser
object ParseMarkupRule {

private def findDescriptionAsString(root: Node): String = {
val stringBuilder = new java.lang.StringBuilder()
root.getChildIterator.next().getNext.getChars.appendTo(stringBuilder)
stringBuilder.toString
val firstLineOfDescription = root.getChildIterator.next().getNext.getChars.toString()
val secondLineOfDescription = root.getChildIterator.next().getNext.getNext.getChars.toString()

if (!isRuleDeprecationWarning(firstLineOfDescription)) {
firstLineOfDescription
} else {
s"[Deprecated] $secondLineOfDescription"
}
}

def parseForDescriptions(rule: File): String = {
val parser = Parser.builder().build
val document = parser.parse(rule.contentAsString)
findDescriptionAsString(document)
}

private def isRuleDeprecationWarning(description: String): Boolean = {
description.startsWith("> **Warning** This rule is deprecated and will be removed in the future.")
}

}
4 changes: 2 additions & 2 deletions docs/description/alpha-value-notation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Specify percentage or number notation for alpha-values.
* This notation */
```

The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideoptions.md#fix) can automatically fix all of the problems reported by this rule.
The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.

The [`message` secondary option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideconfigure.md#message) can accept the arguments of this rule.
The [`message` secondary option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/configure.md#message) can accept the arguments of this rule.

## Options

Expand Down
2 changes: 1 addition & 1 deletion docs/description/annotation-no-unknown.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ a { color: green !imprtant; }

This rule considers annotations defined in the CSS Specifications, up to and including Editor's Drafts, to be known.

The [`message` secondary option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideconfigure.md#message) can accept the arguments of this rule.
The [`message` secondary option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/configure.md#message) can accept the arguments of this rule.

## Options

Expand Down
2 changes: 1 addition & 1 deletion docs/description/at-rule-allowed-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Specify a list of allowed at-rules.
* At-rules like this */
```

The [`message` secondary option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideconfigure.md#message) can accept the arguments of this rule.
The [`message` secondary option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/configure.md#message) can accept the arguments of this rule.

## Options

Expand Down
2 changes: 1 addition & 1 deletion docs/description/at-rule-disallowed-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Specify a list of disallowed at-rules.
* At-rules like this */
```

The [`message` secondary option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideconfigure.md#message) can accept the arguments of this rule.
The [`message` secondary option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/configure.md#message) can accept the arguments of this rule.

## Options

Expand Down
2 changes: 1 addition & 1 deletion docs/description/at-rule-empty-line-before.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This rule ignores:
- at-rules that are the very first node in the source
- `@import` in Less.

The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideoptions.md#fix) can automatically fix all of the problems reported by this rule. We recommend to enable [`indentation`](https://github.com/stylelint/stylelint/tree/15.10.2/librulesindentationREADME.md) rule for better autofixing results with this rule.
The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. We recommend to enable [`indentation`](https://github.com/stylelint/stylelint/tree/15.10.2/lib/rules/indentation/README.md) rule for better autofixing results with this rule.

## Options

Expand Down
4 changes: 2 additions & 2 deletions docs/description/at-rule-name-case.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# at-rule-name-case

> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docsmigration-guideto-15.md).
> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docs/migration-guide/to-15.md).
Specify lowercase or uppercase for at-rules names.

Expand All @@ -13,7 +13,7 @@ Specify lowercase or uppercase for at-rules names.

Only lowercase at-rule names are valid in SCSS.

The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideoptions.md#fix) can automatically fix some of the problems reported by this rule.
The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/options.md#fix) can automatically fix some of the problems reported by this rule.

## Options

Expand Down
2 changes: 1 addition & 1 deletion docs/description/at-rule-name-newline-after.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# at-rule-name-newline-after

> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docsmigration-guideto-15.md).
> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docs/migration-guide/to-15.md).
Require a newline after at-rule names.

Expand Down
4 changes: 2 additions & 2 deletions docs/description/at-rule-name-space-after.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# at-rule-name-space-after

> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docsmigration-guideto-15.md).
> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docs/migration-guide/to-15.md).
Require a single space after at-rule names.

Expand All @@ -11,7 +11,7 @@ Require a single space after at-rule names.
* The space after at-rule names */
```

The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideoptions.md#fix) can automatically fix all of the problems reported by this rule.
The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.

## Options

Expand Down
2 changes: 1 addition & 1 deletion docs/description/at-rule-no-unknown.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Disallow unknown at-rules.

This rule considers at-rules defined in the CSS Specifications, up to and including Editor's Drafts, to be known.

The [`message` secondary option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideconfigure.md#message) can accept the arguments of this rule.
The [`message` secondary option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/configure.md#message) can accept the arguments of this rule.

## Options

Expand Down
4 changes: 2 additions & 2 deletions docs/description/at-rule-no-vendor-prefix.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Disallow vendor prefixes for at-rules.

This rule ignores non-standard vendor-prefixed at-rules that aren't handled by [Autoprefixer](https://github.com/postcss/autoprefixer).

The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideoptions.md#fix) can automatically fix all of the problems reported by this rule. However, it will not remove duplicate at-rules produced when the prefixes are removed. You can use [Autoprefixer](https://github.com/postcss/autoprefixer) itself, with the [`add` option off and the `remove` option on](https://github.com/postcss/autoprefixer#options), in these situations.
The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. However, it will not remove duplicate at-rules produced when the prefixes are removed. You can use [Autoprefixer](https://github.com/postcss/autoprefixer) itself, with the [`add` option off and the `remove` option on](https://github.com/postcss/autoprefixer#options), in these situations.

The [`message` secondary option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideconfigure.md#message) can accept the arguments of this rule.
The [`message` secondary option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/configure.md#message) can accept the arguments of this rule.

## Options

Expand Down
2 changes: 1 addition & 1 deletion docs/description/at-rule-property-required-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Specify a list of required properties for an at-rule.
* At-rule and required property names */
```

The [`message` secondary option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideconfigure.md#message) can accept the arguments of this rule.
The [`message` secondary option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/configure.md#message) can accept the arguments of this rule.

## Options

Expand Down
4 changes: 2 additions & 2 deletions docs/description/at-rule-semicolon-newline-after.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# at-rule-semicolon-newline-after

> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docsmigration-guideto-15.md).
> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docs/migration-guide/to-15.md).
Require a newline after the semicolon of at-rules.

Expand All @@ -21,7 +21,7 @@ This rule allows an end-of-line comment followed by a newline. For example:
a {}
```

The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideoptions.md#fix) can automatically fix all of the problems reported by this rule.
The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.

## Options

Expand Down
2 changes: 1 addition & 1 deletion docs/description/at-rule-semicolon-space-before.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# at-rule-semicolon-space-before

> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docsmigration-guideto-15.md).
> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docs/migration-guide/to-15.md).
Require a single space or disallow whitespace before the semicolons of at-rules.

Expand Down
4 changes: 2 additions & 2 deletions docs/description/block-closing-brace-empty-line-before.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# block-closing-brace-empty-line-before

> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docsmigration-guideto-15.md).
> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docs/migration-guide/to-15.md).
Require or disallow an empty line before the closing brace of blocks.

Expand All @@ -14,7 +14,7 @@ a {
* This line */
```

The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideoptions.md#fix) can automatically fix all of the problems reported by this rule.
The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.

## Options

Expand Down
4 changes: 2 additions & 2 deletions docs/description/block-closing-brace-newline-after.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# block-closing-brace-newline-after

> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docsmigration-guideto-15.md).
> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docs/migration-guide/to-15.md).
Require a newline or disallow whitespace after the closing brace of blocks.

Expand Down Expand Up @@ -34,7 +34,7 @@ This rule allows a trailing semicolon after the closing brace of a block. For ex
}
```

The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideoptions.md#fix) can automatically fix all of the problems reported by this rule.
The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.

## Options

Expand Down
4 changes: 2 additions & 2 deletions docs/description/block-closing-brace-newline-before.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# block-closing-brace-newline-before

> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docsmigration-guideto-15.md).
> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docs/migration-guide/to-15.md).
Require a newline or disallow whitespace before the closing brace of blocks.

Expand All @@ -12,7 +12,7 @@ Require a newline or disallow whitespace before the closing brace of blocks.
* The newline before this brace */
```

The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideoptions.md#fix) can automatically fix all of the problems reported by this rule.
The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.

## Options

Expand Down
2 changes: 1 addition & 1 deletion docs/description/block-closing-brace-space-after.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# block-closing-brace-space-after

> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docsmigration-guideto-15.md).
> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docs/migration-guide/to-15.md).
Require a single space or disallow whitespace after the closing brace of blocks.

Expand Down
4 changes: 2 additions & 2 deletions docs/description/block-closing-brace-space-before.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# block-closing-brace-space-before

> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docsmigration-guideto-15.md).
> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docs/migration-guide/to-15.md).
Require a single space or disallow whitespace before the closing brace of blocks.

Expand All @@ -11,7 +11,7 @@ a { color: pink; }
* The space before this brace */
```

The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideoptions.md#fix) can automatically fix all of the problems reported by this rule.
The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.

## Options

Expand Down
4 changes: 2 additions & 2 deletions docs/description/block-opening-brace-newline-after.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# block-opening-brace-newline-after

> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docsmigration-guideto-15.md).
> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docs/migration-guide/to-15.md).
Require a newline after the opening brace of blocks.

Expand All @@ -21,7 +21,7 @@ a { /* end-of-line comment */
}
```

The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideoptions.md#fix) can automatically fix all of the problems reported by this rule.
The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.

## Options

Expand Down
4 changes: 2 additions & 2 deletions docs/description/block-opening-brace-newline-before.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# block-opening-brace-newline-before

> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docsmigration-guideto-15.md).
> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docs/migration-guide/to-15.md).
Require a newline or disallow whitespace before the opening brace of blocks.

Expand All @@ -12,7 +12,7 @@ Require a newline or disallow whitespace before the opening brace of blocks.
* The newline before this brace */
```

The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideoptions.md#fix) can automatically fix all of the problems reported by this rule.
The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.

## Options

Expand Down
4 changes: 2 additions & 2 deletions docs/description/block-opening-brace-space-after.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# block-opening-brace-space-after

> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docsmigration-guideto-15.md).
> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docs/migration-guide/to-15.md).
Require a single space or disallow whitespace after the opening brace of blocks.

Expand All @@ -11,7 +11,7 @@ Require a single space or disallow whitespace after the opening brace of blocks.
* The space after this brace */
```

The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideoptions.md#fix) can automatically fix all of the problems reported by this rule.
The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.

## Options

Expand Down
4 changes: 2 additions & 2 deletions docs/description/block-opening-brace-space-before.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# block-opening-brace-space-before

> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docsmigration-guideto-15.md).
> **Warning** This rule is deprecated and will be removed in the future. See [the migration guide](https://github.com/stylelint/stylelint/tree/15.10.2/docs/migration-guide/to-15.md).
Require a single space or disallow whitespace before the opening brace of blocks.

Expand All @@ -11,7 +11,7 @@ Require a single space or disallow whitespace before the opening brace of blocks
* The space before this brace */
```

The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideoptions.md#fix) can automatically fix all of the problems reported by this rule.
The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.

## Options

Expand Down
4 changes: 2 additions & 2 deletions docs/description/color-function-notation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Modern color-functions use a comma-free syntax because functions in CSS are used

For legacy reasons, `rgb()` and `hsl()` also supports an alternate syntax that separates all of its arguments with commas. Also for legacy reasons, the `rgba()` and `hsla()` functions exist using the same comma-based syntax.

The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideoptions.md#fix) can automatically fix some of the problems reported by this rule when the primary option is `"modern"`.
The [`fix` option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/options.md#fix) can automatically fix some of the problems reported by this rule when the primary option is `"modern"`.

The [`message` secondary option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideconfigure.md#message) can accept the arguments of this rule.
The [`message` secondary option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/configure.md#message) can accept the arguments of this rule.

## Options

Expand Down
2 changes: 1 addition & 1 deletion docs/description/color-hex-alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ a { color: #fffa }
* This alpha channel */
```

The [`message` secondary option](https://github.com/stylelint/stylelint/tree/15.10.2/docsuser-guideconfigure.md#message) can accept the arguments of this rule.
The [`message` secondary option](https://github.com/stylelint/stylelint/tree/15.10.2/docs/user-guide/configure.md#message) can accept the arguments of this rule.

## Options

Expand Down
Loading

0 comments on commit ac4b893

Please sign in to comment.