Adjust literals in styling guide to SC Design System (#947)

This commit is contained in:
hendrik-buchwald-sonarsource 2022-04-12 10:57:59 +02:00 committed by GitHub
parent 129b307b48
commit 4d44fc3fac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,8 @@
This document provides styling guidelines for `+rule.adoc+` and its dependencies. This document provides styling guidelines for `+rule.adoc+` and its dependencies.
See also the <<description.adoc#,Description Guidelines>> for information about the rule structure.
The RSPEC styling guide is loosely based on the Associated Press Style and geared to rule descriptions. The RSPEC styling guide is loosely based on the Associated Press Style and geared to rule descriptions.
The official Associated Press Style should be used as a fall-back for topics not defined here. The official Associated Press Style should be used as a fall-back for topics not defined here.
@ -99,10 +101,11 @@ Check the values:
* size, * size,
* length. * length.
== Code == Literals
Only use inline literals (backtick) for direct code references, for instance, variable names or values. Inline literals should not be used for anything else. Inline literals (backticks) should be used to highlight short values.
Use it when referencing variable names, file names, tokens, and all kinds of specific strings of text that should be visually extracted from the surrounding default text.
Write:: Compiling source file "src/generic_file.py" breaks an `assert` call in pytest framework. Write:: Compiling source file `src/generic_file.py` breaks an `assert` call in pytest framework.
Avoid:: Compiling source file `src/generic_file.py` breaks an `assert` call in `pytest` framework. Avoid:: Compiling source file "src/generic_file.py" breaks an `assert` call in `pytest` framework.