Skip to content

Commit e189a42

Browse files
Lint and format markdown files (#422)
1 parent e7ff6c9 commit e189a42

27 files changed

+172
-63
lines changed

.github/workflows/lint.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: 'Lint Markdown Files'
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
spellcheck:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: articulate/actions-markdownlint@v1
13+
with:
14+
config: .markdownlint.json
15+
files: 'content/**/*.md'
16+
ignore: node_modules

.markdownlint.json

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
2-
"MD013": { "line_length": 120, "tables": false, "code_blocks": false },
2+
"MD001": false,
3+
"MD013": {
4+
"line_length": 120,
5+
"tables": false,
6+
"code_blocks": false
7+
},
8+
"MD024": false,
39
"MD034": false,
4-
"MD040": false
10+
"MD040": false,
11+
"MD055": false
512
}

content/icerpc-for-ice-users/high-level-comparison/ice-reinvented.md

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Ice is a one-stop solution for building network applications. With Ice, you get
1414
components to help you build portable, multi-language networked applications.
1515

1616
Ice includes:
17+
1718
- an RPC framework
1819
- IDL and serialization format (Slice)
1920
- configuration (Ice properties)
@@ -26,6 +27,7 @@ Ice includes:
2627
On the other hand, IceRPC has a single focus: RPCs (the name gave it away!). When building an application with IceRPC,
2728
you use IceRPC for your RPCs, and you need to look outside IceRPC for other functionalities. For example, you could
2829
select:
30+
2931
- IceRPC for your RPCs
3032
- Slice or Protobuf to define your network APIs
3133
- YAML for configuration

content/icerpc-for-ice-users/high-level-comparison/using-icerpc-with-ice.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ using IceRPC, or use IceRPC to create new services for your Ice clients.
1313

1414
If you start from an existing Ice client or server, the first step is to convert your Slice definitions (in `.ice`
1515
files) to the new Slice syntax. The converted Slice files must specify `Slice1` mode:
16+
1617
```slice
1718
mode = Slice1 // required for interop with Ice
1819
...

content/icerpc-for-ice-users/slice/converting-ice-into-slice.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ class Person {
273273
With the .ice syntax, the return type of an operation can be split between a return type and out parameters, whereas
274274
with the .slice syntax, an operation has only "in" parameters but can return a tuple.
275275

276-
When converting .ice definitions into .slice definitions, keep in mind that Ice encodes out parameters _before_ the
276+
When converting .ice definitions into .slice definitions, keep in mind that Ice encodes out parameters *before* the
277277
return type.
278278

279279
{% aside alignment="top" %}

content/icerpc-for-ice-users/slice/ice-object.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ unnecessary (`uncheckedCast` works just as well), it's shown by all Ice demos an
7979
The net result is: if you reimplement an existing Ice server with IceRPC, your services need to implement `Ice::Object`
8080
when they are being "checked cast" by existing Ice client applications.
8181

82-
## Checked cast and unchecked cast in IceRPC for C#
82+
## Checked cast and unchecked cast in IceRPC for C\#
8383

8484
If you like `checkedCast` and want to keep check-casting your proxies, the IceRPC + Slice integration provides an
8585
equivalent API: [AsAsync]. The target service must implement `Ice::Object`; otherwise, `AsAsync` will fail with a

content/icerpc-for-ice-users/slice/new-slice.md

+24-17
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ applications.
1616

1717
With Ice, the version of the Ice encoding to use when sending a request is a runtime decision. You can reconfigure a
1818
proxy to use the version of your choice. For example:
19+
1920
```csharp {% title="Setting the Ice encoding version with Ice for C#" %}
2021
helloPrx = helloPrx.ice_encodingVersion(Ice.Util.Encoding_1_0);
2122
```
@@ -27,12 +28,14 @@ With the new Slice language, the encoding to use is decided at build-time, when
2728
define an interface, the encoding for operation arguments and return values is specified unambiguously with the
2829
[mode statement](/slice1/language-guide/compilation-mode), and gets hard-coded in the generated code.
2930

30-
#### Example
31+
### Example
3132

3233
```slice
3334
mode = Slice1
3435
```
36+
3537
or
38+
3639
```slice
3740
mode = Slice2
3841
```
@@ -46,19 +49,20 @@ A Slice file that doesn't specify a compilation mode uses the default mode: Slic
4649

4750
The compilation mode also determines which definitions are allowed in your Slice file.
4851

49-
#### Slice1
52+
### Slice1
5053

5154
This mode provides an equivalent syntax for all Slice definitions in the .ice syntax, including classes, exceptions,
5255
interfaces, and structs. The names are mostly the same: for example, a class in a `.ice` file corresponds to a
5356
class in a `.slice` file, and a struct in a `.ice` file corresponds to a compact struct in a `.slice` file.
5457

5558
You should use this mode when (and only when) you need to send or receive requests to and from Ice applications.
5659

57-
#### Slice2
60+
### Slice2
5861

5962
This is the default mode and the preferred mode when you don't need interop with Ice applications.
6063

6164
This mode allows you to mark any type as optional with the `?` suffix. For example:
65+
6266
```slice
6367
// Implicitly uses `mode = Slice2`
6468
@@ -69,25 +73,28 @@ interface Translator {
6973
```
7074

7175
Slice2 also provides:
72-
- stream parameters
73-
- unsigned integer types such as uint32
74-
- variable-size integer types such as varint64
75-
- underlying types for enums
76-
- structs that can be augmented while maintaining on-the-wire compatibility
7776

78-
However, Slice2 is not a superset of Slice1. The following constructs are only accepted in Slice1 mode:
79-
- classes, including AnyClass
80-
- exceptions
77+
- stream parameters
78+
- unsigned integer types such as uint32
79+
- variable-size integer types such as varint64
80+
- underlying types for enums
81+
- structs that can be augmented while maintaining on-the-wire compatibility
82+
83+
However, Slice2 is not a superset of Slice1. The following constructs are only accepted in Slice1 mode
84+
85+
- classes, including AnyClass
86+
- exceptions
8187

8288
## New constructs
8389

8490
The .slice syntax adds a few constructs that are available with both Slice1 and Slice2 but have no equivalent with the
8591
.ice syntax, namely:
86-
- anonymous sequences and dictionaries\
87-
You can now use `Sequence<string>` directly as a parameter or field type.
88-
- custom types\
89-
A custom type is a type that you encode and decode yourself in all language mappings.
90-
- typealias\
91-
A typealias is a new name for another type.
92+
93+
- anonymous sequences and dictionaries\
94+
You can now use `Sequence<string>` directly as a parameter or field type.
95+
- custom types\
96+
A custom type is a type that you encode and decode yourself in all language mappings.
97+
- typealias\
98+
A typealias is a new name for another type.
9299

93100
[convert]: converting-ice-into-slice

content/icerpc/dependency-injection/dispatch-pipeline-with-di.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ leaf dispatcher via services injected by a DI container.
112112

113113
Such a DI-friendly middleware needs to implement one of the following `IMiddleware` interfaces:
114114

115-
- [IMiddleware<TDep>](csharp:IceRpc.Extensions.DependencyInjection.IMiddleware-1)
116-
- [IMiddleware<TDep1, TDep2>](csharp:IceRpc.Extensions.DependencyInjection.IMiddleware-2)
117-
- [IMiddleware<TDep1, TDep2, TDep3>](csharp:IceRpc.Extensions.DependencyInjection.IMiddleware-3)
115+
- [`IMiddleware<TDep>`](csharp:IceRpc.Extensions.DependencyInjection.IMiddleware-1)
116+
- [`IMiddleware<TDep1, TDep2>`](csharp:IceRpc.Extensions.DependencyInjection.IMiddleware-2)
117+
- [`IMiddleware<TDep1, TDep2, TDep3>`](csharp:IceRpc.Extensions.DependencyInjection.IMiddleware-3)
118118

119119
For example, say we want to reimplement the deadline middleware in a more DI-friendly fashion. The standard deadline
120120
middleware reads the deadline field and creates a deadline feature to communicate this deadline to downstream middleware

content/icerpc/duplex-transport.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ See also [Security with TLS][security-with-tls] for additional information.
4141

4242
The C# duplex transport abstraction is composed of a number of interfaces that a custom transport needs to implement:
4343

44-
- [IDuplexClientTransport]: a factory to create outgoing connections
45-
- [IDuplexServerTransport]: a factory to create listeners
46-
- [IListener<IDuplexConnection>]: a factory to listen for and create incoming connections
47-
- [IDuplexConnection]: a connection to allow a client and server to communicate
44+
- [`IDuplexClientTransport`]: a factory to create outgoing connections
45+
- [`IDuplexServerTransport`]: a factory to create listeners
46+
- [`IListener<IDuplexConnection>`]: a factory to listen for and create incoming connections
47+
- [`IDuplexConnection`]: a connection to allow a client and server to communicate
4848

4949
The API documentation of these interfaces specifies the contract a custom transport needs to comply with.
5050

@@ -60,10 +60,10 @@ To use a custom transport, the application needs to provide an instance of `IDup
6060
[flow-control]: https://en.wikipedia.org/wiki/Flow_control_(data)
6161
[ice-protocol]: protocols-and-transports/ice-duplex-transports
6262

63-
[IDuplexClientTransport]: csharp:IceRpc.Transports.IDuplexClientTransport
64-
[IDuplexServerTransport]: csharp:IceRpc.Transports.IDuplexServerTransport
65-
[IListener<IDuplexConnection>]: csharp:IceRpc.Transports.IListener-1
66-
[IDuplexConnection]: csharp:IceRpc.Transports.IDuplexConnection
63+
[`IDuplexClientTransport`]: csharp:IceRpc.Transports.IDuplexClientTransport
64+
[`IDuplexServerTransport`]: csharp:IceRpc.Transports.IDuplexServerTransport
65+
[`IListener<IDuplexConnection>`]: csharp:IceRpc.Transports.IListener-1
66+
[`IDuplexConnection`]: csharp:IceRpc.Transports.IDuplexConnection
6767
[Server]: csharp:IceRpc.Server
6868
[ConnectionCache]: csharp:IceRpc.ConnectionCache
6969
[ClientConnection]: csharp:IceRpc.ClientConnection

content/icerpc/ice-protocol/protocol-frames.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,4 +216,4 @@ set to 1.1.
216216
[protocol-and-encoding]: https://doc.zeroc.com/ice/3.7/ice-protocol-and-encoding
217217
[Slice]: /slice1
218218
[status-code]: ../invocation/incoming-response#status-code
219-
[request-fields]: ../invocation/outgoing-request#request-fields
219+
[request-fields]: ../invocation/outgoing-request#request-field

content/icerpc/invocation/outgoing-request.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ In order to make an RPC, you construct an outgoing request and then pass this re
99
method of an [invoker](invocation-pipeline#the-invoker-abstraction).
1010

1111
An outgoing request carries all the information an invoker needs to send a request:
12+
1213
- the [service address](service-address) of the target service
1314
- the name of the operation to call on this service
1415
- request [fields](#request-fields)

content/icerpc/multiplexed-transport.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ See also [Security with TLS][security-with-tls] for additional information.
4242
The C# multiplexed transport abstraction consists of a number of interfaces that a custom transport needs to
4343
implement:
4444

45-
- [IMultiplexedClientTransport]: a factory to create outgoing connections
46-
- [IMultiplexedServerTransport]: a factory to create listeners
47-
- [IListener<IMultiplexedConnection>]: a factory to listen for and create incoming connections
48-
- [IMultiplexedConnection]: a connection to accept and create streams
49-
- [IMultiplexedStream]: a stream to allow a client and server to communicate
45+
- [`IMultiplexedClientTransport`]: a factory to create outgoing connections
46+
- [`IMultiplexedServerTransport`]: a factory to create listeners
47+
- [`IListener<IMultiplexedConnection>`]: a factory to listen for and create incoming connections
48+
- [`IMultiplexedConnection`]: a connection to accept and create streams
49+
- [`IMultiplexedStream`]: a stream to allow a client and server to communicate
5050

5151
The API documentation of these interfaces specifies the contract a custom transport needs to comply with.
5252

@@ -62,11 +62,11 @@ To use a custom transport, the application needs to provide an instance of `IMul
6262
[full-duplex]: https://en.wikipedia.org/wiki/Duplex_(telecommunications)#Full_duplex
6363
[flow-control]: https://en.wikipedia.org/wiki/Flow_control_(data)
6464

65-
[IMultiplexedClientTransport]: csharp:IceRpc.Transports.IMultiplexedClientTransport
66-
[IMultiplexedServerTransport]: csharp:IceRpc.Transports.IMultiplexedServerTransport
67-
[IListener<IMultiplexedConnection>]: csharp:IceRpc.Transports.IListener-1
68-
[IMultiplexedConnection]: csharp:IceRpc.Transports.IMultiplexedConnection
69-
[IMultiplexedStream]: csharp:IceRpc.Transports.IMultiplexedStream
65+
[`IMultiplexedClientTransport`]: csharp:IceRpc.Transports.IMultiplexedClientTransport
66+
[`IMultiplexedServerTransport`]: csharp:IceRpc.Transports.IMultiplexedServerTransport
67+
[`IListener<IMultiplexedConnection>`]: csharp:IceRpc.Transports.IListener-1
68+
[`IMultiplexedConnection`]: csharp:IceRpc.Transports.IMultiplexedConnection
69+
[`IMultiplexedStream`]: csharp:IceRpc.Transports.IMultiplexedStream
7070
[Server]: csharp:IceRpc.Server
7171
[ConnectionCache]: csharp:IceRpc.ConnectionCache
7272
[ClientConnection]: csharp:IceRpc.ClientConnection

content/icerpc/slic-transport/protocol-frames.md

+2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ Frames and types from this page are defined using [Slice].
1212

1313
All the frames have a header and a body. The header layout is common to all Slic versions and is composed of the
1414
following fields:
15+
1516
- a frame type defined as an `uint8` enumeration
1617
- a frame size defined as a `varuint62` representing the size of the frame body.
1718

1819
The frame type is defined as follows:
20+
1921
```slice
2022
enum FrameType : uint8 {
2123
Initialize = 1

content/icerpc/slic-transport/streams.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ Reducing the maximum stream frame size reduces this delay. It's in particular us
7878
A stream has two separate state machines: one for its write-side and one for its read-side.
7979

8080
The state machines also depend on the type of the stream. The type of a stream is defined as follows:
81+
8182
- a local stream is a stream created by the application
8283
- a remote stream is a stream accepted by the application
8384

@@ -183,5 +184,4 @@ peer that its done reading.
183184
[StreamLast]: protocol-frames#stream-and-streamlast-frames
184185
[StreamReadsClosed]: protocol-frames#streamreadsclosed-and-streamwritesclosed-frames
185186
[StreamWritesClosed]: protocol-frames#streamreadsclosed-and-streamwritesclosed-frames
186-
[StreamWindowUpdate]: protocol-frames#streamwindowupdate-frame
187187
[stream-concurrency]: flow-control#stream-concurrency

content/slice/encoding/constructed-types.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,21 @@ compact enum StringInt32Result {
4545
{% /slice2 %}
4646

4747
{% slice1 %}
48+
4849
## Sequence
4950

5051
A sequence of N elements of type T is encoded as a [variable-length size][slice1-var-size] N followed by each element
5152
encoded in order.
5253

53-
#### Example: empty sequence
54+
### Example: empty sequence
5455

5556
An empty sequence is encoded as:
5657

5758
```
5859
0x00: size 0
5960
```
6061

61-
#### Example: sequence of int32
62+
### Example: sequence of int32
6263

6364
A sequence of `int32` with values 5, 32 and 9 is encoded as:
6465

@@ -68,23 +69,25 @@ A sequence of `int32` with values 5, 32 and 9 is encoded as:
6869
0x20 0x00 0x00 0x00: 32 over 4 bytes in little-endian order
6970
0x09 0x00 0x00 0x00: 9 over 4 bytes in little-endian order
7071
```
72+
7173
{% /slice1 %}
7274

7375
{% slice2 %}
76+
7477
## Sequence with a non-optional element type
7578

7679
A sequence of N elements with a non-optional element type T is encoded as a `varuint62`-encoded N followed by each
7780
element encoded in order.
7881

79-
#### Example: empty sequence
82+
### Example: empty sequence
8083

8184
An empty sequence is encoded as:
8285

8386
```
8487
0x00: size 0
8588
```
8689

87-
#### Example: sequence of int32
90+
### Example: sequence of int32
8891

8992
A sequence of `int32` with values 5, 32 and 9 is encoded as:
9093

@@ -100,7 +103,7 @@ A sequence of `int32` with values 5, 32 and 9 is encoded as:
100103
A sequence of N elements with a optional element type T? is encoded as a varuint62-encoded N followed by a
101104
[bit sequence][bit-sequence] with N bits, followed by each element with a value encoded in order.
102105

103-
#### Example: sequence of int32?
106+
### Example: sequence of int32?
104107

105108
A sequence of `int32?` with values 5, no-value, 9 and no-value is encoded as:
106109

content/slice/encoding/operation.md

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Unlike the encoding of tagged fields in classes, the encoding of tagged argument
2020
{% /slice1 %}
2121

2222
{% slice2 %}
23+
2324
## Non-stream encoding
2425

2526
The arguments of an operation are encoded as a [segment]. The body of this segment corresponds to a virtual [struct]

content/slice/encoding/primitive-types.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ description: Learn how primitive types are encoded with Slice.
44
---
55

66
{% slice1 %}
7+
78
## AnyClass
89

910
`AnyClass` is an abstract type. When you encode or decode a parameter or field with type `AnyClass`, you are encoding
@@ -15,6 +16,7 @@ or decoding a concrete class instance using the [class encoding/decoding rules](
1516
A `bool` is encoded on a single byte, where 0 means `false` and 1 means `true`. Other values are invalid.
1617

1718
{% slice2 %}
19+
1820
## Fixed-size integral types
1921

2022
| Type | Encoded on N bytes |

0 commit comments

Comments
 (0)