You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bidichk finds dangerous unicode character sequences in Go source files.
6
6
@@ -18,6 +18,46 @@ The following unicode characters are considered dangerous:
18
18
* U+2068: FIRST-STRONG-ISOLATE
19
19
* U+2069: POP-DIRECTIONAL-ISOLATE
20
20
21
+
## Installation
22
+
23
+
Download `bidichk` from the [releases](https://github.com/breml/bidichk/releases) or get the latest version from source with:
24
+
25
+
```shell
26
+
go get github.com/breml/bidichk/cmd/bidichk
27
+
```
28
+
29
+
## Usage
30
+
31
+
### golangci-lint
32
+
33
+
[golangci-lint](https://golangci-lint.run) supports thelper, so you can enable this linter and use it.
34
+
35
+
### Shell
36
+
37
+
Check everything:
38
+
39
+
```shell
40
+
bidichk ./...
41
+
```
42
+
43
+
### Enable only required unicode runes
44
+
45
+
If you run bidichk via golangci-lint look at [.golangci.example.yml](https://golangci-lint.run/usage/configuration/#config-file) for an example of the configuration.
46
+
47
+
Otherwise you can run bidichk with `--disallowed-runes` flag to specify the runes you consider harmful.
48
+
49
+
E.g. the following command considers only the `LEFT-TO-RIGHT-OVERRIDE` unicode rune as dangerous:
0 commit comments