Skip to content

Commit d5f6b59

Browse files
Adam Gabryśracodond
authored andcommitted
Add to the word-break property support of the break-word value (CSS3)
1 parent dd89446 commit d5f6b59

File tree

15 files changed

+22
-16
lines changed

15 files changed

+22
-16
lines changed

css-checks/src/test/resources/checks/common/properties/css/word-break.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
word-break: normal;
44
word-break: keep-all;
55
word-break: break-all;
6-
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all}! */
6+
word-break: break-word;
7+
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all | break-word}! */
78
word-break: 10; /* Noncompliant */
89
}

css-checks/src/test/resources/checks/common/properties/less/word-break.less

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
word-break: normal;
44
word-break: keep-all;
55
word-break: break-all;
6-
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all}! */
6+
word-break: break-word;
7+
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all | break-word}! */
78
word-break: 10; /* Noncompliant */
89
}

css-checks/src/test/resources/checks/common/properties/scss/word-break.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
word-break: normal;
44
word-break: keep-all;
55
word-break: break-all;
6-
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all}! */
6+
word-break: break-word;
7+
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all | break-word}! */
78
word-break: 10; /* Noncompliant */
89
}

css-frontend/src/main/java/org/sonar/css/model/property/standard/WordBreak.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
public class WordBreak extends StandardProperty {
2626

2727
public WordBreak() {
28-
addLinks("https://drafts.csswg.org/css-text-3/#propdef-word-break");
29-
addValidators(new IdentifierValidator("normal", "keep-all", "break-all"));
28+
addLinks("https://www.w3.org/TR/css-text-3/#word-break-property");
29+
addValidators(new IdentifierValidator("normal", "keep-all", "break-all", "break-word"));
3030
}
3131

3232
}

its/ruling/projects/custom/common/properties/css/word-break.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
word-break: normal;
44
word-break: keep-all;
55
word-break: break-all;
6-
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all}! */
6+
word-break: break-word;
7+
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all | break-word}! */
78
word-break: 10; /* Noncompliant */
89
}

its/ruling/projects/custom/common/properties/less/word-break.less

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
word-break: normal;
44
word-break: keep-all;
55
word-break: break-all;
6-
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all}! */
6+
word-break: break-word;
7+
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all | break-word}! */
78
word-break: 10; /* Noncompliant */
89
}

its/ruling/projects/custom/common/properties/scss/word-break.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
word-break: normal;
44
word-break: keep-all;
55
word-break: break-all;
6-
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all}! */
6+
word-break: break-word;
7+
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all | break-word}! */
78
word-break: 10; /* Noncompliant */
89
}

its/ruling/tests/src/test/expected/css-line-length.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,7 @@
10911091
9,
10921092
],
10931093
'project:custom/common/properties/css/word-break.css':[
1094-
6,
1094+
7,
10951095
],
10961096
'project:custom/common/properties/css/word-spacing.css':[
10971097
8,

its/ruling/tests/src/test/expected/css-validate-property-value.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1659,8 +1659,8 @@
16591659
10,
16601660
],
16611661
'project:custom/common/properties/css/word-break.css':[
1662-
6,
16631662
7,
1663+
8,
16641664
],
16651665
'project:custom/common/properties/css/word-spacing.css':[
16661666
8,

its/ruling/tests/src/test/expected/less-line-length.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@
991991
9,
992992
],
993993
'project:custom/common/properties/less/word-break.less':[
994-
6,
994+
7,
995995
],
996996
'project:custom/common/properties/less/word-spacing.less':[
997997
8,

its/ruling/tests/src/test/expected/less-prefer-single-line-comments.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1917,8 +1917,8 @@
19171917
10,
19181918
],
19191919
'project:custom/common/properties/less/word-break.less':[
1920-
6,
19211920
7,
1921+
8,
19221922
],
19231923
'project:custom/common/properties/less/word-spacing.less':[
19241924
8,

its/ruling/tests/src/test/expected/less-validate-property-value.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1652,8 +1652,8 @@
16521652
10,
16531653
],
16541654
'project:custom/common/properties/less/word-break.less':[
1655-
6,
16561655
7,
1656+
8,
16571657
],
16581658
'project:custom/common/properties/less/word-spacing.less':[
16591659
8,

its/ruling/tests/src/test/expected/scss-line-length.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@
10091009
9,
10101010
],
10111011
'project:custom/common/properties/scss/word-break.scss':[
1012-
6,
1012+
7,
10131013
],
10141014
'project:custom/common/properties/scss/word-spacing.scss':[
10151015
8,

its/ruling/tests/src/test/expected/scss-prefer-single-line-comments.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1934,8 +1934,8 @@
19341934
10,
19351935
],
19361936
'project:custom/common/properties/scss/word-break.scss':[
1937-
6,
19381937
7,
1938+
8,
19391939
],
19401940
'project:custom/common/properties/scss/word-spacing.scss':[
19411941
8,

its/ruling/tests/src/test/expected/scss-validate-property-value.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1611,8 +1611,8 @@
16111611
10,
16121612
],
16131613
'project:custom/common/properties/scss/word-break.scss':[
1614-
6,
16151614
7,
1615+
8,
16161616
],
16171617
'project:custom/common/properties/scss/word-spacing.scss':[
16181618
8,

0 commit comments

Comments
 (0)