@owenlamont/ryl 0.4.1 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/README.md +13 -0
  2. package/bin/ryl.js +96 -1
  3. package/npm-platforms.json +124 -0
  4. package/package.json +46 -12
  5. package/.github/CODEOWNERS +0 -1
  6. package/.github/dependabot.yml +0 -13
  7. package/.github/workflows/ci.yml +0 -107
  8. package/.github/workflows/release.yml +0 -613
  9. package/.github/workflows/update_dependencies.yml +0 -61
  10. package/.github/workflows/update_linters.yml +0 -56
  11. package/.pre-commit-config.yaml +0 -87
  12. package/.yamllint +0 -4
  13. package/AGENTS.md +0 -200
  14. package/Cargo.lock +0 -908
  15. package/Cargo.toml +0 -32
  16. package/clippy.toml +0 -1
  17. package/docs/config-presets.md +0 -100
  18. package/img/benchmark-5x5-5runs.svg +0 -2176
  19. package/pyproject.toml +0 -42
  20. package/ruff.toml +0 -107
  21. package/rumdl.toml +0 -20
  22. package/rust-toolchain.toml +0 -3
  23. package/rustfmt.toml +0 -3
  24. package/scripts/benchmark_perf_vs_yamllint.py +0 -400
  25. package/scripts/coverage-missing.ps1 +0 -80
  26. package/scripts/coverage-missing.sh +0 -60
  27. package/src/bin/discover_config_bin.rs +0 -24
  28. package/src/cli_support.rs +0 -33
  29. package/src/conf/mod.rs +0 -85
  30. package/src/config.rs +0 -2099
  31. package/src/decoder.rs +0 -326
  32. package/src/discover.rs +0 -31
  33. package/src/lib.rs +0 -19
  34. package/src/lint.rs +0 -558
  35. package/src/main.rs +0 -535
  36. package/src/migrate.rs +0 -233
  37. package/src/rules/anchors.rs +0 -517
  38. package/src/rules/braces.rs +0 -77
  39. package/src/rules/brackets.rs +0 -77
  40. package/src/rules/colons.rs +0 -475
  41. package/src/rules/commas.rs +0 -372
  42. package/src/rules/comments.rs +0 -299
  43. package/src/rules/comments_indentation.rs +0 -243
  44. package/src/rules/document_end.rs +0 -175
  45. package/src/rules/document_start.rs +0 -84
  46. package/src/rules/empty_lines.rs +0 -152
  47. package/src/rules/empty_values.rs +0 -255
  48. package/src/rules/float_values.rs +0 -259
  49. package/src/rules/flow_collection.rs +0 -562
  50. package/src/rules/hyphens.rs +0 -104
  51. package/src/rules/indentation.rs +0 -803
  52. package/src/rules/key_duplicates.rs +0 -218
  53. package/src/rules/key_ordering.rs +0 -303
  54. package/src/rules/line_length.rs +0 -326
  55. package/src/rules/mod.rs +0 -25
  56. package/src/rules/new_line_at_end_of_file.rs +0 -23
  57. package/src/rules/new_lines.rs +0 -95
  58. package/src/rules/octal_values.rs +0 -121
  59. package/src/rules/quoted_strings.rs +0 -577
  60. package/src/rules/span_utils.rs +0 -37
  61. package/src/rules/trailing_spaces.rs +0 -65
  62. package/src/rules/truthy.rs +0 -420
  63. package/tests/brackets_carriage_return.rs +0 -114
  64. package/tests/build_global_cfg_error.rs +0 -23
  65. package/tests/cli_anchors_rule.rs +0 -143
  66. package/tests/cli_braces_rule.rs +0 -104
  67. package/tests/cli_brackets_rule.rs +0 -104
  68. package/tests/cli_colons_rule.rs +0 -65
  69. package/tests/cli_commas_rule.rs +0 -104
  70. package/tests/cli_comments_indentation_rule.rs +0 -61
  71. package/tests/cli_comments_rule.rs +0 -67
  72. package/tests/cli_config_data_error.rs +0 -30
  73. package/tests/cli_config_flags.rs +0 -66
  74. package/tests/cli_config_migrate.rs +0 -229
  75. package/tests/cli_document_end_rule.rs +0 -92
  76. package/tests/cli_document_start_rule.rs +0 -92
  77. package/tests/cli_empty_lines_rule.rs +0 -87
  78. package/tests/cli_empty_values_rule.rs +0 -68
  79. package/tests/cli_env_config.rs +0 -34
  80. package/tests/cli_exit_and_errors.rs +0 -41
  81. package/tests/cli_file_encoding.rs +0 -203
  82. package/tests/cli_float_values_rule.rs +0 -64
  83. package/tests/cli_format_options.rs +0 -316
  84. package/tests/cli_global_cfg_relaxed.rs +0 -20
  85. package/tests/cli_hyphens_rule.rs +0 -104
  86. package/tests/cli_indentation_rule.rs +0 -65
  87. package/tests/cli_invalid_project_config.rs +0 -39
  88. package/tests/cli_key_duplicates_rule.rs +0 -104
  89. package/tests/cli_key_ordering_rule.rs +0 -59
  90. package/tests/cli_line_length_rule.rs +0 -85
  91. package/tests/cli_list_files.rs +0 -29
  92. package/tests/cli_new_line_rule.rs +0 -141
  93. package/tests/cli_new_lines_rule.rs +0 -119
  94. package/tests/cli_octal_values_rule.rs +0 -60
  95. package/tests/cli_quoted_strings_rule.rs +0 -47
  96. package/tests/cli_toml_config.rs +0 -119
  97. package/tests/cli_trailing_spaces_rule.rs +0 -77
  98. package/tests/cli_truthy_rule.rs +0 -83
  99. package/tests/cli_yaml_files_negation.rs +0 -45
  100. package/tests/colons_rule.rs +0 -303
  101. package/tests/common/compat.rs +0 -114
  102. package/tests/common/fake_env.rs +0 -93
  103. package/tests/common/mod.rs +0 -1
  104. package/tests/conf_builtin.rs +0 -9
  105. package/tests/config_anchors.rs +0 -84
  106. package/tests/config_braces.rs +0 -121
  107. package/tests/config_brackets.rs +0 -127
  108. package/tests/config_commas.rs +0 -79
  109. package/tests/config_comments.rs +0 -65
  110. package/tests/config_comments_indentation.rs +0 -20
  111. package/tests/config_deep_merge_nonstring_key.rs +0 -24
  112. package/tests/config_document_end.rs +0 -54
  113. package/tests/config_document_start.rs +0 -55
  114. package/tests/config_empty_lines.rs +0 -48
  115. package/tests/config_empty_values.rs +0 -35
  116. package/tests/config_env_errors.rs +0 -23
  117. package/tests/config_env_invalid_inline.rs +0 -15
  118. package/tests/config_env_missing.rs +0 -63
  119. package/tests/config_env_shim.rs +0 -301
  120. package/tests/config_explicit_file_parse_error.rs +0 -55
  121. package/tests/config_extended_features.rs +0 -225
  122. package/tests/config_extends_inline.rs +0 -185
  123. package/tests/config_extends_sequence.rs +0 -18
  124. package/tests/config_find_project_home_boundary.rs +0 -54
  125. package/tests/config_find_project_two_files_in_cwd.rs +0 -47
  126. package/tests/config_float_values.rs +0 -34
  127. package/tests/config_from_yaml_paths.rs +0 -32
  128. package/tests/config_hyphens.rs +0 -51
  129. package/tests/config_ignore_errors.rs +0 -243
  130. package/tests/config_ignore_overrides.rs +0 -83
  131. package/tests/config_indentation.rs +0 -65
  132. package/tests/config_invalid_globs.rs +0 -16
  133. package/tests/config_invalid_types.rs +0 -19
  134. package/tests/config_key_duplicates.rs +0 -34
  135. package/tests/config_key_ordering.rs +0 -70
  136. package/tests/config_line_length.rs +0 -65
  137. package/tests/config_locale.rs +0 -111
  138. package/tests/config_merge.rs +0 -26
  139. package/tests/config_new_lines.rs +0 -89
  140. package/tests/config_octal_values.rs +0 -33
  141. package/tests/config_quoted_strings.rs +0 -195
  142. package/tests/config_rule_level.rs +0 -147
  143. package/tests/config_rules_non_string_keys.rs +0 -23
  144. package/tests/config_scalar_overrides.rs +0 -27
  145. package/tests/config_to_toml.rs +0 -110
  146. package/tests/config_toml_coverage.rs +0 -80
  147. package/tests/config_toml_discovery.rs +0 -304
  148. package/tests/config_trailing_spaces.rs +0 -152
  149. package/tests/config_truthy.rs +0 -77
  150. package/tests/config_yaml_files.rs +0 -62
  151. package/tests/config_yaml_files_all_non_string.rs +0 -15
  152. package/tests/config_yaml_files_empty.rs +0 -30
  153. package/tests/coverage_commas.rs +0 -46
  154. package/tests/decoder_decode.rs +0 -338
  155. package/tests/discover_config_bin_all.rs +0 -66
  156. package/tests/discover_config_bin_env_invalid_yaml.rs +0 -26
  157. package/tests/discover_config_bin_project_config_parse_error.rs +0 -24
  158. package/tests/discover_config_bin_user_global_error.rs +0 -26
  159. package/tests/discover_module.rs +0 -30
  160. package/tests/discover_per_file_dir.rs +0 -10
  161. package/tests/discover_per_file_project_config_error.rs +0 -21
  162. package/tests/float_values.rs +0 -43
  163. package/tests/lint_multi_errors.rs +0 -32
  164. package/tests/main_yaml_ok_filtering.rs +0 -30
  165. package/tests/migrate_module.rs +0 -259
  166. package/tests/resolve_ctx_empty_parent.rs +0 -16
  167. package/tests/rule_anchors.rs +0 -442
  168. package/tests/rule_braces.rs +0 -258
  169. package/tests/rule_brackets.rs +0 -217
  170. package/tests/rule_commas.rs +0 -205
  171. package/tests/rule_comments.rs +0 -197
  172. package/tests/rule_comments_indentation.rs +0 -127
  173. package/tests/rule_document_end.rs +0 -118
  174. package/tests/rule_document_start.rs +0 -60
  175. package/tests/rule_empty_lines.rs +0 -96
  176. package/tests/rule_empty_values.rs +0 -102
  177. package/tests/rule_float_values.rs +0 -109
  178. package/tests/rule_hyphens.rs +0 -65
  179. package/tests/rule_indentation.rs +0 -455
  180. package/tests/rule_key_duplicates.rs +0 -76
  181. package/tests/rule_key_ordering.rs +0 -207
  182. package/tests/rule_line_length.rs +0 -200
  183. package/tests/rule_new_lines.rs +0 -51
  184. package/tests/rule_octal_values.rs +0 -53
  185. package/tests/rule_quoted_strings.rs +0 -290
  186. package/tests/rule_trailing_spaces.rs +0 -41
  187. package/tests/rule_truthy.rs +0 -236
  188. package/tests/user_global_invalid_yaml.rs +0 -32
  189. package/tests/yamllint_compat_anchors.rs +0 -280
  190. package/tests/yamllint_compat_braces.rs +0 -411
  191. package/tests/yamllint_compat_brackets.rs +0 -364
  192. package/tests/yamllint_compat_colons.rs +0 -298
  193. package/tests/yamllint_compat_colors.rs +0 -80
  194. package/tests/yamllint_compat_commas.rs +0 -375
  195. package/tests/yamllint_compat_comments.rs +0 -167
  196. package/tests/yamllint_compat_comments_indentation.rs +0 -281
  197. package/tests/yamllint_compat_config.rs +0 -170
  198. package/tests/yamllint_compat_document_end.rs +0 -243
  199. package/tests/yamllint_compat_document_start.rs +0 -136
  200. package/tests/yamllint_compat_empty_lines.rs +0 -117
  201. package/tests/yamllint_compat_empty_values.rs +0 -179
  202. package/tests/yamllint_compat_float_values.rs +0 -216
  203. package/tests/yamllint_compat_hyphens.rs +0 -223
  204. package/tests/yamllint_compat_indentation.rs +0 -398
  205. package/tests/yamllint_compat_key_duplicates.rs +0 -139
  206. package/tests/yamllint_compat_key_ordering.rs +0 -170
  207. package/tests/yamllint_compat_line_length.rs +0 -375
  208. package/tests/yamllint_compat_list.rs +0 -127
  209. package/tests/yamllint_compat_new_line.rs +0 -133
  210. package/tests/yamllint_compat_newline_types.rs +0 -185
  211. package/tests/yamllint_compat_octal_values.rs +0 -172
  212. package/tests/yamllint_compat_quoted_strings.rs +0 -154
  213. package/tests/yamllint_compat_syntax.rs +0 -200
  214. package/tests/yamllint_compat_trailing_spaces.rs +0 -162
  215. package/tests/yamllint_compat_truthy.rs +0 -130
  216. package/tests/yamllint_compat_yaml_files.rs +0 -81
  217. package/typos.toml +0 -2
package/README.md CHANGED
@@ -13,7 +13,11 @@ Compatibility note:
13
13
  ## Quick Start
14
14
 
15
15
  ```bash
16
+ # Using uv (Python)
16
17
  uvx ryl .
18
+
19
+ # Using npx (Node.js)
20
+ npx @owenlamont/ryl .
17
21
  ```
18
22
 
19
23
  For `prek` / `pre-commit` integration, see
@@ -27,6 +31,12 @@ For `prek` / `pre-commit` integration, see
27
31
  uv tool install ryl
28
32
  ```
29
33
 
34
+ ### NPM
35
+
36
+ ```bash
37
+ npm install -g @owenlamont/ryl
38
+ ```
39
+
30
40
  ### pip
31
41
 
32
42
  ```bash
@@ -228,3 +238,6 @@ developer automation, especially:
228
238
  - [saphyr](https://github.com/saphyr-rs/saphyr) - ryl is built on saphyr and saphyr's
229
239
  developers were very patient in showing some of the nuance and complexity of parsing
230
240
  YAML which I was embarrassingly ignorant of when start ryl.
241
+ - [esbuild](https://github.com/evanw/esbuild) and
242
+ [biome](https://github.com/biomejs/biome) - for providing the "binary wrapper"
243
+ blueprint for distributing high-performance native tools via NPM.
package/bin/ryl.js CHANGED
@@ -1 +1,96 @@
1
- console.log('Initializing ryl...');
1
+ #!/usr/bin/env node
2
+
3
+ const path = require('path');
4
+ const { spawnSync } = require('child_process');
5
+
6
+ const pkg = require('../package.json');
7
+ const platforms = require('../npm-platforms.json');
8
+ const binName = process.platform === 'win32' ? 'ryl.exe' : 'ryl';
9
+ const localBinPath = path.join(__dirname, binName);
10
+
11
+ async function run() {
12
+ if (process.env.RYL_BINARY_PATH) {
13
+ execute(process.env.RYL_BINARY_PATH);
14
+ return;
15
+ }
16
+
17
+ if (exists(localBinPath)) {
18
+ execute(localBinPath);
19
+ return;
20
+ }
21
+
22
+ const platformPackage = resolvePlatformPackage();
23
+ const platformPackageJson = resolveInstalledPackageJson(platformPackage.packageName);
24
+ if (!platformPackageJson) {
25
+ console.error(
26
+ [
27
+ `No installed npm platform package matches ${process.platform}/${process.arch}.`,
28
+ `Expected optional dependency: ${platformPackage.packageName}`,
29
+ 'This package requires npm optionalDependencies; installs done with',
30
+ '--omit=optional or npm_config_optional=false are not supported.',
31
+ `Reinstall ${pkg.name} with optional dependencies enabled.`
32
+ ].join('\n')
33
+ );
34
+ process.exit(1);
35
+ }
36
+
37
+ const packageRoot = path.dirname(platformPackageJson);
38
+ const binaryPath = path.join(packageRoot, 'bin', platformPackage.binaryName);
39
+ if (!exists(binaryPath)) {
40
+ console.error(
41
+ `Installed package ${platformPackage.packageName} is missing binary ${platformPackage.binaryName}.`
42
+ );
43
+ process.exit(1);
44
+ }
45
+
46
+ execute(binaryPath);
47
+ }
48
+
49
+ function exists(candidatePath) {
50
+ try {
51
+ require('fs').accessSync(candidatePath);
52
+ return true;
53
+ } catch {
54
+ return false;
55
+ }
56
+ }
57
+
58
+ function resolvePlatformPackage() {
59
+ for (const platform of platforms.platforms) {
60
+ if (platform.os.includes(process.platform) && platform.cpu.includes(process.arch)) {
61
+ return platform;
62
+ }
63
+ }
64
+
65
+ console.error(`Unsupported platform/architecture: ${process.platform}/${process.arch}`);
66
+ process.exit(1);
67
+ }
68
+
69
+ function resolveInstalledPackageJson(packageName) {
70
+ try {
71
+ return require.resolve(`${packageName}/package.json`);
72
+ } catch {
73
+ return null;
74
+ }
75
+ }
76
+
77
+ function execute(binPath) {
78
+ const result = spawnSync(binPath, process.argv.slice(2), {
79
+ stdio: 'inherit',
80
+ windowsHide: true
81
+ });
82
+
83
+ if (result.error) {
84
+ console.error(`Error executing binary at ${binPath}: ${result.error.message}`);
85
+ process.exit(1);
86
+ }
87
+
88
+ if (result.status === null) {
89
+ console.error('Binary execution failed (no exit status)');
90
+ process.exit(1);
91
+ }
92
+
93
+ process.exit(result.status);
94
+ }
95
+
96
+ run();
@@ -0,0 +1,124 @@
1
+ {
2
+ "binaryName": "ryl",
3
+ "metaPackageName": "@owenlamont/ryl",
4
+ "packageScope": "@owenlamont",
5
+ "platforms": [
6
+ {
7
+ "archiveName": "ryl-aarch64-apple-darwin.tar.gz",
8
+ "binaryName": "ryl",
9
+ "cpu": [
10
+ "arm64"
11
+ ],
12
+ "folderName": "ryl-darwin-arm64",
13
+ "os": [
14
+ "darwin"
15
+ ],
16
+ "packageName": "@owenlamont/ryl-darwin-arm64",
17
+ "target": "aarch64-apple-darwin"
18
+ },
19
+ {
20
+ "archiveName": "ryl-x86_64-unknown-linux-musl.tar.gz",
21
+ "binaryName": "ryl",
22
+ "cpu": [
23
+ "x64"
24
+ ],
25
+ "folderName": "ryl-linux-x64-musl",
26
+ "os": [
27
+ "linux"
28
+ ],
29
+ "packageName": "@owenlamont/ryl-linux-x64-musl",
30
+ "target": "x86_64-unknown-linux-musl"
31
+ },
32
+ {
33
+ "archiveName": "ryl-aarch64-unknown-linux-musl.tar.gz",
34
+ "binaryName": "ryl",
35
+ "cpu": [
36
+ "arm64"
37
+ ],
38
+ "folderName": "ryl-linux-arm64-musl",
39
+ "os": [
40
+ "linux"
41
+ ],
42
+ "packageName": "@owenlamont/ryl-linux-arm64-musl",
43
+ "target": "aarch64-unknown-linux-musl"
44
+ },
45
+ {
46
+ "archiveName": "ryl-armv7-unknown-linux-gnueabihf.tar.gz",
47
+ "binaryName": "ryl",
48
+ "cpu": [
49
+ "arm"
50
+ ],
51
+ "folderName": "ryl-linux-armv7-gnu",
52
+ "os": [
53
+ "linux"
54
+ ],
55
+ "packageName": "@owenlamont/ryl-linux-armv7-gnu",
56
+ "target": "armv7-unknown-linux-gnueabihf"
57
+ },
58
+ {
59
+ "archiveName": "ryl-i686-unknown-linux-gnu.tar.gz",
60
+ "binaryName": "ryl",
61
+ "cpu": [
62
+ "ia32"
63
+ ],
64
+ "folderName": "ryl-linux-ia32-gnu",
65
+ "os": [
66
+ "linux"
67
+ ],
68
+ "packageName": "@owenlamont/ryl-linux-ia32-gnu",
69
+ "target": "i686-unknown-linux-gnu"
70
+ },
71
+ {
72
+ "archiveName": "ryl-powerpc64le-unknown-linux-gnu.tar.gz",
73
+ "binaryName": "ryl",
74
+ "cpu": [
75
+ "ppc64"
76
+ ],
77
+ "folderName": "ryl-linux-ppc64le-gnu",
78
+ "os": [
79
+ "linux"
80
+ ],
81
+ "packageName": "@owenlamont/ryl-linux-ppc64le-gnu",
82
+ "target": "powerpc64le-unknown-linux-gnu"
83
+ },
84
+ {
85
+ "archiveName": "ryl-s390x-unknown-linux-gnu.tar.gz",
86
+ "binaryName": "ryl",
87
+ "cpu": [
88
+ "s390x"
89
+ ],
90
+ "folderName": "ryl-linux-s390x-gnu",
91
+ "os": [
92
+ "linux"
93
+ ],
94
+ "packageName": "@owenlamont/ryl-linux-s390x-gnu",
95
+ "target": "s390x-unknown-linux-gnu"
96
+ },
97
+ {
98
+ "archiveName": "ryl-x86_64-pc-windows-msvc.zip",
99
+ "binaryName": "ryl.exe",
100
+ "cpu": [
101
+ "x64"
102
+ ],
103
+ "folderName": "ryl-win32-x64-msvc",
104
+ "os": [
105
+ "win32"
106
+ ],
107
+ "packageName": "@owenlamont/ryl-win32-x64-msvc",
108
+ "target": "x86_64-pc-windows-msvc"
109
+ },
110
+ {
111
+ "archiveName": "ryl-aarch64-pc-windows-msvc.zip",
112
+ "binaryName": "ryl.exe",
113
+ "cpu": [
114
+ "arm64"
115
+ ],
116
+ "folderName": "ryl-win32-arm64-msvc",
117
+ "os": [
118
+ "win32"
119
+ ],
120
+ "packageName": "@owenlamont/ryl-win32-arm64-msvc",
121
+ "target": "aarch64-pc-windows-msvc"
122
+ }
123
+ ]
124
+ }
package/package.json CHANGED
@@ -1,28 +1,62 @@
1
1
  {
2
- "name": "@owenlamont/ryl",
3
- "version": "0.4.1",
4
- "description": "Fast YAML linter inspired by yamllint",
5
- "main": "index.js",
2
+ "author": "Owen Lamont",
6
3
  "bin": {
7
4
  "ryl": "bin/ryl.js"
8
5
  },
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/owenlamont/ryl.git"
6
+ "bugs": {
7
+ "url": "https://github.com/owenlamont/ryl/issues"
8
+ },
9
+ "cpu": [
10
+ "x64",
11
+ "arm64",
12
+ "arm",
13
+ "ia32",
14
+ "ppc64",
15
+ "s390x"
16
+ ],
17
+ "description": "Fast YAML linter inspired by yamllint",
18
+ "engines": {
19
+ "node": ">=18.0.0"
12
20
  },
21
+ "files": [
22
+ "bin/",
23
+ "npm-platforms.json",
24
+ "README.md",
25
+ "LICENSE"
26
+ ],
27
+ "homepage": "https://github.com/owenlamont/ryl#readme",
13
28
  "keywords": [
14
29
  "yaml",
15
30
  "lint",
16
31
  "cli",
17
32
  "rust"
18
33
  ],
19
- "author": "Owen Lamont",
20
34
  "license": "MIT",
21
- "bugs": {
22
- "url": "https://github.com/owenlamont/ryl/issues"
23
- },
24
- "homepage": "https://github.com/owenlamont/ryl#readme",
35
+ "name": "@owenlamont/ryl",
36
+ "os": [
37
+ "darwin",
38
+ "linux",
39
+ "win32"
40
+ ],
25
41
  "publishConfig": {
26
42
  "access": "public"
43
+ },
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "git+https://github.com/owenlamont/ryl.git"
47
+ },
48
+ "sideEffects": false,
49
+ "type": "commonjs",
50
+ "version": "0.4.3",
51
+ "optionalDependencies": {
52
+ "@owenlamont/ryl-darwin-arm64": "0.4.3",
53
+ "@owenlamont/ryl-linux-x64-musl": "0.4.3",
54
+ "@owenlamont/ryl-linux-arm64-musl": "0.4.3",
55
+ "@owenlamont/ryl-linux-armv7-gnu": "0.4.3",
56
+ "@owenlamont/ryl-linux-ia32-gnu": "0.4.3",
57
+ "@owenlamont/ryl-linux-ppc64le-gnu": "0.4.3",
58
+ "@owenlamont/ryl-linux-s390x-gnu": "0.4.3",
59
+ "@owenlamont/ryl-win32-x64-msvc": "0.4.3",
60
+ "@owenlamont/ryl-win32-arm64-msvc": "0.4.3"
27
61
  }
28
62
  }
@@ -1 +0,0 @@
1
- * @owenlamont
@@ -1,13 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: "github-actions"
4
- directory: "/"
5
- schedule:
6
- interval: "weekly"
7
- day: "friday"
8
- groups:
9
- actions-dependencies:
10
- patterns:
11
- - "*"
12
- cooldown:
13
- default-days: 7
@@ -1,107 +0,0 @@
1
- name: CI
2
- on:
3
- pull_request:
4
- jobs:
5
- checks:
6
- runs-on: ubuntu-latest
7
- permissions:
8
- contents: read
9
- pull-requests: write
10
- steps:
11
- - name: Checkout repository
12
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
13
-
14
- - name: Install uv
15
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78
16
-
17
- - name: Install prek
18
- run: uv tool install prek --force
19
-
20
- - name: Install yamllint
21
- run: |
22
- uv tool install yamllint --force
23
- yamllint --version
24
-
25
- - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4
26
-
27
- - name: Install Rust components
28
- run: rustup component add rustfmt clippy llvm-tools-preview
29
-
30
- - name: Install cargo-nextest
31
- uses: taiki-e/install-action@6cc14f7f2f4b3129aff07a8b071d2d4f2733465d
32
- with:
33
- tool: cargo-nextest
34
-
35
- - name: Install cargo-llvm-cov
36
- uses: taiki-e/install-action@6cc14f7f2f4b3129aff07a8b071d2d4f2733465d
37
- with:
38
- tool: cargo-llvm-cov
39
-
40
- - name: Run prek hooks (lint and static checks)
41
- env:
42
- SKIP: no-commit-to-branch,nextest
43
- run: prek run --all-files
44
-
45
- - name: Run tests with coverage (nextest + cargo-llvm-cov)
46
- run: |
47
- set -euo pipefail
48
- echo '### Test Coverage (nextest + cargo-llvm-cov)' > coverage.md
49
- echo '```text' >> coverage.md
50
- cargo llvm-cov nextest --summary-only | tee -a coverage.md
51
- echo '```' >> coverage.md
52
- # Produce LCOV for detailed per-line/branch analysis
53
- cargo llvm-cov nextest --lcov --output-path lcov.info
54
- echo '' >> coverage.md
55
- echo '#### Missed Lines (per file)' >> coverage.md
56
- awk -F: '
57
- /^SF:/ {f=$2}
58
- /^DA:/ {split($2,a,","); if (a[2]==0) lines[f]=lines[f] a[1] ","}
59
- END {
60
- for (f in lines) {
61
- gsub(/,$/, "", lines[f]);
62
- printf("- %s: %s\n", f, lines[f]);
63
- }
64
- }
65
- ' lcov.info | sort >> coverage.md || true
66
- echo '' >> coverage.md
67
- if grep -q '^BRDA:' lcov.info; then
68
- echo '#### Missed Branches (per file)' >> coverage.md
69
- awk -F: '
70
- /^SF:/ {f=$2}
71
- /^BRDA:/ {
72
- split($2,a,",");
73
- # a[4] is taken count; treat 0 or - as missed
74
- if (a[4]=="-" || a[4]==0) {
75
- branches[f]=branches[f] sprintf("%s(b%s)", a[1], a[3]) ",";
76
- }
77
- }
78
- END {
79
- for (f in branches) {
80
- gsub(/,$/, "", branches[f]);
81
- printf("- %s: %s\n", f, branches[f]);
82
- }
83
- }
84
- ' lcov.info | sort >> coverage.md || true
85
- fi
86
-
87
- - name: Upload coverage artifacts
88
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
89
- with:
90
- name: coverage
91
- path: |
92
- coverage.md
93
- lcov.info
94
-
95
- - name: Comment coverage summary on PR
96
- if: github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork
97
- uses: marocchino/sticky-pull-request-comment@70d2764d1a7d5d9560b100cbea0077fc8f633987
98
- with:
99
- header: ryl-coverage
100
- path: coverage.md
101
-
102
- - name: Enforce coverage thresholds
103
- run: |
104
- # Enforce zero missed lines and regions
105
- cargo llvm-cov nextest --summary-only \
106
- --fail-uncovered-lines 0 \
107
- --fail-uncovered-regions 0