Skip to content

Commit 4f31a02

Browse files
committed
lint
1 parent c9fb7d9 commit 4f31a02

31 files changed

+159
-49
lines changed

.lintmdrc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"rules":{
3+
"no-empty-code": 2,
4+
"no-empty-url": 2,
5+
"no-empty-list": 2,
6+
"space-around-alphabet": 2,
7+
"no-special-characters": 2,
8+
"no-multiple-space-blockquote": 2,
9+
"correct-title-trailing-punctuation": 2,
10+
"no-empty-blockquote": 2,
11+
"use-standard-ellipsis": 2,
12+
"space-around-number": 2,
13+
"no-long-code": [2, {
14+
"length": 100,
15+
"exclude": ["dot"]
16+
}]
17+
}
18+
}

Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ init:
77
git submodule update --init
88

99
lint:
10-
npx @lint-md/cli .
11-
npx [email protected] . --check
10+
npx @lint-md/cli **/*
1211

1312
format:
14-
npx @lint-md/cli --fix .
15-
npx [email protected] --write .
13+
npx @lint-md/cli --fix **/*
1614

1715

1816
EXCLUDE = --exclude "*webp" --exclude "*svg" --exclude "*gif"

content/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ title: Zig 语言中文社区
99
Zig 中文社区致力于在中文用户中分享和传播 Zig 语言!
1010

1111
我们是一群对 Zig 编程语言充满热情的开发者、学习者和爱好者。我们致力于:
12+
1213
1. 分享 Zig 相关的知识和经验
1314
2. 翻译 Zig 官方文档和重要资源
1415
3. 组织线上线下的学习活动和讨论

content/community/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ params:
3434
- **2024-03-29:** 使用自定义域名 ziglang.cc
3535
- **2022-12-10:** 切换主题 [cupper-hugo](https://github.com/zwbetz-gh/cupper-hugo-theme) –> [hugo-xmin](https://github.com/yihui/hugo-xmin)
3636
- **2022-07-20:** 首次上线
37-
{{% /blocks/section %}}
37+
{{% /blocks/section %}}

content/contributing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ type: docs
44
---
55

66
Zig 中文社区是一个开放的组织,我们致力于推广 Zig 在中文群体中的使用,有多种方式可以参与进来:
7+
78
1. 供稿,分享自己使用 Zig 的心得,方式见下文
89
2. 改进 zigcc 组织下的开源项目,这是 [open issues](https://github.com/search?q=state%3Aopen+org%3Azigcc++NOT+%E6%97%A5%E6%8A%A5&type=issues&ref=advsearch)
910
3. 参与不定期的[线上会议](/post/news/)

content/learn/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Learning Zig 中文翻译
33
type: docs
44
cascade:
5-
- type: docs
5+
- type: docs
66
---
77

88
[《学习 Zig》](https://www.openmymind.net/learning_zig/)系列教程最初由 [Karl Seguin](https://github.com/karlseguin) 编写,该教程行文流畅,讲述的脉络由浅入深,深入浅出,是入门 Zig 非常不错的选择。因此,[Zig 中文社区](https://ziglang.cc)将其翻译成中文,便于在中文用户内阅读与传播。

content/learn/installing-zig.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
title: "安装 Zig"
33
weight: 2
44
---
5-
> 原文地址:<https://www.openmymind.net/learning_zig/#install>
65

6+
> 原文地址:<https://www.openmymind.net/learning_zig/#install>
77
88
Zig 官网的[下载页面](https://ziglang.org/download/)中包含常见平台的预编译二进制文件。在这个页面上,你可以找到最新开发版本和主要版本的二进制文件。本指南所跟踪的最新版本可在页面顶部找到。
99

content/learn/language-overview-part1.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ weight: 3
55

66
> 原文地址:<https://www.openmymind.net/learning_zig/language_overview_1>
77
8-
98
Zig 是一种强类型编译语言。它支持泛型,具有强大的编译时元编程功能,并且**不包含**垃圾收集器。许多人认为 Zig 是 C 的现代替代品。因此,该语言的语法与 C 类似,比较明显的就是以分号结尾的语句和以花括号分隔的块。
109

1110
Zig 代码如下所示:

content/learn/language-overview-part2.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ weight: 4
55

66
> 原文地址:<https://www.openmymind.net/learning_zig/language_overview_2>
77
8-
98
本部分继续上一部分的内容:熟悉 Zig 语言。我们将探索 Zig 的控制流和结构以外的类型。通过这两部分的学习,我们将掌握 Zig 语言的大部分语法,这让我们可以继续深入 Zig 语言,同时也为如何使用 std 标准库打下了基础。
109

1110
## 控制流

content/learn/style-guide.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ weight: 5
55

66
> 原文地址:<https://www.openmymind.net/learning_zig/style_guide>
77
8-
98
本小节的主要内容是介绍 Zig 编译器强制遵守的 2 条规则,以及 Zig 标准库的命名惯例(naming convention)。
109

1110
## 未使用变量 Unused Variable

0 commit comments

Comments
 (0)