format: copy configs from phosphor-dbus-interfaces and reformat
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Id9959785a8f68e95409f643bd5ec4f76591bc885
diff --git a/.markdownlint.yaml b/.markdownlint.yaml
index b6f0e5a..f5cfbee 100644
--- a/.markdownlint.yaml
+++ b/.markdownlint.yaml
@@ -1 +1,5 @@
default: true
+MD024:
+ siblings_only: true
+MD013:
+ stern: true
diff --git a/.prettierrc.yaml b/.prettierrc.yaml
new file mode 100644
index 0000000..f07fbdd
--- /dev/null
+++ b/.prettierrc.yaml
@@ -0,0 +1,3 @@
+tabWidth: 2
+overrides:
+ - { "files": "*.yaml", "options": { "tabWidth": 4 } }
diff --git a/example/net/poettering/Calculator.errors.yaml b/example/net/poettering/Calculator.errors.yaml
index b2f6ee3..c691f7f 100644
--- a/example/net/poettering/Calculator.errors.yaml
+++ b/example/net/poettering/Calculator.errors.yaml
@@ -1,6 +1,6 @@
- name: DivisionByZero
description: >
- An attempt to divide by zero was attempted.
+ An attempt to divide by zero was attempted.
- name: PermissionDenied
description: >
- The user does not have enough privileges to perform the operation.
+ The user does not have enough privileges to perform the operation.
diff --git a/example/net/poettering/Calculator.interface.yaml b/example/net/poettering/Calculator.interface.yaml
index 967048d..543d559 100644
--- a/example/net/poettering/Calculator.interface.yaml
+++ b/example/net/poettering/Calculator.interface.yaml
@@ -1,88 +1,88 @@
description: >
- An example interface originally described as part of the announcement
- of new sd-bus interfaces at:
- http://0pointer.net/blog/the-new-sd-bus-api-of-systemd.html
+ An example interface originally described as part of the announcement
+ of new sd-bus interfaces at:
+ http://0pointer.net/blog/the-new-sd-bus-api-of-systemd.html
methods:
- - name: Multiply
- description: >
- Multiplies two integers 'x' and 'y' and returns the result.
- parameters:
- - name: x
- type: int64
- description: >
- The first integer to multiply.
- - name: y
- type: int64
- description: >
- The second integer to multiply.
- default: 1
- returns:
- - name: z
- type: int64
- description: >
- The result of (x*y).
- - name: Divide
- description: >
- Divides two integers 'x' and 'y' and returns the result.
- parameters:
- - name: x
- type: int64
- description: >
- The first integer to divide.
- - name: y
- type: int64
- description: >
- The second integer to divide.
- default: 1
- returns:
- - name: z
- type: int64
- description: >
- The result of (x/y).
- errors:
- - self.Error.DivisionByZero
- - name: Clear
- flags:
- - unprivileged
- - no_reply
- description: >
- Reset the LastResult property to zero.
+ - name: Multiply
+ description: >
+ Multiplies two integers 'x' and 'y' and returns the result.
+ parameters:
+ - name: x
+ type: int64
+ description: >
+ The first integer to multiply.
+ - name: y
+ type: int64
+ description: >
+ The second integer to multiply.
+ default: 1
+ returns:
+ - name: z
+ type: int64
+ description: >
+ The result of (x*y).
+ - name: Divide
+ description: >
+ Divides two integers 'x' and 'y' and returns the result.
+ parameters:
+ - name: x
+ type: int64
+ description: >
+ The first integer to divide.
+ - name: y
+ type: int64
+ description: >
+ The second integer to divide.
+ default: 1
+ returns:
+ - name: z
+ type: int64
+ description: >
+ The result of (x/y).
+ errors:
+ - self.Error.DivisionByZero
+ - name: Clear
+ flags:
+ - unprivileged
+ - no_reply
+ description: >
+ Reset the LastResult property to zero.
properties:
- - name: LastResult
- type: int64
- default: 0
- description: >
- The result of the most recent calculation.
- - name: Status
- type: enum[self.State]
- default: Success
- flags:
- - const
- description: >
- The current state of the Calculator.
- - name: Owner
- type: string
- description: >
- The name of the owner of the Calculator.
- errors:
- - self.Error.PermissionDenied
+ - name: LastResult
+ type: int64
+ default: 0
+ description: >
+ The result of the most recent calculation.
+ - name: Status
+ type: enum[self.State]
+ default: Success
+ flags:
+ - const
+ description: >
+ The current state of the Calculator.
+ - name: Owner
+ type: string
+ description: >
+ The name of the owner of the Calculator.
+ errors:
+ - self.Error.PermissionDenied
signals:
- - name: Cleared
- description: >
- Signal indicating the LastReset property has been set to zero by the
- 'Clear' method.
- properties:
- - type: int64
- description: >
- Value of LastReset prior to Clear.
+ - name: Cleared
+ description: >
+ Signal indicating the LastReset property has been set to zero by the
+ 'Clear' method.
+ properties:
+ - type: int64
+ description: >
+ Value of LastReset prior to Clear.
enumerations:
- - name: State
- description: >
- Identifies if the service has encountered an error or not.
- values:
- - name: Success
- description: >
- No error has been encountered.
- - name: Error
- description: >
- The service has encountered an error.
+ - name: State
+ description: >
+ Identifies if the service has encountered an error or not.
+ values:
+ - name: Success
+ description: >
+ No error has been encountered.
+ - name: Error
+ description: >
+ The service has encountered an error.
diff --git a/test/server/Test.interface.yaml b/test/server/Test.interface.yaml
index 4f79ebd..362183d 100644
--- a/test/server/Test.interface.yaml
+++ b/test/server/Test.interface.yaml
@@ -1,49 +1,49 @@
description: >
- A test interface
+ A test interface
properties:
- - name: SomeValue
- type: int64
- - name: ReadonlyValue
- type: int64
- flags:
- - readonly
- - emits_change
- - name: ConstValue
- type: int64
- flags:
- - const
- - name: Countable
- type: size
- - name: SignedCountable
- type: ssize
- - name: UnsignedInt32
- type: uint32
- - name: UnsignedInt64
- type: uint64
- - name: ObjectPath
- type: object_path
- - name: DoubleAsNAN
- type: double
- default: NaN
- - name: DoubleAsInf
- type: double
- default: Infinity
- - name: DoubleAsNegInf
- type: double
- default: -Infinity
- - name: DoubleAsEpsilon
- type: double
- default: Epsilon
+ - name: SomeValue
+ type: int64
+ - name: ReadonlyValue
+ type: int64
+ flags:
+ - readonly
+ - emits_change
+ - name: ConstValue
+ type: int64
+ flags:
+ - const
+ - name: Countable
+ type: size
+ - name: SignedCountable
+ type: ssize
+ - name: UnsignedInt32
+ type: uint32
+ - name: UnsignedInt64
+ type: uint64
+ - name: ObjectPath
+ type: object_path
+ - name: DoubleAsNAN
+ type: double
+ default: NaN
+ - name: DoubleAsInf
+ type: double
+ default: Infinity
+ - name: DoubleAsNegInf
+ type: double
+ default: -Infinity
+ - name: DoubleAsEpsilon
+ type: double
+ default: Epsilon
- - name: VariantOfEnums
- type: variant[enum[self.EnumOne], string, enum[self.EnumTwo]]
+ - name: VariantOfEnums
+ type: variant[enum[self.EnumOne], string, enum[self.EnumTwo]]
enumerations:
- - name: EnumOne
- values:
- - name: OneA
- - name: OneB
- - name: EnumTwo
- values:
- - name: TwoA
- - name: TwoB
+ - name: EnumOne
+ values:
+ - name: OneA
+ - name: OneB
+ - name: EnumTwo
+ values:
+ - name: TwoA
+ - name: TwoB