Skip to content

Commit a5c2c8e

Browse files
committed
Correction of various typos in rules documentations
1 parent edc65cb commit a5c2c8e

File tree

40 files changed

+91
-89
lines changed

40 files changed

+91
-89
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Changed
1313

14+
- Correction of various typos in rules documentations
15+
1416
### Deleted
1517

1618
## [2.2.2] - 2025-03-13

RULES.md

+11-11
Large diffs are not rendered by default.

src/main/rules/GCI11/GCI11.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"title": "Disallow multiple access of same DOM element.",
2+
"title": "Multiple access of same DOM element should be limited",
33
"type": "CODE_SMELL",
44
"code": {
55
"impacts": {
6-
"MAINTAINABILITY": "MEDIUM"
6+
"RELIABILITY": "MEDIUM"
77
},
88
"attribute": "EFFICIENT"
99
},

src/main/rules/GCI11/javascript/GCI11.asciidoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Here's an example in JavaScript to illustrate this rule:
1515
[source,js,data-diff-id="2",data-diff-type="noncompliant"]
1616
----
1717
const width = document.getElementById('block').clientWidth;
18-
const height = document.getElementById('block').clientHeight; // Non-compliant
18+
const height = document.getElementById('block').clientHeight; // Noncompliant
1919
----
2020

2121
[source,js,data-diff-id="1",data-diff-type="noncompliant"]
@@ -32,5 +32,5 @@ In the second example, the DOM element reference is cached in the `blockElement`
3232

3333
=== Documentation
3434

35-
- https://github.com/cnumr/best-practices/blob/main/chapters/BP_054_en.md[CNUMR best practices] - Reduce DOM access via JavaScript
35+
- https://github.com/cnumr/best-practices/blob/main/chapters/BP_054_en.md[CnumR best practices] - Reduce DOM access via JavaScript
3636
- https://developer.mozilla.org/en-US/docs/Learn/Performance/JavaScript#tips_for_writing_more_efficient_code[Mozilla Web Technology for Developers] - Tips for writing more efficient code

src/main/rules/GCI12/GCI12.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"title": "Disallow multiple style changes at once.",
2+
"title": "Multiple style changes should be batched",
33
"type": "CODE_SMELL",
44
"code": {
55
"impacts": {
6-
"MAINTAINABILITY": "MEDIUM"
6+
"RELIABILITY": "MEDIUM"
77
},
88
"attribute": "EFFICIENT"
99
},

src/main/rules/GCI12/javascript/GCI12.asciidoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Here's an example in JavaScript and CSS to illustrate this rule:
1616
----
1717
<script>
1818
element.style.height = "800px";
19-
element.style.width = "600px"; // Non-compliant
20-
element.style.color = "red"; // Non-compliant
19+
element.style.width = "600px"; // Noncompliant
20+
element.style.color = "red"; // Noncompliant
2121
</script>
2222
----
2323

@@ -42,4 +42,4 @@ In the first example, multiple CSS properties are set in a single batch, while i
4242

4343
=== Documentation
4444

45-
- https://github.com/cnumr/best-practices/blob/main/chapters/BP_045_en.md[CNUMR best practices] - Modify several CSS properties at once
45+
- https://github.com/cnumr/best-practices/blob/main/chapters/BP_045_en.md[CnumR best practices] - Modify several CSS properties at once

src/main/rules/GCI13/GCI13.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"title": "Prefer API collections with pagination.",
2+
"title": "API collections should be preferred with pagination",
33
"type": "CODE_SMELL",
44
"code": {
55
"impacts": {
6-
"MAINTAINABILITY": "MEDIUM"
6+
"RELIABILITY": "MEDIUM"
77
},
88
"attribute": "EFFICIENT"
99
},

src/main/rules/GCI13/javascript/GCI13.asciidoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This rule is built for the https://nestjs.com[NestJS framework] but can work wit
1616
@Controller()
1717
class Test {
1818
@Get()
19-
public find(): Promise<string[]> {} // Non-compliant
19+
public find(): Promise<string[]> {} // Noncompliant
2020
}
2121
----
2222

@@ -39,7 +39,7 @@ class Test {
3939

4040
=== Documentation
4141

42-
- https://github.com/cnumr/best-practices/blob/main/chapters/BP_076_en.md[CNUMR best practices] - Avoid transferring large amounts of data for processing tasks
42+
- https://github.com/cnumr/best-practices/blob/main/chapters/BP_076_en.md[CnumR best practices] - Avoid transferring large amounts of data for processing tasks
4343
- https://github.com/ppetzold/nestjs-paginate[nestjs-paginate] - Pagination and filtering helper method using Nest.js framework
4444

4545
=== Articles & blog posts

src/main/rules/GCI203/python/GCI203.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ If possible, the utilisation of svg image format (or `<svg/>` html tag) is recom
22

33
Because SVGs are generally smaller than other image format, they’re less taxing on your server despite needing to render on load.
44

5-
When to use SVG :
5+
When to use SVG:
66

77
- Your image is used for decorative website graphics, logos, icons, graphs and diagrams, and other simple images.
88
- You image require animation.

src/main/rules/GCI24/GCI24.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"title": "Limit the number of returns for a SQL query",
2+
"title": "Returned SQL results should be limited",
33
"type": "CODE_SMELL",
44
"code": {
55
"impacts": {
6-
"MAINTAINABILITY": "MEDIUM"
6+
"RELIABILITY": "MEDIUM"
77
},
88
"attribute": "EFFICIENT"
99
},

src/main/rules/GCI24/java/GCI24.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you store data about customers, you certainly don’t need to retrieve inform
1212

1313
[source,java,data-diff-id="1",data-diff-type="noncompliant"]
1414
----
15-
String query = "SELECT * FROM customers"; // Non-compliant
15+
String query = "SELECT * FROM customers"; // Noncompliant
1616
----
1717

1818
It may therefore be a good idea to limit the results and use pagination, for example.

src/main/rules/GCI24/javascript/GCI24.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you store data about customers, you certainly don’t need to retrieve inform
1212

1313
[source,js,data-diff-id="1",data-diff-type="noncompliant"]
1414
----
15-
const query = "SELECT * FROM customers"; // Non-compliant
15+
const query = "SELECT * FROM customers"; // Noncompliant
1616
----
1717

1818
It may therefore be a good idea to limit the results and use pagination, for example.

src/main/rules/GCI25/GCI25.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"title": "Do not use an image with empty source attribute",
2+
"title": "Images should not have an empty source attribute",
33
"type": "CODE_SMELL",
44
"code": {
55
"impacts": {
6-
"MAINTAINABILITY": "LOW"
6+
"RELIABILITY": "LOW"
77
},
88
"attribute": "EFFICIENT"
99
},

src/main/rules/GCI25/javascript/GCI25.asciidoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ A missing src attribute can result in confusion and hinder accessibility.
1313
----
1414
return (
1515
<>
16-
<img src="" /> // Non-compliant
17-
<img /> // Non-compliant
16+
<img src="" /> // Noncompliant
17+
<img /> // Noncompliant
1818
</>
1919
)
2020
----
@@ -32,7 +32,7 @@ return (
3232
)
3333
----
3434

35-
This rule is build for https://react.dev/[React] and JSX.
35+
This rule is built for https://react.dev/[React] and JSX.
3636

3737
== Resources
3838

src/main/rules/GCI26/GCI26.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"title": "Prefer shorthand CSS notations to reduce stylesheets size",
2+
"title": "Shorthand CSS notations should be used to reduce stylesheets size",
33
"type": "CODE_SMELL",
44
"code": {
55
"impacts": {
6-
"MAINTAINABILITY": "LOW"
6+
"RELIABILITY": "LOW"
77
},
88
"attribute": "EFFICIENT"
99
},

src/main/rules/GCI26/javascript/GCI26.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ This optimization works for a number of properties https://developer.mozilla.org
3737

3838
=== Documentation
3939

40-
- https://github.com/cnumr/best-practices/blob/fc5a1f865bafb196e4775cce8835393751d40ed8/chapters/BP_026_en.md[CNUMR best practices] - Use abbreviated CSS notations
40+
- https://github.com/cnumr/best-practices/blob/fc5a1f865bafb196e4775cce8835393751d40ed8/chapters/BP_026_en.md[CnumR best practices] - Use abbreviated CSS notations
4141
- https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties[Mozilla Web Technology for Developers] - Shorthand properties
4242

4343
=== Articles & blog posts

src/main/rules/GCI28/java/GCI28.asciidoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ public void readPreferences(String filename) {
88
//...
99
InputStream in = null;
1010
try {
11-
in = new FileInputStream(filename);
11+
in = new FileInputStream(filename);
1212
} catch (FileNotFoundException e) {
13-
logger.log(e);
13+
logger.log(e);
1414
}
1515
in.read(...);
1616
//...

src/main/rules/GCI29/GCI29.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"title": "Avoid usage of CSS animations",
2+
"title": "CSS animations should be avoided",
33
"type": "CODE_SMELL",
44
"code": {
55
"impacts": {
6-
"MAINTAINABILITY": "MEDIUM"
6+
"RELIABILITY": "MEDIUM"
77
},
88
"attribute": "EFFICIENT"
99
},

src/main/rules/GCI29/javascript/GCI29.asciidoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Limiting the usage of CSS animations helps in creating a more energy-efficient a
1010

1111
[source,typescriptjsx,data-diff-id="1",data-diff-type="noncompliant"]
1212
----
13-
<div style={{ border: "1px solid black", transition: "border 2s ease" }}/> // Non-compliant
13+
<div style={{ border: "1px solid black", transition: "border 2s ease" }}/> // Noncompliant
1414
----
1515

1616
[source,typescriptjsx,data-diff-id="1",data-diff-type="compliant"]
@@ -19,14 +19,14 @@ Limiting the usage of CSS animations helps in creating a more energy-efficient a
1919
----
2020

2121
It's important to note that while limiting animations is generally advisable for certain scenarios, there are cases where animations contribute positively to the user experience and overall design.
22-
In this case they should be limited to the CSS properties `opacity` and `transform` with it's associated functions : `translate`, `rotate` and `scale`.
22+
In this case they should be limited to the CSS properties `opacity` and `transform` with it's associated functions: `translate`, `rotate` and `scale`.
2323
You can also inform the navigator of upcoming changes with the `will-change` instruction for more optimization.
2424

2525
== Resources
2626

2727
=== Documentation
2828

29-
- https://github.com/cnumr/best-practices/blob/main/chapters/BP_039_en.md[CNUMR best practices] - Avoid JavaScript / CSS animations
29+
- https://github.com/cnumr/best-practices/blob/main/chapters/BP_039_en.md[CnumR best practices] - Avoid JavaScript / CSS animations
3030

3131
=== Articles & blog posts
3232

src/main/rules/GCI30/GCI30.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"title": "Provide a print stylesheet",
2+
"title": "Print stylesheet should be provided",
33
"type": "CODE_SMELL",
44
"code": {
55
"impacts": {
6-
"MAINTAINABILITY": "LOW"
6+
"RELIABILITY": "LOW"
77
},
88
"attribute": "EFFICIENT"
99
},

src/main/rules/GCI30/javascript/GCI30.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Adjust font sizes, hide unnecessary elements, or make any other modifications su
4747

4848
=== Documentation
4949

50-
- https://github.com/cnumr/best-practices/blob/main/chapters/BP_027_en.md[CNUMR best practices] - Provide a print CSS
50+
- https://github.com/cnumr/best-practices/blob/main/chapters/BP_027_en.md[CnumR best practices] - Provide a print CSS
5151

5252
=== Articles & blog posts
5353

src/main/rules/GCI31/GCI31.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"title": "Prefer lighter formats for image files",
2+
"title": "Lighter formats should be used for image files",
33
"type": "CODE_SMELL",
44
"code": {
55
"impacts": {
6-
"MAINTAINABILITY": "LOW"
6+
"RELIABILITY": "LOW"
77
},
88
"attribute": "EFFICIENT"
99
},

src/main/rules/GCI31/javascript/GCI31.asciidoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Files are lightweight and can be scaled without loss of quality.
1515

1616
[source,html,data-diff-id="1",data-diff-type="noncompliant"]
1717
----
18-
<img src="./assets/images/cat.jpg" alt="Unoptimized image of a cat"/> // Non-compliant
18+
<img src="./assets/images/cat.jpg" alt="Unoptimized image of a cat"/> // Noncompliant
1919
----
2020

2121
[source,html,data-diff-id="1",data-diff-type="compliant"]
@@ -34,7 +34,7 @@ To address this issue, you can supply multiple formats for the same image.
3434

3535
=== Documentation
3636

37-
- https://github.com/cnumr/best-practices/blob/main/chapters/BP_080_en.md[CNUMR best practices] - Optimize images
37+
- https://github.com/cnumr/best-practices/blob/main/chapters/BP_080_en.md[CnumR best practices] - Optimize images
3838

3939
=== Articles & blog posts
4040

src/main/rules/GCI36/GCI36.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"title": "Avoid autoplay for videos and audio content",
2+
"title": "Autoplay should be avoided for video and audio content",
33
"type": "CODE_SMELL",
44
"code": {
55
"impacts": {
6-
"MAINTAINABILITY": "MEDIUM"
6+
"RELIABILITY": "MEDIUM"
77
},
88
"attribute": "EFFICIENT"
99
},

src/main/rules/GCI36/html/GCI36.asciidoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Video:
1515

1616
[source,html,data-diff-id="1",data-diff-type="noncompliant"]
1717
----
18-
<video src="videofile.webm" autoplay></video> // Non-compliant
18+
<video src="videofile.webm" autoplay></video> // Noncompliant
1919
----
2020

2121
[source,html,data-diff-id="1",data-diff-type="compliant"]
@@ -27,7 +27,7 @@ Audio:
2727

2828
[source,html,data-diff-id="1",data-diff-type="noncompliant"]
2929
----
30-
<audio controls src="audiofile.mp3" autoplay></audio> // Non-compliant
30+
<audio controls src="audiofile.mp3" autoplay></audio> // Noncompliant
3131
----
3232

3333
[source,html,data-diff-id="1",data-diff-type="compliant"]
@@ -39,7 +39,7 @@ Audio:
3939

4040
=== Documentation
4141

42-
- https://github.com/cnumr/best-practices/blob/main/chapters/BP_4003_en.md[CNUMR best practices] - Avoid autoplay for videos and audio content
42+
- https://github.com/cnumr/best-practices/blob/main/chapters/BP_4003_en.md[CnumR best practices] - Avoid autoplay for videos and audio content
4343

4444
=== Articles & blog posts
4545

src/main/rules/GCI36/javascript/GCI36.asciidoc

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ Video:
1717
----
1818
return (
1919
<>
20-
<video src="video.mp4" autoplay/> // Non-compliant
21-
<video src="video.mp4" preload="auto"/> // Non-compliant
22-
<video src="video.mp4" autoplay preload="auto"/> // Non-compliant
20+
<video src="video.mp4" autoplay/> // Noncompliant
21+
<video src="video.mp4" preload="auto"/> // Noncompliant
22+
<video src="video.mp4" autoplay preload="auto"/> // Noncompliant
2323
</>
2424
)
2525
----
@@ -36,7 +36,7 @@ Audio:
3636
[source,typescriptjsx,data-diff-id="2",data-diff-type="noncompliant"]
3737
----
3838
return (
39-
<audio controls src="audiofile.mp3" autoplay></audio> // Non-compliant
39+
<audio controls src="audiofile.mp3" autoplay></audio> // Noncompliant
4040
)
4141
----
4242

@@ -51,7 +51,7 @@ return (
5151

5252
=== Documentation
5353

54-
- https://github.com/cnumr/best-practices/blob/main/chapters/BP_4003_en.md[CNUMR best practices] - Avoid autoplay for videos and audio content
54+
- https://github.com/cnumr/best-practices/blob/main/chapters/BP_4003_en.md[CnumR best practices] - Avoid autoplay for videos and audio content
5555

5656
=== Articles & blog posts
5757

src/main/rules/GCI505/javascript/GCI505.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default function KeepAwakeExample() {
2020

2121
```js
2222
_activate = () => {
23-
activateKeepAwake(); // Non-compliant
23+
activateKeepAwake(); // Noncompliant
2424
alert('Activated!');
2525
};
2626
```

src/main/rules/GCI523/javascript/GCI523.asciidoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ help minimize the strain on the device's CPU.
1515

1616
[source,js]
1717
----
18-
var options = { enableHighAccuracy: true, timeout: 5000, maximumAge: 0 }; // Non-compliant
18+
var options = { enableHighAccuracy: true, timeout: 5000, maximumAge: 0 }; // Noncompliant
1919
navigator.geolocation.getCurrentPosition(
2020
(pos) => console.log(pos),
2121
(err) => console.warn(err),
@@ -49,7 +49,7 @@ In this example, we ask the user to turn on high accuracy location mode which en
4949
----
5050
import * as Location from 'expo-location';
5151
52-
Location.enableNetworkProviderAsync(); // Non-compliant
52+
Location.enableNetworkProviderAsync(); // Noncompliant
5353
----
5454

5555
Prefer to ask the user to turn on lower-accuracy geolocation to conserve resources:

0 commit comments

Comments
 (0)