Skip to content

Commit ab0cf7a

Browse files
ben-miruclaude
andauthored
feat: add custom Go linter with no-double-dash rule (#7)
## Summary - Add `tools/lint`, a Go-based MDX prose linter with a `no-double-dash` rule that flags `--` in prose (suggesting em dash replacement) - Scanner skips frontmatter, fenced code blocks, inline code, HTML comments, JSX tags, thematic breaks, table separators, and import/export lines - Integrate into `scripts/lint.sh` and CI workflow (`setup-go` step) - Fix 32 existing `--` occurrences across 18 MDX files with proper em dashes 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3d8fb78 commit ab0cf7a

27 files changed

Lines changed: 904 additions & 31 deletions

File tree

.github/workflows/lint.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ jobs:
1111
- name: Check out repository
1212
uses: actions/checkout@v5
1313

14+
- name: Set up Go
15+
uses: actions/setup-go@v5
16+
with:
17+
go-version-file: tools/lint/go.mod
18+
1419
- name: Set up pnpm
1520
uses: pnpm/action-setup@v4
1621
with:

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ images/
1313
videos/
1414
changelog/
1515

16-
node_modules/
16+
node_modules/
17+
18+
# lint compiled binary
19+
tools/lint/lint

docs/admin/users/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,6 @@ As such, there are three possible statuses for a user:
7979
| `suspended` | User's access was revoked by an admin |
8080
| `left` | User has left the workspace |
8181

82-
Only `active` users can log in and access workspace resources. `suspended` and `left` users exist solely for auditing purposes--they cannot log in to the workspace or access any resources.
82+
Only `active` users can log in and access workspace resources. `suspended` and `left` users exist solely for auditing purposesthey cannot log in to the workspace or access any resources.
8383

8484
Users who have been suspended or left can be reinvited to the workspace at any time by an admin via [invites](/docs/admin/users/invites#send-an-invite).

docs/changelogs/agent.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ description: "Changelog and migration steps for the Miru Agent"
1818

1919
## Features
2020

21-
- Deployments are guaranteed to be atomic--all config instances for a deployment are written to the filesystem simultaneously or none of them are
21+
- Deployments are guaranteed to be atomicall config instances for a deployment are written to the filesystem simultaneously or none of them are
2222
- The agent now explicitly tracks `deployed_at` and `archived_at` timestamps on device when deployments are applied
2323
- Config instances deployed to the device's file system are now identical (indents, spacing, etc.) to config instances edited in the config editor
2424

docs/developers/agent/architecture.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The agent maintains a persistent connection to an MQTT broker over TLS. The cont
3333

3434
## Sync cycle
3535

36-
At its core, the agent is built around a **sync** cycle--the process of reconciling the device's local state with the control plane's state.
36+
At its core, the agent is built around a **sync** cyclethe process of reconciling the device's local state with the control plane's state.
3737

3838
When the agent performs a sync cycle, it communicates directly with the Miru control plane over HTTPS. MQTT is not used at all in this process.
3939

docs/developers/agent/commands.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ systemctl restart miru
124124

125125
### Stop
126126

127-
`stop` stops the agent while leaving its state intact. Stopping the agent does not [disable](/docs/developers/agent/commands#disable) the agent--it will still automatically start on next system boot.
127+
`stop` stops the agent while leaving its state intact. Stopping the agent does not [disable](/docs/developers/agent/commands#disable) the agentit will still automatically start on next system boot.
128128

129129
Note that stopping the agent will prevent any new deployments from reaching the device until the agent is started again.
130130

@@ -153,7 +153,7 @@ systemctl start miru
153153

154154
Disabling the agent prevents it from starting automatically on boot.
155155

156-
This does not immediately [stop](/docs/developers/agent/commands#stop) the agent--it will still run if it is currently running. However, it will not be able to start on next system boot.
156+
This does not immediately [stop](/docs/developers/agent/commands#stop) the agentit will still run if it is currently running. However, it will not be able to start on next system boot.
157157

158158
```bash
159159
systemctl disable miru
@@ -163,7 +163,7 @@ systemctl disable miru
163163

164164
Enabling the agent allows it to start automatically on boot. This is the default behavior after installation and only needs to be done if the agent has been [disabled](/docs/developers/agent/commands#disable).
165165

166-
Enabling the agent will not immediately start it--it will still need to be [started](/docs/developers/agent/commands#start) manually.
166+
Enabling the agent will not immediately start itit will still need to be [started](/docs/developers/agent/commands#start) manually.
167167

168168
```bash
169169
systemctl enable miru

docs/developers/agent/security.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ The only local interface is a Unix domain socket at `/run/miru/miru.sock`, used
143143

144144
## Local API access control
145145

146-
The agent's local REST API is exposed through a Unix domain socket, not a TCP port. It is not possible to access the agent's local API over a network--it is only accessible from processes running on the same device as the agent.
146+
The agent's local REST API is exposed through a Unix domain socket, not a TCP port. It is not possible to access the agent's local API over a networkit is only accessible from processes running on the same device as the agent.
147147

148148
Access is controlled through filesystem permissions:
149149

docs/developers/agent/versions.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { CardNewTab } from '/snippets/components/card.jsx';
88

99
The Miru Agent follows [semantic versioning](https://semver.org/) for its releases.
1010

11-
Currently, the Miru Agent is still in beta, signified by the `v0` prefix for its releases. There is no established release cadence for the Miru Agent--features are simply released as soon as they are ready.
11+
Currently, the Miru Agent is still in beta, signified by the `v0` prefix for its releases. There is no established release cadence for the Miru Agentfeatures are simply released as soon as they are ready.
1212

1313
## Supported versions
1414

docs/developers/device-api/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import DeviceAPICard from '/snippets/references/device-api/card.mdx';
66

77
The Miru Device API is a REST API for programmatically interacting with the Miru Agent from an application running on the same device as the agent.
88

9-
The Device API is not available over the internet--it is only accessible from the device running the Miru Agent. It is useful for manually refreshing configurations, retrieving current configurations, and checking agent status from applications running on your devices.
9+
The Device API is not available over the internetit is only accessible from the device running the Miru Agent. It is useful for manually refreshing configurations, retrieving current configurations, and checking agent status from applications running on your devices.
1010

1111
The Device API is distinct from the Miru [Platform API](/docs/developers/platform-api/overview), which is a REST API for backend services and CI/CD pipelines to manage Miru resources.
1212

docs/developers/device-api/versioning.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { CardNewTab } from '/snippets/components/card.jsx';
1111

1212
The Device API adheres to [semantic versioning](https://semver.org/), which was chosen so that on-device applications can easily determine API version compatibility.
1313

14-
The Device API is currently in beta, signified by the `v0` prefix. There is no established release cadence for the Device API--features are simply released as soon as they are ready.
14+
The Device API is currently in beta, signified by the `v0` prefix. There is no established release cadence for the Device APIfeatures are simply released as soon as they are ready.
1515

1616
## URL format
1717

@@ -48,7 +48,7 @@ As rule of thumb, use the API version of the oldest agent version that is deploy
4848

4949
## Supported versions
5050

51-
The Device API does not have its own support policy--its support is inherited from the Miru Agent.
51+
The Device API does not have its own support policyits support is inherited from the Miru Agent.
5252

5353
If a supported Miru Agent uses an API version, that API version is supported. You can find the supported Miru Agent versions on the [Agent Versions](/docs/developers/agent/versions) page.
5454

@@ -86,7 +86,7 @@ During **beta** (`v0.x.y`)
8686

8787
After **stable** (`v1.0`+)
8888
- Major version bumps (e.g. `v1.x` to `v2.0`) may include breaking changes
89-
- Minor version bumps (e.g. `v1.0` to `v1.1`) are additive only--no breaking changes
89+
- Minor version bumps (e.g. `v1.0` to `v1.1`) are additive onlyno breaking changes
9090

9191
### Breaking changes
9292

0 commit comments

Comments
 (0)