Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c82df5a

Browse files
committed
wip 2
1 parent 687b015 commit c82df5a

File tree

15 files changed

+1212
-1193
lines changed

15 files changed

+1212
-1193
lines changed

.markdownlint.jsonc

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
"MD033": false, // Inline HTML: we use it in some places
1010

11+
"MD034": false, // Bare URL: we use it in some places in generated docs see: codersdk/deployment.go
12+
1113
"MD041": false, // First line in file should be a top level heading: All of our changelogs do not start with a top level heading
1214
// TODO: We need to update /home/coder/repos/coder/coder/scripts/release/generate_release_notes.sh to generate changelogs that follow this rule
1315

Makefile

+6
Original file line numberDiff line numberDiff line change
@@ -685,9 +685,15 @@ codersdk/rbacresources_gen.go: scripts/typegen/codersdk.gotmpl scripts/typegen/m
685685

686686
site/src/api/rbacresourcesGenerated.ts: scripts/typegen/codersdk.gotmpl scripts/typegen/main.go coderd/rbac/object.go coderd/rbac/policy/policy.go
687687
go run scripts/typegen/main.go rbac typescript > "$@"
688+
cd site
689+
../scripts/pnpm_install.sh
690+
pnpm exec biome format --write src/api/rbacresourcesGenerated.ts
688691

689692
site/src/api/countriesGenerated.ts: scripts/typegen/countries.tstmpl scripts/typegen/main.go codersdk/countries.go
690693
go run scripts/typegen/main.go countries > "$@"
694+
cd site
695+
../scripts/pnpm_install.sh
696+
pnpm exec biome format --write src/api/countriesGenerated.ts
691697

692698
docs/admin/integrations/prometheus.md: scripts/metricsdocgen/main.go scripts/metricsdocgen/metrics
693699
go run scripts/metricsdocgen/main.go

coderd/apidoc/docs.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codersdk/deployment.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ type ExternalAuthConfig struct {
594594
// a string (e.g. coder.com) instead of by it's type.
595595
//
596596
// Git clone makes use of this by parsing the URL from:
597-
// 'Username for <https://github.com>:'
597+
// 'Username for https://github.com:'
598598
// And sending it to the Coder server to match against the Regex.
599599
Regex string `json:"regex" yaml:"regex"`
600600
// DisplayName is shown in the UI to identify the auth config.
@@ -1174,7 +1174,7 @@ when required by your organization's security policy.`,
11741174
Flag: "wildcard-access-url",
11751175
Env: "CODER_WILDCARD_ACCESS_URL",
11761176
// Do not use a serpent.URL here. We are intentionally omitting the
1177-
// scheme part of the url <https://>, so the standard url parsing
1177+
// scheme part of the url https://, so the standard url parsing
11781178
// will yield unexpected results.
11791179
//
11801180
// We have a validation function to ensure the wildcard url is correct,
@@ -1339,7 +1339,7 @@ when required by your organization's security policy.`,
13391339
},
13401340
{
13411341
Name: "TLS Ciphers",
1342-
Description: "Specify specific TLS ciphers that allowed to be used. See <https://github.com/golang/go/blob/master/src/crypto/tls/cipher_suites.go#L53-L75>.",
1342+
Description: "Specify specific TLS ciphers that allowed to be used. See https://github.com/golang/go/blob/master/src/crypto/tls/cipher_suites.go#L53-L75.",
13431343
Flag: "tls-ciphers",
13441344
Env: "CODER_TLS_CIPHERS",
13451345
Default: "",
@@ -1350,7 +1350,7 @@ when required by your organization's security policy.`,
13501350
},
13511351
{
13521352
Name: "TLS Allow Insecure Ciphers",
1353-
Description: "By default, only ciphers marked as 'secure' are allowed to be used. See <https://github.com/golang/go/blob/master/src/crypto/tls/cipher_suites.go#L82-L95>.",
1353+
Description: "By default, only ciphers marked as 'secure' are allowed to be used. See https://github.com/golang/go/blob/master/src/crypto/tls/cipher_suites.go#L82-L95.",
13541354
Flag: "tls-allow-insecure-ciphers",
13551355
Env: "CODER_TLS_ALLOW_INSECURE_CIPHERS",
13561356
Default: "false",
@@ -1452,7 +1452,7 @@ when required by your organization's security policy.`,
14521452
},
14531453
{
14541454
Name: "DERP Config URL",
1455-
Description: "URL to fetch a DERP mapping on startup. See: <https://tailscale.com/kb/1118/custom-derp-servers/>.",
1455+
Description: "URL to fetch a DERP mapping on startup. See: https://tailscale.com/kb/1118/custom-derp-servers/.",
14561456
Flag: "derp-config-url",
14571457
Env: "CODER_DERP_CONFIG_URL",
14581458
Value: &c.DERP.Config.URL,
@@ -1461,7 +1461,7 @@ when required by your organization's security policy.`,
14611461
},
14621462
{
14631463
Name: "DERP Config Path",
1464-
Description: "Path to read a DERP mapping from. See: <https://tailscale.com/kb/1118/custom-derp-servers/>.",
1464+
Description: "Path to read a DERP mapping from. See: https://tailscale.com/kb/1118/custom-derp-servers/.",
14651465
Flag: "derp-config-path",
14661466
Env: "CODER_DERP_CONFIG_PATH",
14671467
Value: &c.DERP.Config.Path,
@@ -1945,7 +1945,7 @@ when required by your organization's security policy.`,
19451945
// Trace settings
19461946
{
19471947
Name: "Trace Enable",
1948-
Description: "Whether application tracing data is collected. It exports to a backend configured by environment variables. See: <https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md>.",
1948+
Description: "Whether application tracing data is collected. It exports to a backend configured by environment variables. See: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md.",
19491949
Flag: "trace",
19501950
Env: "CODER_TRACE_ENABLE",
19511951
Value: &c.Trace.Enable,
@@ -2284,7 +2284,7 @@ when required by your organization's security policy.`,
22842284
},
22852285
{
22862286
Name: "Postgres Connection URL",
2287-
Description: "URL of a PostgreSQL database. If empty, PostgreSQL binaries will be downloaded from Maven <https://repo1.maven.org/maven2> and store all data in the config root. Access the built-in database with \"coder server postgres-builtin-url\". Note that any special characters in the URL must be URL-encoded.",
2287+
Description: "URL of a PostgreSQL database. If empty, PostgreSQL binaries will be downloaded from Maven https://repo1.maven.org/maven2 and store all data in the config root. Access the built-in database with \"coder server postgres-builtin-url\". Note that any special characters in the URL must be URL-encoded.",
22882288
Flag: "postgres-url",
22892289
Env: "CODER_PG_CONNECTION_URL",
22902290
Annotations: serpent.Annotations{}.Mark(annotationSecretKey, "true"),
@@ -2530,7 +2530,7 @@ Write out the current server config as YAML to stdout.`,
25302530
},
25312531
{
25322532
Name: "Custom wgtunnel Host",
2533-
Description: "Hostname of HTTPS server that runs <https://github.com/coder/wgtunnel>. By default, this will pick the best available wgtunnel server hosted by Coder. e.g. <tunnel.example.com>.",
2533+
Description: "Hostname of HTTPS server that runs https://github.com/coder/wgtunnel. By default, this will pick the best available wgtunnel server hosted by Coder. e.g. tunnel.example.com.",
25342534
Flag: "wg-tunnel-host",
25352535
Env: "WGTUNNEL_HOST",
25362536
YAML: "wgtunnelHost",

docs/reference/api/schemas.md

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/cli/server.md

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/cli/templates_create.md

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/cli/templates_edit.md

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/examples.gen.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Code generated by examplegen. DO NOT EDIT.
12
[
23
{
34
"id": "aws-devcontainer",

examples/examples.go

+7
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ func parseAndVerifyExamples() (examples []codersdk.TemplateExample, err error) {
6868
defer f.Close()
6969

7070
b := bufio.NewReader(f)
71+
72+
// Discard the first line (code generated by-comment).
73+
_, _, err = b.ReadLine()
74+
if err != nil {
75+
return nil, xerrors.Errorf("read %s: %w", examplesJSON, err)
76+
}
77+
7178
err = json.NewDecoder(b).Decode(&examples)
7279
if err != nil {
7380
return nil, xerrors.Errorf("decode %s: %w", examplesJSON, err)

scripts/examplegen/main.go

+5
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ func run(lint bool) error {
9292
w = io.Discard
9393
}
9494

95+
_, err = fmt.Fprint(w, "// Code generated by examplegen. DO NOT EDIT.\n")
96+
if err != nil {
97+
return err
98+
}
99+
95100
enc := json.NewEncoder(w)
96101
enc.SetIndent("", "\t")
97102
return enc.Encode(examples)

site/biome.jsonc

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
"out/",
77
"test-results/",
88
"e2e/**/*Generated.ts",
9-
"src/api/*Generated.ts",
109
"pnpm-lock.yaml",
11-
"storybook-static/",
12-
"../examples/examples.gen.json"
10+
"storybook-static/"
1311
]
1412
},
1513
"linter": {

0 commit comments

Comments
 (0)